i get html from designer.
i have 2 radio buttons there.
I like to get data of radio button from GWT.
I need a reference of radioButton.
RadioButton rb = RadioButton.wrap(Dom.getElementById("abc"));
but error.
how can i solve this
RadioButton doesn't have a method called wrap() -- see the docs for RadioButton.
You may want to try SimpleRadioButton, which does have a wrap() -- docs.
Related
Hello I am trying to figure out if we can have a checkboxlist with child radio buttons?
Something like this
Is it possible in jstree? Does anyone have an example? When the checkbox is checked then we should show the children radiolist and if it is unchecked it should be hidden.
And also the data can be an AJAX call to get the data from the db.
I am making a simple webui in gwt and I want to implement the following functionality: once the user clicks a checkbox, a new text area with some wording appears. When the user unchecks the textbox, the textarea disappears. Can anyone show me the implementation on how to do this?
The CheckBox has a ValueChangeHander < Boolean >. You can use this to get the actual value, after the change.
There is also an example to get the value within the clickhandler.
http://www.gwtproject.org/javadoc/latest/com/google/gwt/event/logical/shared/HasValueChangeHandlers.html
Which is the event when you set the caret inside tinymce editor? For some reason, Click event works only for the first click. Is there any other event except click?
You could use the focus onActivate event. For a full list of possible tinymce events check out this page and have a look on the right side of the page, there is a list.
I am trying to develop a quiz application using LWUIT resource editor and am having great difficulty.
I have created two Forms 'GUI1' and 'GUI2' .
GUI1 displays the following:
A question(in the form of a TextField)
5 RadioButtons belonging to the same group
A Button which says 'OK'
GUI2 displays the following:
A TextField
A Button to go back to GUI1
Now the problem is:
Initially GUI1 is displayed. When the user chooses a RadioButton , I wish to know which RadioButton was selected. If that RadioButton was indeed the correct answer, then when the user clicks on the 'OK' Button on GUI1, I wish to display the text 'correct' in the TextField on GUI2 and then display the GUI2.
If the user chose the wrong answer, then I wish to display the text "Wrong" in the TextField on GUI2 and then display the GUI2.
How can this be done with resource editor? I am very foxed. Please help.
I wish to refer to the TextField on GUI2 when I am currently on GUI1. How can this be done with resource editor? Writing a manual code for all this would be very time consuming.
Ok I will try to explain the best I can.
When you design the first Form GUI1 the five RadioButtons must be in the same group. I don't know how to do that in the resource editor (I think there is a field called ButtonGroup in the RadioButton, but I can't remeber). What I would do is take the five RadioButton by code in the before method of GUI1 and add them to a ButtonGroup element.
With ButtonGroup you can know which element is selected using ButtonGroup.setSelectedIndex(). When you press the Button take this value and act as appropriate to the situation.
If you don't understand anything please tell me and I will try to help you.
Is not a hard thing to do. There must be a way to do it with the Resoruce editor but at the moment I donĀ“t know how.
As Shai mentioned, the best thing to do is to use listeners to set the "state" of the buttons on clicking them and when you move to the next form you just retrieve the state of the previous text field.
Manual code may actually be faster for you, do most of the UI in the resource editor and transfer to a form that is written manually. That way you have full control over your objects and transfer back into the GUI builder form when needed.
In B4A, it is possible to add radio buttons to a parent (or group them) - such as a panel, instead of using designer? I have used addview to add 3 radio buttons to a panel but no luck.
I was using designer and then decided to try 100% code but I am having no luck getting them to select properly
There should be no problem adding radio buttons with code. Can you post the code that you tried?