Jul 26, 2011, 7:30 AM
[CLOSED] Server Exception in RowEditor
Hi,
In a maintenance view of our MVC application we are using a RowEditor. When we edit a row and accept changes RowEditor hides, but we need to perform data validation according to our domain logic. So, when a validation exception is thrown from server side, user changes are invalid but as RowEditor is hidden, invalid data is shown in the row.
Is possible to avoid this behaviour and remained RowEditor opened since server side code success?
At the moment, we are using more or less this client code after accept changes:
In a maintenance view of our MVC application we are using a RowEditor. When we edit a row and accept changes RowEditor hides, but we need to perform data validation according to our domain logic. So, when a validation exception is thrown from server side, user changes are invalid but as RowEditor is hidden, invalid data is shown in the row.
Is possible to avoid this behaviour and remained RowEditor opened since server side code success?
At the moment, we are using more or less this client code after accept changes:
Ext.Ajax.request({
url: '/Controller/Save/',
method: 'POST',
params: Ext.urlEncode(store.data),
success: function (result, request) {
var jsonResult = Ext.decode(result.responseText);
if (jsonResult.success == true) {
//Hide RowEditor here and perform some other stuff
}
},
failure: function (result, request) {
Ext.Msg.show({
title: 'Exception',
msg: Ext.decode(result.responseText).extraParams.msg,
buttons: Ext.Msg.OK,
icon: Ext.Msg.ERROR
});
}
});
Last edited by Daniil; Aug 02, 2011 at 1:54 PM.
Reason: [CLOSED]