+(in-package :lisp-on-lines)
+
+;;;; * Relational Attributes
+
+;;;; ** Has-Many attribute
+
+(defattribute has-many ()
+ ()
+ (:default-properties
+ :add-new-label "Add New"
+ :sort-arguments (list #'< :key #'(lambda (x) (funcall (car (list-keys x)) x)))))
+
+
+(defdisplay (:description (attribute has-many))
+ ;
+ (<ucw:submit :action (add-to-has-many slot instance) :value (getp :add-new-label))
+ (let* ((i (apply #'sort (slot-value object (getp :slot-name))
+ (getp :sort-arguments))))
+ (display component i
+ :type'lol::one-line
+ :layers '(+ wrap-link))))
+