javascript - How can I destroy a fragment (or a view)? -


i have created fragment:

var dialogfrafment = sap.ui.xmlfragment(     "appintra.fragment.dialog",     this.getview().getcontroller() // associate controller fragment             ); this.getview().adddependent(dialogfrafment); sap.ui.getcore().byid("idmailreport").setvalue(sap.ui.getcore().getmodel("mailuser"));  dialogfrafment. dialogfrafment.open(); 

how can delete after complete?

store dialogfrafment in controller.

if(!this.dialogfrafment) {     this.dialogfrafment = sap.ui.xmlfragment(         "appintra.fragment.dialog",         this.getview().getcontroller() // associate controller fragment                 );     this.getview().adddependent(dialogfrafment);     sap.ui.getcore().byid("idmailreport").setvalue(sap.ui.getcore().getmodel("mailuser")); }   this.dialogfrafment.open(); 

destroy fragment in onexit function of controller.

onexit: function() {     if (this.dialogfrafment) {         this.dialogfrafment.destroy(true);     }  }, 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -