torsten@94: Ext.define('Lada.model.Ort', { torsten@94: extend: 'Ext.data.Model', torsten@94: fields: [ torsten@149: // Field from the l_ort table torsten@149: {name: "portId", type: 'int'}, torsten@149: {name: "ortId", type: 'int'}, torsten@149: {name: "probeId"}, torsten@149: {name: "ortsTyp"}, torsten@149: {name: "ortzusatztext"}, torsten@149: {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()} torsten@94: ], torsten@149: idProperty: "portId", torsten@94: proxy: { torsten@94: type: 'rest', torsten@94: appendId: true, //default torsten@94: url: 'server/rest/ort', torsten@94: api: { torsten@94: }, torsten@94: reader: { torsten@94: type: 'json', torsten@94: root: 'data' torsten@94: } torsten@94: } torsten@94: }); torsten@94: torsten@94: function ts2date(v, record){ torsten@94: // Converts a timestamp into a date object. torsten@94: return new Date(v); torsten@94: }