From 6fe664d14f96294676a35f455ea5d4839bb0fb9d Mon Sep 17 00:00:00 2001 From: drewc Date: Fri, 22 Feb 2008 17:49:47 -0800 Subject: [PATCH] Fix multi-action form. The 'standard' ucw forms have always required javascript if multiple actions are to be submitted. I've never liked that, and this is my, IMO, superior solution. darcs-hash:20080223014947-39164-8b219f9d816266e965fe4a8b08c2cb296ddb03b6.gz --- src/ucw/standard-components.lisp | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/src/ucw/standard-components.lisp b/src/ucw/standard-components.lisp index dd39293..361e61e 100644 --- a/src/ucw/standard-components.lisp +++ b/src/ucw/standard-components.lisp @@ -23,18 +23,17 @@ (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 -- 2.20.1