[Seaside] Suggestions for WAHtmlRenderer

Avi Bryant avi at beta4.com
Sun Aug 22 17:00:05 CEST 2004

On Aug 22, 2004, at 4:36 PM, David Röthlisberger wrote:

> For instance, I would like to have a possibility to create a multiple 
> select
> list (<select multiple="multiple">). So far this is not implemented, I 
> tried
> to implement it myself, but it seems to me that the only way to do 
> that is
> to add hidden input fields as well, like for the check boxes. The 
> problem is
> that if there are more than one options selected in such a multiple 
> list,
> then only the callback of the first selected option is evaluated, but 
> not
> the callbacks of the other selected options. Or is there an easy way to
> change that behaviour?

Yes, multiple select lists have been a glaring hole in every version of 
Seaside (in fact, since before Seaside was called Seaside).  I've 
succesfully avoided implementing them for several years now, but I knew 
someone would call me on it eventually :).
Anyway, as you've discovered, they're not trivial to implement; in 
fact, it's not even obvious what a decent interface would be.  Should 
the selection/callback be passed collections instead of individual 
objects?  Or should the callback be invoked multiple times?  Do we need 
both?  Are there some other options that would be easier (collection of 
selected + collection of unselected?)

> Then it would also be great if there are some messages to create radio
> buttons or check boxes, that take a collection (like the message for 
> the
> single select list does) as argument, so if I want to have a radio 
> group of
> some elements, I can simply say: Create me a radio button for every 
> element
> in my collection and put them together to a radio group. So far I have 
> to
> create a radio group first and then I can create for every element in 
> my
> collection a radio button in this group. This can be easy done in one 
> single
> message directly in WAHtmlRenderer. The same is true for a collection 
> of
> check boxes, IMO.

Yup; the only question is how to separate them.  Probably the cleanest 
is to create an unordered list, with one list item for each 
checkbox/radio, and the text in a corresponding <label> tag?
A collection of radio buttons should have the same basic interface as a 
single select list; a collection of checkboxes should be the same as a 
multiselect list.  So we have to decide how that should look, first.

Anyway, I'll put these all on my TODO list, but patches are also 


More information about the Seaside mailing list