アプリケーションを作成していSAP Fiori
ます。入力値を取得する必要があるという点input
で、ボックスに入っています。dialog
でダイアログを定義していfragment view
ます。
for 入力を指定しようとすると、id
ID が重複する要素を追加するとエラーが発生します。
------ フラグメント ビュー------
<core:FragmentDefinition
xmlns="sap.m"
xmlns:core="sap.ui.core"
xmlns:app="http://schemas.sap.com/sapui5/extension/sap.ui.core.CustomData/1">
<Dialog title="Title" class="sapUiPopupWithPadding" >
<content>
<HBox>
<items>
<Text text="Name"></Text>
<Input value="" id="myId" > </Input>
</items>
</HBox>
</content>
<beginButton>
<Button text="Ok" press="DialogButton" />
</beginButton>
</Dialog>
---コントローラーコード---
DialogButton:function(oEvent) {
var myIdValue=sap.ui.getCore().byId("myId").getValue();
console.log("ID Value :::"+ myIdValue);
oDialogFragment.close();
}