Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GWT:how to get selected radio button's value

Tags:

gwt

I am create dynamic number of radio buttons in my GWT

      public void createTestList(ArrayList<Test> result){
    for(int i =0 ; i<result.size();i++){
                    int id = result.get(i).getTestId();
        RadioButton rd = new RadioButton("group", result.get(i).getTestType());
        verticalPanel.add(rd);
    }

where Test is my Entity class ..

I am getting 4 different types of radio buttons in my view , Now if i select any one of the radio button, first I need to get the id of the selected Radio button , how can this be possible ?

secondly How will i check that which one of the multiple radio button is selected ?

Thanks

like image 246
user1226162 Avatar asked Nov 22 '25 11:11

user1226162


1 Answers

You need to check public java.lang.Boolean getValue() on each radio button whether it is checked or not.

like image 157
Seshagiri Avatar answered Nov 24 '25 05:11

Seshagiri