1 (in-package :lisp-on-lines-ucw
)
3 (defmacro defaction
(&rest args-and-body
)
4 `(arnesi:defmethod
/cc
,@args-and-body
))
6 (defun make-action (lambda &rest args
)
7 (let ((ucw::*default-action-class
* 'basic-action
))
8 (apply #'ucw
::make-action lambda args
)))
10 (defclass standard-application
(ucw:basic-application
)
13 (defclass standard-request-context
(ucw::standard-request-context
)
16 (defmethod ucw:request-context-class list
((application standard-application
))
17 'standard-request-context
)
19 (defvar +action-compound-name-delimiter
+ #\|
)
21 (defmethod ucw::find-action-id
:around
((context standard-request-context
))
25 (context.request context
) ucw
::+action-parameter-name
+
26 :test
(lambda (name parameter
)
27 (declare (ignore name
))
28 (destructuring-bind (param-name &optional action-id
)
29 (split-sequence:split-sequence
30 +action-compound-name-delimiter
+ parameter
)
32 (string= ucw
::+action-parameter-name
+ param-name
))
33 (setf id action-id
)))))
37 (defcomponent standard-window-component
38 (ucw:basic-window-component
)
45 (defmethod ucw:render-html-body
((window standard-window-component
))
46 (ucw:render
(window-body window
)))