[Seaside] radioButton #value and group callback
jfitzell at gmail.com
Sun Apr 18 18:21:16 UTC 2010
I don't recall the original discussion but this was added a few months ago
and was needed for something. What you need is for the last line to be
ifTrue: [ super value: (group callbackValue: anObject) ]
ifFalse: [ super value: anObject ]
Is that right?
On Sun, Apr 18, 2010 at 11:26 AM, Nick Ager <nick.ager at gmail.com> wrote:
> I'm defining set of radio buttons in Seaside 3. My initial attempt was:
> html radioGroup
> selected: 6;
> with: [ :group |
> optionDescriptions doWithIndex: [:each :index|
> html radioButton
> group: group;
> value: index;
> title: each
> This generated a set of radio buttons without the "value" attribute. I
> found the cause in:
> WARadioButtonTag>>value: anObject
> group isNil
> ifTrue: [ ^ super value: anObject ].
> group hasSelection
> ifTrue: [ self selected: (group isSelected: anObject) ].
> group hasCallback
> ifTrue: [ super value: (group callbackValue: anObject) ]
> so the fix was to define a callback for radioGroup. As I'm using Ajax to
> read the value from the radio buttons, I defined an empty callback. I think
> I can see the rational for this line of code, but in my case it
> was counterintuitive.
> Is the check for the callback really necessary? Could it be removed?
> seaside mailing list
> seaside at lists.squeakfoundation.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the seaside