Support Forum
I just tried this approach on our advanced example (4.x) and it works well (I'm not destroying stores).
Then I open example and try in console:
I tried quick drag/drop/resize, add constraint, didn't see any exceptions. Have you added any listeners somewhere?
onLocaleEstablished : function (lc) {
var me = this;
me.currentLocale = lc;
me.createApp();
},
createApp : function () {
var me = this;
var crud = me.crudManager = new Gnt.examples.advanced.crud.CrudManager({
taskStore : new Gnt.examples.advanced.store.Tasks({
calendarManager : new Gnt.examples.advanced.store.Calendars()
})
});
// Creating undo/redo manager
var undo = me.undoManager = new Gnt.data.undoredo.Manager({
transactionBoundary : 'timeout',
stores : [
me.crudManager.getCalendarManager(),
me.crudManager.getTaskStore(),
me.crudManager.getResourceStore(),
me.crudManager.getAssignmentStore(),
me.crudManager.getDependencyStore()
]
});
me.mainView = me.getMainViewportView().create({
viewModel : {
type : 'advanced-viewport',
data : {
crud : crud,
undoManager : undo,
taskStore : crud.getTaskStore(),
calendarManager : crud.getCalendarManager(),
currentLocale : me.currentLocale,
availableLocales : me.getLocalesStore()
}
},
crudManager : crud,
undoManager : undo,
startDate : me.startDate,
endDate : me.endDate
});
},
destroyApp : function () {
var me = this;
me.mainView.destroy();
me.crudManager.destroy();
me.undoManager.destroy();
}
app = Gnt.examples.advanced.getApplication();
app.destroyApp();
app.createApp();