PDA

View Full Version : Radios and readonly bug



bogusky
10 Jan 2011, 1:09 AM
public class GxtTest implements EntryPoint {

public void onModuleLoad() {

RadioGroup radioGroup = new RadioGroup();
radioGroup.setOrientation(Orientation.VERTICAL);
radioGroup.setFieldLabel("label1");

for (int i=1; i<=5; i++) {
createRadio(i, radioGroup);
}

FormPanel panel = new FormPanel();
panel.add(radioGroup);
panel.setSize(400, 500);
RootPanel.get().add(panel);
}

private void createRadio(int index, RadioGroup group) {
Radio radio = new Radio();
radio.setReadOnly(true);
radio.setBoxLabel("boxlabel" + index);
radio.setValue(false);
group.add(radio);
}
}
User can check radio only when all radios are initially false.
Its working as expected when 1 radio from group is true.
i need workaround because tomorrow is release time.
thank you .