I am using GWT (Google Web Toolkit) 1.5.3 et GXT (ExtJS) 1.2 I just want to create a simple form with some switches created after the RPC call to get some values
the code:
final FormPanel simple = new FormPanel(); simple.setFrame(true); simple.setWidth(350); simple.setHeaderVisible(false); DateField date = new DateField(); date.setFieldLabel("Date"); simple.add(date); ListFluxServiceAsync service = (ListFluxServiceAsync) GWT.create(ListFluxService.class); ServiceDefTarget target = (ServiceDefTarget)service; String url = GWT.getModuleBaseURL() + "flux.rpc"; target.setServiceEntryPoint(url); final RadioGroup radioGroup = new RadioGroup("RadioGroup"); radioGroup.setFieldLabel("Flux"); radioGroup.setOrientation(Orientation.VERTICAL); service.getAllFlux(new AsyncCallback<List<FluxModelData>>(){ public void onFailure(Throwable caught) { GWT.log("flux.rpx::onFailure", caught); MessageBox.alert("what?", "onFailure :" + caught.getMessage(), null); } public void onSuccess(List<FluxModelData> result) { Iterator<FluxModelData> it = result.iterator(); while ( it.hasNext() ){ FluxModelData fmd = it.next(); Radio radio = new Radio(); radio.setName("flux"); radio.setValue(true);
My problem is that I cannot set / get the value of the switch. If I try setRawValue ("xxxxxxx"), I will get some null errors, and setting setValue (boolean) works, but I was expecting to get a radio value, not a label value.
Any idea?
source share