+(defmethod make-view (object &rest args &key (type :viewer)
+ &allow-other-keys )
+ (remf args :type)
+ ;(warn "~A ~A" args `(:type ,type :initargs ,@args))
+ (apply #'make-presentation object `(:type ,type ,@ (when args
+ `(:initargs ,args)))))
+
+(defmacro present-view ((object &optional (type :viewer) (parent 'self))
+ &body attributes-and-args)
+ (arnesi:with-unique-names (view)
+ `(let ((,view (lol::make-view ,object
+ :type ,type
+ ,@(when (car attributes-and-args)
+ `(:attributes ',(car attributes-and-args)))
+ ,@ (cdr attributes-and-args))))
+ (setf (ucw::parent ,view) ,parent)
+ (lol::present ,view))))
+
+
+(defmacro call-view ((object &optional (type :viewer) (component 'self component-supplied-p))
+ &body attributes-and-args)
+ `(ucw:call-component
+ ,component
+ ,(%make-view object type (car attributes-and-args) (cdr attributes-and-args))))
+
+(defmethod slot-view ((self mewa) slot-name)
+ (mewa::find-attribute-slot self slot-name))
+
+(defmethod present-slot-view ((self mewa) slot-name &optional (instance (instance self)))
+ (let ((v (slot-view self slot-name)))
+
+ (if v
+ (present-slot v instance)
+ (<:as-html slot-name))))