torsten@53: Ext.define('Lada.model.Kommentar', { torsten@53: extend: 'Ext.data.Model', torsten@53: fields: [ torsten@53: {name: "id"}, torsten@100: {name: "kid", mapping:"id.kid"}, torsten@100: {name: "convertedId", convert:buildId}, torsten@53: {name: "probeId"}, torsten@53: {name: "erzeuger"}, torsten@53: {name: "kdatum"}, torsten@53: {name: "ktext"} torsten@53: ], torsten@100: idProperty: "convertedId", torsten@53: proxy: { torsten@53: type: 'rest', torsten@53: appendId: true, //default torsten@53: url: 'server/rest/kommentare', torsten@53: reader: { torsten@100: type: 'json', torsten@100: root: 'data' torsten@53: } torsten@53: } torsten@53: }); torsten@100: torsten@100: function buildId(v, record){ torsten@100: return record.get('probeId') + record.get('kid'); torsten@100: }