-3
ビュー設定ダイアログで「OK」ボタンのみを表示する必要があります。出来ますか?私は何をすべきか?表示設定ダイアログで「キャンセル」ボタンを非表示にする方法は?
ビュー設定ダイアログで「OK」ボタンのみを表示する必要があります。出来ますか?私は何をすべきか?表示設定ダイアログで「キャンセル」ボタンを非表示にする方法は?
ボタンの1つを非表示にするつもりはないと思いますが、これを回避策で修正できます。あなたのgetDialog機能で
が偽
_getDialog : function() {
if (!this._oDialog) {
this._oDialog = sap.ui.xmlfragment("sap.m.sample.ViewSettingsDialog.Dialog", this);
this.getView().addDependent(this._oDialog);
this._oDialog._dialog.mAggregations.endButton.setVisible(false); //set cancel button invisible
}
return this._oDialog;
},
handleOpenDialog: function() {
this._getDialog().open();
}
に、ボタンの可視属性を設定するあなたは、IDでこれを行うか、ダイアログオブジェクトを介して直接ボタンにアクセスすることができます直接 :
this._oDialog._dialog.mAggregations.endButton.setVisible(false); // assuming your dialog was initiated with: this._oDialog
Id:
sap.ui.getCore().byId("Your_View_Dialog_ID-cancelbutton").setVisible(false);
キャンセルボタンID consiあなたの "viewsettingsdialog-id" + "-cancelbutton"のIDの
私の答えに関する質問は、以下のコメントを追加してください。
特に問題がありますか?あなたの作品のいくつかを見せてください。 – Ted