[Seaside] Re: RadioGroup problem
ken at kencausey.com
Tue Jun 6 15:31:00 UTC 2006
Ok, with another day I was able to find my own problem. For the record
and the education of others the first argument to
WAHtmlRenderer>>#radioButtonInGroup:selected:callback: should be the
result of a WAHtmlRenderer>>#radioGroup message. I really should have
noticed a smell when I was having (or so I thought) to specify a
'special' name, but I didn't. Secondly there is no argument sent to the
callback instead you should simply capture the value (in this case
'choice') that this particular radio button represents in the callback
closure. So something more like:
group := html radioGroup.
choices do: [ :choice |
html radioButtonInGroup: group
selected: (selectedChoice = choice)
choice = aChoiceQuestion default ifFalse: [
response recordChoice: choice
for: aChoiceQuestion ] ] ]
On Mon, 2006-06-05 at 18:03 -0500, Ken Causey wrote:
> I'm creating a set of radio buttons with (for example):
> html radioButtonInGroup: 'person'
> selected: (selectedChoice = choice)
> callback: [ :newChoice |
> self halt.
> newChoice = aChoiceQuestion default ifFalse: [
> response recordChoice: newChoice
> for: aChoiceQuestion ] ].
> This is within a WAFormDialog subclass. The callback never gets called.
> I've even tried it without specifying any buttons and just leaving the
> default call/answer support. What am I doing wrong?
> I should clarify that the code above is actually called from another
> class that is called from renderDialogOn: through some redirection. But
> it uses the same WAHtmlRenderer instance.
> P.S. Again I'm on #squeak although probably for only another 30 minutes
> or so tonight.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.squeakfoundation.org/pipermail/seaside/attachments/20060606/29976285/attachment.pgp
More information about the Seaside