comparison app/controller/Proben.js @ 86:eb40b74f871a

Reload the store after the probe was created or edited.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 11 Jun 2013 11:43:14 +0200
parents eb8a7d3cca89
children 95b08b96f5c9
comparison
equal deleted inserted replaced
85:079f99229eff 86:eb40b74f871a
46 var id = record.get('probeId'); 46 var id = record.get('probeId');
47 var view = Ext.widget('probenedit', {modelId: id}); 47 var view = Ext.widget('probenedit', {modelId: id});
48 console.log("Loaded Probe with ID " + record.getId()); //outputs ID 48 console.log("Loaded Probe with ID " + record.getId()); //outputs ID
49 }, 49 },
50 createSuccess: function(form, record, operation) { 50 createSuccess: function(form, record, operation) {
51 // Reload store
52 var store = this.getProbenStore();
53 store.reload();
51 var win = form.up('window'); 54 var win = form.up('window');
52 win.close(); 55 win.close();
53 }, 56 },
54 createFailure: function(form, record, operation) { 57 createFailure: function(form, record, operation) {
55 Ext.MessageBox.show({ 58 Ext.MessageBox.show({
58 icon: Ext.MessageBox.ERROR, 61 icon: Ext.MessageBox.ERROR,
59 buttons: Ext.Msg.OK 62 buttons: Ext.Msg.OK
60 }); 63 });
61 }, 64 },
62 editSuccess: function(form, record, operation) { 65 editSuccess: function(form, record, operation) {
66 // Reload store
67 var store = this.getProbenStore();
68 store.reload();
63 var win = form.up('window'); 69 var win = form.up('window');
64 win.close(); 70 win.close();
65 }, 71 },
66 editFailure: function(form, record, operation) { 72 editFailure: function(form, record, operation) {
67 Ext.MessageBox.show({ 73 Ext.MessageBox.show({

http://lada.wald.intevation.org