Seaside radioButton bug?

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Seaside radioButton bug?

Louis LaBrunda
Hi All,

I'm back to playing with Seaside but seem to have come across a bug with radioButtons.  If I generate them one at a time (a few within a group) all is well.  But when I try to generate them from within a loop (running a collection) within their own group all the radioButtons end up with the same callback block (the last one).

Each callback block has the same form as the ones generated outside a loop.  They call the same method within the same object but pass a different parm.

The generated HTML looks good.  The dictionary that contains the callback blocks appears to entries for each radioButton but the callback blocks look to be identical for each radioButton generated from within a loop.

Any ideas for a fix or workaround are greatly appreciated.  Thanks in advance.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Aw: Seaside radioButton bug?

jtuchel
Hi Lou,

can you provide a little Application? I try to avoid radioButtons on the web, but I remember using them in Seaside 2.7 on VisualWorks, and they need some special handling (creation of a radio button group if I remember correctly).

Joachim

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: Aw: Seaside radioButton bug?

Louis LaBrunda
Hi Joachim,

Thanks for the reply.  I have solved the problem or at least circumvented it.  I have a situation where I have a variable number of people that I want to list as radio buttons in a table say five columns wide and however deep.  I know about grouping radio buttons is a group and in this case I have two groups and I'm sure I did that part right.

I worked up the code to run through a collection of the people and put radio buttons in each cell of the table in the rows and columns I wanted.  That worked fine, displayed fine and the generated HTML looked good.. Including the names (used to identify the group) and values (used to identify the radioButton) and display of the radio button.

But back in Seaside in the dictionary that maps the names/values to callback blocks has a problem because all the callback blocks for the radioButtons defined in the table (I have other in another group not in a table) have the callback block of the last radioButton defined.  I fear this is a scope/block context problem.

I circumvented it by creating an ordered collection of ordered collections (one for each row) that contains the people.  Then I ran this collection to create the table.

The reason I'm sure my code was good is that the created radioButtons displayed correctly.  The display text was added to the radioButton at the same time the callback block was created and from the same object.  I can't see any way I could have created the same callback block for all radioButtons.

Lou

--
You received this message because you are subscribed to the Google Groups "VA Smalltalk" group.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/va-smalltalk?hl=en.