- (setf (foreign-instance slot) (when (presentation-slot-value slot instance) (meta-model:explode-foreign-key instance (slot-name slot))))
- (flet ((render () (call-next-method)))
- (cond
- ((editablep slot)
- (render)
- (<ucw:submit :action (search-records slot instance) :value "Search" :style "display:inline")
- (<ucw:submit :action (create-record slot instance) :value "Add New" :style "display:inline"))
- ((linkedp slot)
- (<ucw:a :action (view-instance slot (foreign-instance slot))
- (render)))
- (t
- (render)))))
+ (setf (foreign-instance slot)
+ (when (presentation-slot-value slot instance)
+ (meta-model:explode-foreign-key instance (slot-name slot))))
+
+ (flet ((render () (when (foreign-instance slot)(call-next-method))))
+ (if (slot-boundp slot 'place)
+ (cond
+ ((editablep slot)
+ (render)
+ (<ucw:submit :action (search-records slot instance) :value "Search" :style "display:inline")
+ (<ucw:submit :action (create-record slot instance) :value "Add New" :style "display:inline"))
+ ((linkedp slot)
+ (<ucw:a :action (view-instance slot (foreign-instance slot))
+ (render)))
+ (t
+ (render)))
+ ;; presentation is used only for rendering
+ (render))))