我sap.m單選按鈕組在我view.xml用SAP UI5單選按鈕組
<m:RadioButtonGroup valueState="" select="changeRegion()">
<m:buttons>
<m:RadioButton id="rb-S" text="S"/>
<m:RadioButton id="rb-MW" text="MW"/>
<m:RadioButton id="rb-NE" text="NE"/>
<m:RadioButton id="rb-W" text="W"/>
</m:buttons>
</m:RadioButtonGroup>
在我Controller.js
changeRegion: function(e){
console.log(e.getParameter('selectedIndex'));
}
我能夠訪問選定的指標單選按鈕。有什麼辦法可以獲得所選單選按鈕的文字?
近日獲悉替代到'sap.ui.getCore()。byId(this.createId(「radioButtonGroup」))'this.getView()。byId(「radioButtonGroup」)''。我讀過sap.ui.getCore()不推薦 –