on 08-31-2015 7:42 PM
Hello, In the data model it has an attribute called condition, it can return "AND" or "OR", based on that I have to select the correspondent radio button: Just to make it clear, if I was doing that with Select control, this would be the code: Now I want to do something similar with radiobutton, How Do I do that? help me, thanks.
ops... I dont know how to add source code here, so I removing the "<" and">"
I want to do this:
Select selectedKey="{newModel>/condition}"
core:Item key="AND" text="AND"/
core:Item key="OR" text="OR"/
/Select
but with radiobutton:
RadioButton groupName="condition" text="AND"/
RadioButton groupName="condition" text="OR" /
thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Kedar, the solution you gave me it works to display the information, but id does not work when I am saving the information.
the way it is, when the user edit and click on save, in the controller, before sending it to the backend, it still has to get the radio buttons and verify which one is selected and set "and/or" value into the mymodel>/condition.
I want the same behavior as the "select" example, I don't want to do extra steps in the controller, when saving it. thanks.
Hi Cristiano,
Hope this helps - JS Bin - Collaborative JavaScript Debugging
I have used a JSON model to store the text of the RadioButton Selected and on hitting Save I am reading the same to fill in the Text. In your case we can read the JSON model and pass it into the oData model entity.
User | Count |
---|---|
98 | |
11 | |
11 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.