Quantcast
Channel: SCN : All Content - SAPUI5 Developer Center
Viewing all articles
Browse latest Browse all 6178

how to bind the data for radiobutton group in XML view?

$
0
0

Hi Team,

 

Am unable to bind the data for radiobuttons, am using XML view,

I have tried like below, but am getting errors.

 

<RadioButtonGroup id="rbg_id" items="{oDataRateAmnt>/SlabTypes}"  columns="2" selectedIndex="{oHeader>/rateAmntCode}"  >

     <core:Item id="IdItems" key="{oDataRateAmnt>SlabTypeCode}" text="{oDataRateAmnt>SlabTypeDesc}"></core:Item>

</RadioButtonGroup>

 

Binding model is:

var oModelData = new sap.ui.model.json.JSONModel(aData);

this.getView().byId("rbg_id").setModel(oModelData, "oDataRateAmnt");

this.getView().byId("rbg_id").bindAggregation("items","oDataRateAmnt>/", that.getView().byId("IdItems"));

 

error--> Uncaught Error: "Element sap.ui.core.Item#idschemecrt--IdItems" is not valid for aggregation "buttons" of Element sap.m.RadioButtonGroup#idschemecrt--rbg_id

 

same error if am including buttons tag,

<buttons>

   <core:Item id="IdItems" key="{oDataRateAmnt>SlabTypeCode}" text="{oDataRateAmnt>SlabTypeDesc}"></core:Item>

   </buttons>

 

I have followed this thread also

mutiple model bind to RadioButtonGroup

 

but am unable to bind for XML

 

please suggest me.

 

Thanks,

Preethi


Viewing all articles
Browse latest Browse all 6178

Trending Articles