How to clear dialog/xmlfragment content after close?

前端 未结 3 1166
闹比i
闹比i 2021-01-29 04:45

My dialog is defined as document:

  onOpenDialog : function () {
     var oView = this.getView();
     var oDialog = oView.byId(\"helloDialog\");
     // create         


        
3条回答
  •  面向向阳花
    2021-01-29 05:14

    I found that my error is caused by two reasons:

    1. Forgot to set undefined after destory()

    confirmCancel = function() {
       this._oAddAssignDialog.destroy();    
       this._oAddAssignDialog = undefined;
    }
    

    2. This dialog is used in table that is reused in different views, the tableview id should set to different.

    //view 1
    
    //view 2
    
    

    So that oView.getId() won't generate the same id in different controller.

提交回复
热议问题