[Seaside] radioButton #value and group callback
Nick Ager
nick.ager at gmail.com
Sun Apr 18 10:26:16 UTC 2010
Hi,
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?
Thanks
Nick
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/seaside/attachments/20100418/1657c55f/attachment-0001.htm
More information about the seaside
mailing list