on 09-30-2015 10:05 AM
Hi ,
In radio button group i have to get selected value and store it in to x for back-end purpose
i tried using below link
and my code is
in view.xml
<RadioButtonGroup id="rbgid" columns="1" width="500px" class="sapUiMediumMarginBottom" select="radiobuttonselect">
<buttons>
<RadioButton id="RB1" text="Put in process" />
<RadioButton id="RB2" text="PostPone" />
<RadioButton id="RB3" text="Complete" />
<RadioButton id="RB4" text="Delete" />
</buttons>
</RadioButtonGroup>
and in Controller.js
radiobuttonselect: function(evt) { |
index = evt.getParameters().selectedIndex; }, test : function(){ | |
if(index==0) |
{
var x= sap.ui.getCore().byId("RB1").getSelected().getText();
alert(x);
}
if(index==1)
{
var x= sap.ui.getCore().byId("RB2").getSelected().getText();
alert(x);
}
if(index==2) |
{
var x= sap.ui.getCore().byId("RB3").getSelected().getText();
alert(x);
}
if(index==3)
{
var x= sap.ui.getCore().byId("RB4").getSelected().getText();
alert(x);
}
}, |
i'm getting error index part.
thanks and regards
Venkat
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Venkatachala,
I used your code here. JS Bin - Collaborative JavaScript Debugging
Regards,
Sai Vellanki.
Hi Venkatachala,
If that is your requirement, why don't you use model concept here? Check this sample: JS Bin - Collaborative JavaScript Debugging
Regards,
Sai Vellanki.
User | Count |
---|---|
82 | |
10 | |
10 | |
9 | |
6 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.