[Seaside] select tag on forms

Avi Bryant avi at beta4.com
Thu Jun 12 13:40:52 CEST 2003


On Thu, 12 Jun 2003, Brian Brown wrote:

> I would like to build a couple method modelled after WAHtmlBuilder>>list: and
> list:do: for building selection lists.. I was thinking one would just take a
> collection of items to be displayed and another would take two collections,
> one with the display items and one with separate values.....

<snip>
> Is there a better way to think about this? Or is there already some mechanism
> for doing this in seaside?

There are methods that basically do this in HtmlRenderer already.  I may
be wrong about the exact names, but it's something like
#selectFromList:selected:callback: and
#selectFromList:selected:callback:labels:.

If you wanted value/label arrays, you would have to do something like

selectFromLabels: labelColl values: valueColl selected: anObject callback:
aBlock

self
  selectFromList: valueColl
  selected: anObject
  callback: aBlock
  labels: [:ea | labelColl at: (valueColl indexOf: ea)]



More information about the Seaside mailing list