4 (defcomponent mewa-one-line-presentation
(mewa one-line-presentation
)
6 (:default-initargs
:attributes-getter
#'one-line-attributes-getter
))
8 (defmethod one-line-attributes-getter ((self mewa
))
9 (or (meta-model:list-keys
(instance self
))))
12 (defcomponent mewa-object-presentation
(mewa ucw
:object-presentation
) ())
15 (defcomponent mewa-list-presentation
(mewa ucw
:list-presentation
)
16 ((instances :accessor instances
:initarg
:instances
:initform nil
)
17 (instance :accessor instance
)
18 (select-label :accessor select-label
:initform
"select" :initarg
:select-label
)
19 (selectablep :accessor selectablep
:initform t
:initarg
:selectablep
)))
21 (defaction select-from-listing
((listing mewa-list-presentation
) object index
)
24 (defmethod render-list-row ((listing mewa-list-presentation
) object index
)
25 (<:tr
:class
"item-row"
26 (<:td
:align
"center" :valign
"top"
27 (when (ucw::editablep listing
)
28 (let ((object object
))
29 (<ucw
:input
:type
"submit"
30 :action
(edit-from-listing listing object index
)
31 :value
(ucw::edit-label listing
))))
33 (when (ucw::deleteablep listing
)
35 (<ucw
:input
:type
"submit"
36 :action
(delete-from-listing listing object index
)
37 :value
(ucw::delete-label listing
))))
38 (when (selectablep listing
)
40 (<ucw
:input
:type
"submit"
41 :action
(select-from-listing listing object index
)
42 :value
(select-label listing
)))))
43 (dolist (slot (slots listing
))
44 (<:td
:class
"data-cell" (present-slot slot object
)))
45 (<:td
:class
"index-number-cell"
46 (<:i
(<:as-html index
)))
49 (defmethod get-all-instances ((self mewa-list-presentation
))