[Bese-devel] <:select
Clinton Ebadi
clinton at unknownlamer.org
Thu Jan 29 18:54:12 UTC 2009
George Tasso <getasso at gmail.com> writes:
> > (<:td
> > (<:select :name "supplier"
> > :accessor (getf (message self) :supplier)
>
> replace <:select with <ucw:select with <ucw:option tags as children.
> --
>
> Oh Yes that is what i am doing, sorry part of the code went missing :)
>
> the code should reads like this
> (<:td
> (<:select :name "supplier"
> (dolist (e supplier)
> (<:option :value (first e) (<as-html (second e)))
>
> The question is how can i make select boxes link to an object like it is done
> with input text box
>
> consider this example
>
> (defmethod render (self new-asset-input)
> (<ucw:input :type "text" :accessor (getf (message self) :code)))
(<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.
--
We live in a time of revolution
We swim the silent seas of sanity gone
More information about the bese-devel
mailing list