[Bese-devel] <:select

George Tasso getasso at gmail.com
Fri Jan 30 00:38:33 UTC 2009


On Fri, Jan 30, 2009 at 10:55 AM, <burban at opopop.net> wrote:

> 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.")))
>

lol,

Its probably lack of understanding on my part of the defcomponent macro.
What i ideally want to have in defcomponent for a form is to specify slots
corresponding to forms fields. I don't know how to do that, so i used the
existing message slot to store all my form fields as property list.

Sorry I am not paying attention to detail, working example is the way i
learn staff. What I'd appreciate is an example of collecting customer detail
: Name, Adress1, Address2, Telephone, Email, Fax from  a form put it in a
object which i can populte a database with.

Thank you very much
Tank yu tumas, as we say in bislama (local dialect) :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/bese-devel/attachments/20090130/26cc536c/attachment.html>


More information about the bese-devel mailing list