torsten@167: Ext.define('Lada.model.Messwert', { torsten@167: extend: 'Ext.data.Model', torsten@167: fields: [ torsten@167: {name: "id"}, torsten@167: {name: "messungsId", mapping:"id.messungsId"}, torsten@167: {name: "probeId", mapping:"id.probeId"}, torsten@167: {name: "messgroesseId", mapping:"id.messgroesseId"}, torsten@167: {name: "messwert", type:"float"}, torsten@167: {name: "messfehler", type:"float"}, torsten@167: {name: "nwgZuMesswert", type:"float"}, torsten@167: {name: "mehId"}, torsten@167: {name: "grenzwertueberschreitung", type: "boolean"}, torsten@167: {name: "letzteAenderung", type:"date"} torsten@167: ], torsten@167: idProperty: "id", torsten@167: proxy: { torsten@167: type: 'rest', torsten@167: appendId: true, //default torsten@167: url: 'server/rest/messwert', torsten@167: reader: { torsten@167: type: 'json', torsten@167: root: 'data' torsten@167: } torsten@167: }, torsten@167: getEidi: function() { torsten@167: var mid = this.get('messgroesseId'); torsten@167: var messId = this.get('messungsId'); torsten@167: var probeId = this.get('probeId'); torsten@167: return "/" + mid + "/" + messId + "/" + probeId; torsten@167: } torsten@167: });