I got a headache in which it turns out how to extract the values of the gwt radio buttons on the server side.
Here is my form of UiBinder:
<g:FormPanel ui:field="form"><g:VerticalPanel ui:field="fruitPanel">
<g:RadioButton name="fruit">apple</g:RadioButton>
<g:RadioButton name="fruit">banana</g:RadioButton>
<g:SubmitButton>Submit</g:SubmitButton> ...
This is how I initialize the form:
form.setAction("/submit");
form.setMethod(FormPanel.METHOD_POST);
So, although I would have to do this on a servlet:
fruit = req.getParameter("fruit")
But of course this does not work, the fruit parameter does not exist: /
Edit: Ok I get the parameter, but it is always "on"
I also tried adding a switch in java with:
RadioButton rb0 = new RadioButton("fruit", "apple");
RadioButton rb1 = new RadioButton("fruit", "banana");
fruitPanel.add(rb0);
fruitPanel.add(rb1);
Edit: this is a GWT problem : Problem 4795
source
share