2016-09-19 12 views

答えて

0

ボタンの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の

私の答えに関する質問は、以下のコメントを追加してください。

関連する問題