RadioButton ClickListener under Firefox not de-selecting

23 views
Skip to first unread message

dbexternal

unread,
Nov 27, 2007, 7:27:33 AM11/27/07
to Google Web Toolkit
I've got a series of 4 RadioButton objects that control the display of
panels within a deck. Works fine within hosted mode and under IE.
However, under Firefox, it works, i.e. the panels are displayed based
on the Radio Button selected, the prior RadioButton instance is not
'de-selected'. Anyone ever run into this - my code is below?

Thanks!


public class ListeningRadioButton extends RadioButton {

private DeckPanel deckPanel;
private int deckIndex;

public ListeningRadioButton(String group, String label, DeckPanel
deck, int deckIndex) {
super(group, label);
this.deckPanel = deck;
this.deckIndex = deckIndex;
this.addClickListener(new RBClickListener());
this.setName(group + ":" + label);
}

class RBClickListener implements ClickListener {

public void onClick(Widget sender) {
deckPanel.showWidget(deckIndex);
}

}
}

Peter Blazejewicz

unread,
Nov 28, 2007, 8:41:33 AM11/28/07
to Google Web Toolkit
hi,

try my answer here,
http://groups.google.com/group/Google-Web-Toolkit/browse_thread/thread/97fc6635fe80d5f4/2ba4315f7e5bb466?lnk=gst&q=RadioButton#2ba4315f7e5bb466
maybe that is related what are your group/widgets labels/names

regards,
Peter

Eric Ayers

unread,
Dec 2, 2007, 6:16:46 AM12/2/07
to Google-We...@googlegroups.com
The behavior you are describing sounds like each radio button is in its own group.
 
I think the problem is simply that 'setName()' changes the radio button group.  In your constructor for ListeningRadioButton() you construct what appears to be a unique name for each button.  
 
 
But if this is the case, the question should be why IE isn't "working" (moving the buttons into separate groups on call to setName())
 
-Eric.
--
Eric Z. Ayers - GWT Team - Atlanta, GA USA
http://code.google.com/webtoolkit/
Reply all
Reply to author
Forward
0 new messages