torsten@103: Ext.define('Lada.model.Messung', { torsten@103: extend: 'Ext.data.Model', torsten@103: fields: [ torsten@103: {name: "id"}, torsten@103: {name: "messungsId", mapping: "id.messungsId"}, torsten@103: {name: "convertedId", convert: buildId}, torsten@103: {name: "lprobeId"}, torsten@103: {name: "mmtId"}, torsten@103: {name: "nebenprobenNr"}, torsten@103: {name: "messdauer"}, torsten@103: {name: "messzeitpunkt"}, torsten@103: {name: "fertig", type: "boolean"}, torsten@103: {name: "letzteAenderung", type:"date"}, torsten@103: {name: "geplant", type: "boolean"} torsten@103: ], torsten@103: idProperty: "convertedId", torsten@103: proxy: { torsten@103: type: 'rest', torsten@103: appendId: true, //default torsten@103: url: 'server/rest/messung', torsten@103: reader: { torsten@103: type: 'json', torsten@103: root: 'data' torsten@103: } torsten@103: } torsten@103: }); torsten@103: torsten@103: function buildId(v, record){ torsten@103: return record.get('probeId') + record.get('messungsId'); torsten@103: }