adding element with duplicate id

后端 未结 3 621
情书的邮戳
情书的邮戳 2021-01-15 07:05

I am creating a SAP Fiori application. I have input in a dialog box in that I have to fetch the input value. I am defining the dialog

3条回答
  •  野的像风
    2021-01-15 07:50

    You create a new dialog fragment instance every time you need to open the dialog . This will cause the duplicated ID issue. Please keep a dialog fragment instance in your controller.

    Please see the sample code:

    DialogButton:function(oEvent) {
       if(!this.oDialog) {
          this.oDialog =  sap.ui.xmlfragment("you.dialog.id", this );
       }
       this.oDialog.open();
    }
    

提交回复
热议问题