[Seaside] dynamic selection - liveCallback question

Florian Minjat flo.minjat at free.fr
Tue Jun 14 10:58:35 CEST 2005


Hi,

I would like to have two select on the same page, and the content of
the second one would depend on the content of the first one
dynamicaly. I tried something with the liveCallback:

renderContentOn: html
   html form: [
     html selectFromList: #(a b c)
       selected: #a callback: [:sel] labels: [:ea | ea asString]
       liveCallback: [:sel :h |
         selected := sel. self renderContentOn: h].
     ].

     html form: [
       html selectFromList: ((selected = #a) ifTrue: [ #(aa bb cc)]
ifFalse: [ #(ba bb bc) ])
         selected: #aa callback: [:sel] labels: [:ea | ea asString]
     ].

where selected is an instance variable. But it's not working, the
variable is well changed, but I have to refresh the page in order to
make the second select change.

I could not find any documentation on how to use the liveCallback for
changing something different from a span.

Does someone have an idea on how to do this?

Florian




More information about the Seaside mailing list