comparison app/model/Probe.js @ 50:2fbd53b944fc

Move proxy definition into the model. Else the building of the URL does not work correct.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 27 May 2013 14:58:31 +0200
parents 4caf4c8c694a
children 9e2e09e819fd
comparison
equal deleted inserted replaced
49:792c34b3f5a9 50:2fbd53b944fc
1 Ext.define('Lada.model.Probe', { 1 Ext.define('Lada.model.Probe', {
2 extend: 'Ext.data.Model', 2 extend: 'Ext.data.Model',
3 fields: [ 3 fields: [
4 {name: "probeId"},
4 {name: "baId"}, 5 {name: "baId"},
5 {name: "datenbasisId"}, 6 {name: "datenbasisId"},
6 {name: "erzeugerId"}, 7 {name: "erzeugerId"},
7 {name: "hauptprobenNr"}, 8 {name: "hauptprobenNr"},
8 {name: "letzteAenderung"}, 9 {name: "letzteAenderung"},
21 {name: "probenartId"}, 22 {name: "probenartId"},
22 {name: "solldatumBeginn", type: 'date', convert: ts2date}, 23 {name: "solldatumBeginn", type: 'date', convert: ts2date},
23 {name: "solldatumEnde", type: 'date', convert: ts2date}, 24 {name: "solldatumEnde", type: 'date', convert: ts2date},
24 {name: "test"}, 25 {name: "test"},
25 {name: "umwId"} 26 {name: "umwId"}
26 ] 27 ],
28 proxy: {
29 type: 'rest',
30 appendId: true, //default
31 url: 'server/rest/proben',
32 api: {
33 },
34 reader: {
35 type: 'json'
36 }
37 }
27 }); 38 });
28 39
29 function ts2date(v, record){ 40 function ts2date(v, record){
30 // Converts a timestamp into a date object. 41 // Converts a timestamp into a date object.
31 return new Date(v); 42 return new Date(v);

http://lada.wald.intevation.org