我目前正試圖實現與UI5條件的路由...SAP UI5的RadioButtonGroup如果選擇
這是我view.xml用:
<VBox class="sapUiSmallMargin">
<RadioButtonGroup id="bgroup" columns="2" class="sapUiMediumMarginBottom">
<buttons>
<RadioButton id="RB1" text="start with segmentation"/>
<RadioButton id="RB2" text="start with target group"/>
</buttons>
</RadioButtonGroup>
</VBox>
<m:HBox>
<m:items>
<m:StandardTile title="End-of-Warranty" infoState="None" icon="sap-icon://car-rental" press="_onStandardTilePress"/>
<m:StandardTile title="End-of-Leasing" infoState="None" icon="sap-icon://car-rental"/>
</m:items>
<m:layoutData/>
</m:HBox>
這就是我的js文件正在現在:
sap.ui.define([
"sap/ui/core/mvc/Controller"
], function(Controller) {
"use strict";
return Controller.extend("wizard.controller.page1", {
_onStandardTilePress: function (oEvent) {
var oapp = sap.ui.getCore().byId("dcw");
oapp.to("idpage2");
}
});
}
)
目前,它只是導航到idpage2,如果您單擊StandardTile End of of Warranty。 RadioButtons沒有被識別,沒有條件。
我想要做的:只有導航如果選擇ID爲RB1單選按鈕來idpage2。如果選擇了RB2,請導航到idpage3。
有什麼想法?謝謝
此制定了罰款,謝謝! –
太棒了!很高興聽到它!您可以將其標記爲解決方案,以便更容易地找到具有相同標誌的其他人的解決方案 –