Reputation: 43
What kind of value should .setSelectedButton
be given in order to select a specific Button within a RadioButtonGroup
Construct.
What I tried:
sap.ui.getCore().byId("RadioButtonGroup").setSelectedButton("idOftheButton")
Expected Result: It selects this specific Button
Actual Result: Error
Upvotes: 0
Views: 837
Reputation: 7250
According to the documentation, the parameter for setSelectedButton
is the sap.m.RadioButton
object itself, so depending on how you register and declare everything it's something closer to:
var button = sap.ui.getCore().byId("idOftheButton"); //find the button
sap.ui.getCore().byId("RadioButtonGroup").setSelectedButton(button);
https://sapui5.netweaver.ondemand.com/sdk#/api/sap.m.RadioButtonGroup/methods/setSelectedButton
Upvotes: 1