Fix multi-action form.
[clinton/lisp-on-lines.git] / src / ucw / standard-components.lisp
index 1dabaa4..361e61e 100644 (file)
@@ -1,5 +1,8 @@
 (in-package :lisp-on-lines-ucw)
 
+(defclass described-component-class (standard-component-class described-class)
+  ())
+
 (defmacro defaction (&rest args-and-body)
   `(arnesi:defmethod/cc ,@args-and-body))
 
 
 (defmethod ucw::find-action-id :around ((context standard-request-context))
   (or 
-   (let (id)
-     (ucw::find-parameter 
-      (context.request context) ucw::+action-parameter-name+
-      :test (lambda (name parameter)
-             (declare (ignore name))
-             (destructuring-bind (param-name &optional action-id)
-                 (split-sequence:split-sequence 
-                  +action-compound-name-delimiter+ parameter)
-               (when (and action-id 
-                          (string= ucw::+action-parameter-name+ param-name))
-                 (setf id action-id)))))
-     id)
+   (loop
+
+      :for (k . v) in (ucw::parameters 
+                     (context.request context))
+      :do(destructuring-bind (param-name &optional action-id)
+             (split-sequence:split-sequence 
+              +action-compound-name-delimiter+ k)
+           (when (and action-id 
+                      (string= 
+                       ucw::+action-parameter-name+ param-name))
+             (return action-id))))
    (call-next-method)))
 
 (defcomponent standard-window-component 
@@ -42,5 +44,5 @@
     :component t
     :initarg :body)))
 
-(defmethod ucw:render-html-body ((window standard-window-component))
+(defmethod render-html-body ((window standard-window-component))
   (ucw:render (window-body window)))