torsten@153: Ext.define('Lada.model.Staat', { torsten@153: extend: 'Ext.data.Model', torsten@153: fields: [ torsten@153: {name: "staatId", type: 'int'}, torsten@153: {name: "staat"}, torsten@153: {name: "staatIso"}, torsten@153: {name: "staatKurz"} torsten@153: ], torsten@153: idProperty: "staatId", torsten@153: proxy: { torsten@153: type: 'rest', torsten@153: appendId: true, //default torsten@153: url: 'server/rest/staat', 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: }