I think it would be nice to have a RadioButtonGroup object which would
hold RadioButtons belonging to the same group. It would also implement
a getSelected methold which would return currently selected
RadioButton.
An example of the code would be sth like.
FormPanel fp = new FormPanel();
RadioButtonGroup rbg = new RadioButtonGroup();
RadioButton rb1 = new RadioButton("group1", "button1");
RadioButton rb1 = new RadioButton("group2", "button2");
RadioButton rb1 = new RadioButton("group3", "button3");
rbg.add(rb1, rb2, rb3);
fp.add(rbg);
Window.alert(rbg.getSelected().getText())
or using UiBinder sth like:
<g:FromPanel>
<g:RadioButtonGroup>
<g:RadioButton name="group1" text="button1"></g:RadioButton>
<g:RadioButton name="group1" text="button2"></g:RadioButton>
<g:RadioButton name="group1" text="button3"></g:RadioButton>
</g:RadioButtonGroup>
</g:FormPanel>
Comments?
--
You received this message because you are subscribed to the Google Groups
"Google Web Toolkit" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-web-toolkit?hl=en.