Hi all,
I have the same problem. Here is an example:
textview.appendElement(new FormElement(ElementType.RADIO_BUTTON_GROUP,
"RBG"));
for(int i = 0; i < LIST.size(); i++)
{
textview.appendElement(new FormElement
(ElementType.RADIO_BUTTON,LIST.get(i),"RBG")); //(ElementType type,
String name, String defaultValue)
}
So everything is fine, the selection works great, but there is a
problem with the request.
-> getFormElement("RBG").getValue()
I know I've never set the value in the element, but there is no other
possible constructor to use. After I clicked on one radio button
(after using the other constructors), the page needs to be refreshed,
and there are no errors in my log.
I tried another way in the loop:
FormElement bla = new
FormElement(ElementType.RADIO_BUTTON,LIST.get(i),"RBG");
bla.setValue(LIST.get(i));
textview.appendElement(bla);
But the robot will give the first value in the radiobutton group.
The other "full" constructors requires a label. What is this label and
what is a verified input for it? I guess there could be the reason why
the page needs a refresh.
> FormElement(ElementType type, java.lang.String label, java.lang.String name, java.lang.String defaultValue, java.lang.String value)
Puh wall of text, I hope u'll get the gist.
So it gave me this here:
{'type':'LABEL','properties':{name=RBG, value=listelement_value,
label=, defaultValue=listelement_value}}
And it doesn't matter what radio button I've selected.
I don't know wheter the problem is in the API or in my
implementation.
The values in my list are not similar to each other, I checked after
the appendElement(FormElement).
{'type':'RADIO_BUTTON_GROUP','properties':{name=RBG,
value=po...@appspot.com, label=, defaultValue=po...@appspot.com}
After manipulating the Radiobuttons, the value and defautValue
changed. So I think there is a problem within the API getting the
value out of the buttongroup.
Have a nice day!