Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

state of radio button.

 
geetha nagarajan
Ranch Hand
Posts: 94
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Checkbox cb1 and cb3 have their state set to true.
At //1 : Checkbox cb3 is set to belong to CheckboxGroup cbg.
When,this is compiled and run,they appear as radio buttons,but both cb1 and cb3 are selected.
Are they not radiobuttons in the true sense?
Is it necessary to set the Checkbox to a CheckboxGroup in it's constructor itself ,to ensure mutually exclusive nature?
Pl.clarify.
Thanks.
 
Francisco A Guimaraes
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
geetha, I changed your code a little bit:

now it only shows "lotus" as selected, but if you select any of the other 2, "lotus" is still selected, this was the best I could do. I´┐Żll let you know if I discover a better solution or why does this happen.
Francisco
 
geetha nagarajan
Ranch Hand
Posts: 94
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Francisco.
So,i guess for all practical purposes to ensure mutually exclusive nature for radiobutton,the Checkbox should be set with the reqd. CheckboxGroup in the constructor itself.
 
Swati Gupta
Ranch Hand
Posts: 106
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No, we can set the group using setCheckboxGroup().The above code should have the last one as selected checkbox.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic