[Seaside] Calling component from radio button callback - problems

squeakman squeakman at gmail.com
Wed Feb 29 19:13:13 UTC 2012


I am having trouble calling my TestComponent using "self call: 
TestComponent" from the callback of a radio button.

The following code displays two radio buttons. When I click on one of 
the buttons, the callback: is triggered and 
TestComponent>>renderContentOn: is called.  But the results of rendering 
TestComponent is not displayed.

What am I doing wrong?

Thanks for any help you can provide,


---- code follows ----

MyFoo>>renderContentOn: html

   (html form)
     id: #foo;
     with: [self setupRadioButtonsOn: html]

MyFoo>>setupRadioButtonsOn: html

   | choices |
   choices := Array with: 'One' with: 'Two'.

   (html radioGroup)
     callback: [:v | self call: TestComponent new];
       [:group |
         choices do:
           [:c |
             html label:
              [(html radioButton)
                group: group;
                onChange: (html scriptaculous updater triggerForm: #foo);
                value: c.
                html text: c].
             html break]]

More information about the seaside mailing list