[Seaside] Checkbox attributes
C. David Shaffer
cdshaffer at acm.org
Thu Jun 24 16:40:52 CEST 2004
The use of hidden fields around checkboxes in
WAHtmlRendered>>checkboxWithValue:callback:confuses attribute settings.
That is, if you set attributes then invoke that method, your attributes
are placed on a hidden field and not the checkbox itself. I can't
imagine a situation in which that is what you wanted. I propose
changing that method to something like:
checkboxWithValue: aBoolean callback: callbackBlock
| value originalAttributes |
value _ ValueHolder new.
originalAttributes _ attributeBuffer.
attributeBuffer _ nil.
self
hiddenInputWithCallback: [value contents: false].
attributeBuffer _ originalAttributes.
self attributeAt: 'checked' put: aBoolean.
self
valueInputOfType: 'checkbox'
value: 'true'
callback: [value contents: true].
callbackBlock fixTemps.
self
hiddenInputWithCallback: [callbackBlock value: value contents]
I'm sure Avi will give something better but I hate complaining without
supplying an attempt at a solution :-)
David
More information about the Seaside
mailing list