Mercurial > lada > lada-client
diff app/controller/grid/Probenzusatzwert.js @ 697:5b2cbc6bc39a
Display Error Message on Failure
author | Dustin Demuth <dustin@intevation.de> |
---|---|
date | Thu, 26 Mar 2015 17:23:13 +0100 |
parents | 8acb3123b46c |
children | 04f266eb2fd5 |
line wrap: on
line diff
--- a/app/controller/grid/Probenzusatzwert.js Thu Mar 26 16:26:24 2015 +0100 +++ b/app/controller/grid/Probenzusatzwert.js Thu Mar 26 17:23:13 2015 +0100 @@ -30,8 +30,17 @@ context.grid.store.reload(); context.grid.up('window').initData(); }, - failure: function() { - // TODO + failure: function(record, response) { + console.log(response); + console.log(record); + var json = response.request.scope.reader.jsonData; + if (json) { + if (json.message){ + Ext.Msg.alert(Lada.getApplication().bundle.getMsg('errmsgtitle') + +' '+json.message, + Lada.getApplication().bundle.getMsg(json.message)); + } + } } }); },