My dialog is defined as document:
onOpenDialog : function () {
var oView = this.getView();
var oDialog = oView.byId(\"helloDialog\");
// create
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.