1 (in-package :lisp-on-lines-ucw
)
3 (defclass lisp-on-lines-action
(ucw-standard::standard-action
)
4 ((layer-context :accessor action-layer-context
6 :initarg
:layer-context
))
7 (:metaclass closer-mop
:funcallable-standard-class
))
10 (setf ucw-core
::*default-action-class
* 'lisp-on-lines-action
)
13 (defmethod ucw-core:call-action
:around
((action lisp-on-lines-action
) application session frame
)
14 (let ((next-method (lambda ()
16 action application session frame
18 (call-next-method))))))
19 (let ((layer-context (action-layer-context action
)))
21 (contextl:funcall-with-layer-context layer-context next-method
)
22 (funcall next-method
)))
25 (defmethod ucw-core:handle-action
:wrap-around
((action lisp-on-lines-action
) application session frame
)
26 (let ((lol::*invalid-objects
* (make-hash-table)))
27 (handler-bind ((lol::validation-condition
29 (let ((object (lol::validation-condition-object c
))
30 (attribute (lol::validation-condition-attribute c
)))
33 (setf (gethash object lol
::*invalid-objects
*)
34 (cons (cons attribute c
)
35 (gethash object lol
::*invalid-objects
*)))))))
39 (contextl:define-layered-function layered-call-action
(action application session frame next-method
)
40 (:method
(action application session frame next-method
)
41 (funcall next-method
)))
44 (contextl:define-layered-method layered-call-action
45 :in-layer
#.
(lol::defining-description
'lol
::validate
)
46 :around
((action lisp-on-lines-action
) application session frame next-method
)
53 (defclass described-component-class
(described-class standard-component-class
)
58 ;; (defcomponent standard-window-component
59 ;; (ucw-standard::basic-window-component)
62 ;; :accessor window-body
66 ;; (defmethod render-html-head ((window standard-window-component))
67 ;; (let* ((app (context.application *context*))
68 ;; (url-prefix (application.url-prefix app)))
69 ;; (<:meta :http-equiv "Content-Type" :content (window-component.content-type window))
70 ;; (awhen (window-component.title window)
71 ;; (<:title (if (functionp it)
72 ;; (funcall it window)
74 ;; (awhen (window-component.icon window)
75 ;; (<:link :rel "icon"
76 ;; :type "image/x-icon"
77 ;; :href (concatenate 'string url-prefix it)))
78 ;; (dolist (stylesheet (effective-window-stylesheets window))
79 ;; (<:link :rel "stylesheet"
81 ;; :type "text/css"))))
83 ;; (defmethod render-html-body ((window standard-window-component))
84 ;; (render (window-body window)))
86 ;; (defcomponent info-message ()
87 ;; ((message :accessor message :initarg :message)))
89 ;; (defmethod render ((m info-message))
91 ;; :class "info-mssage"
92 ;; (<:as-html (message m)))
93 ;; (<ucw:a :action (answer-component m nil) "Ok"))