torsten@153: Ext.define('Lada.model.Ortdetail', { torsten@153: extend: 'Ext.data.Model', torsten@153: fields: [ torsten@153: {name: "ortId"}, torsten@153: {name: "bezeichnung"}, torsten@153: {name: "beschreibung"}, torsten@154: {name: "unscharf"}, torsten@153: {name: "nutsCode"}, torsten@153: {name: "koordXExtern"}, torsten@153: {name: "koordYExtern"}, torsten@153: {name: "hoeheLand"}, torsten@153: {name: "letzteAenderung", type: 'date', convert: ts2date, defaultValue: new Date()}, torsten@153: {name: "longitude", type: 'float'}, torsten@153: {name: "latitude", type: 'float'}, torsten@153: {name: "staatId"}, torsten@153: {name: "gemId"}, torsten@154: {name: "otyp"} torsten@153: ], torsten@153: idProperty: "ortId", torsten@153: proxy: { torsten@153: type: 'rest', torsten@153: appendId: true, //default torsten@153: url: 'server/rest/ortinfo', torsten@153: api: { torsten@153: }, torsten@153: reader: { torsten@153: type: 'json', torsten@153: root: 'data' torsten@153: } torsten@153: } torsten@153: }); torsten@153: torsten@153: function ts2date(v, record){ torsten@153: // Converts a timestamp into a date object. torsten@153: return new Date(v); torsten@153: } torsten@153: