[Bese-devel] <:select
burban at opopop.net
burban at opopop.net
Thu Jan 29 23:55:54 UTC 2009
George Tasso <getasso at gmail.com> writes:
[...]
> >
> > (<ucw:select :accessor (getf (message self) :code)
> > (<ucw:option :value "foo" (<:ah "printed version"))
> > (<ucw:option :value "bar" (<:ah "printed version"))
> > (<ucw:option :value "baz" (<:ah "printed version"))
> > ;; etc
> > ...)
> >
> > the <ucw:option :value can be an arbitrary lisp object.
> >
> > --
> >
>
>
> Ah ok,
> just tested it and it work. Thank you, thank you all.
>
I don't really understand the context of your problem and your use of
getf and :code. So I devised a way to reuse file demo.lisp from
ucw-core as a complete working example. Simply replace the render
function for demo-multi-submit-form in that file by this:
(defmethod render :wrapping ((self demo-multi-submit-form))
(call-next-method)
(let ((acc))
(<ucw:form
:action (setf (message self) acc)
(<:submit)
(<ucw:select
:accessor acc
(<ucw:option :value "One" "test one")
(<ucw:option :value "Two" "test two")))
(<ucw:a :action (answer-component self nil) "Go Back.")))
Regards.
--
B. Urban
More information about the bese-devel
mailing list