PDA

View Full Version : handling exception in form submit, visible msgbox is removed



mdissel
19 Jan 2010, 5:49 AM
When you catch exceptions at Ext.direct level by this code

Ext.Direct.on('exception', function(e) {
Ext.Msg.show({
title:'Woops!',
msg: e.message,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
});

The msgbox is not shown, because in the afterAction of the submit action the dialogbox is hidden.

Suggestion:
Prevent bubbling the exception to other components by returning false from Ext.Direct exception event..

(see http://www.extjs.com/forum/showthread.php?t=72245&page=16 for more discussion around this issue)

ldonofrio
6 Jul 2010, 11:59 AM
i've solved this executing the Msg.show in a DelayedTask