hossaindoula
27 Jan 2010, 12:23 PM
I have a CheckBoxGroup and under that group I have multiple CheckBoxes... How can I get the checked value(s)??? I have done something like this:
final CheckBoxGroup chkGrp = new CheckBoxGroup();
chkGrp.setFieldLabel("Section");
CheckBox chkBxFld = new CheckBox();
chkBxFld.setBoxLabel("Family Section");
CheckBox chkBxFld1 = new CheckBox();
chkBxFld1.setBoxLabel("Single Section");
chkGrp.add(chkBxFld);
chkGrp.add(chkBxFld1);
fieldSet.add(chkGrp);
String family_single = "";
List<CheckBox> family_single_check_list = chkGrp.getValues();
Iterator itr = family_single_check_list.iterator();
while(itr.hasNext()){
Object element = itr.next();
family_single += element.toString() + "/";
}
The problem I am facing is the in the string varible "family_single" the CheckBox widget is also coming... Why the CheckBox comes inside a String??? Is there any other way to return the checked value of CheckBoxGroup in EXT-GWT(GXT)???
final CheckBoxGroup chkGrp = new CheckBoxGroup();
chkGrp.setFieldLabel("Section");
CheckBox chkBxFld = new CheckBox();
chkBxFld.setBoxLabel("Family Section");
CheckBox chkBxFld1 = new CheckBox();
chkBxFld1.setBoxLabel("Single Section");
chkGrp.add(chkBxFld);
chkGrp.add(chkBxFld1);
fieldSet.add(chkGrp);
String family_single = "";
List<CheckBox> family_single_check_list = chkGrp.getValues();
Iterator itr = family_single_check_list.iterator();
while(itr.hasNext()){
Object element = itr.next();
family_single += element.toString() + "/";
}
The problem I am facing is the in the string varible "family_single" the CheckBox widget is also coming... Why the CheckBox comes inside a String??? Is there any other way to return the checked value of CheckBoxGroup in EXT-GWT(GXT)???