torsten@161: Ext.define('Lada.model.MKommentar', { torsten@161: extend: 'Ext.data.Model', torsten@301: requires: ['Lada.lib.Helpers'], torsten@161: fields: [ torsten@179: {name: "id"}, torsten@227: {name: "kid"}, torsten@161: {name: "messungsId"}, torsten@161: {name: "probeId"}, torsten@161: {name: "erzeuger"}, torsten@301: {name: "kdatum", type: 'date', convert: Lada.lib.Helpers.ts2date, defaultValue: new Date()}, torsten@161: {name: "ktext"} torsten@161: ], torsten@179: idProperty: "id", torsten@161: proxy: { torsten@161: type: 'rest', torsten@161: appendId: true, //default torsten@161: url: 'server/rest/messkommentare', torsten@161: reader: { torsten@161: type: 'json', torsten@161: root: 'data' torsten@161: } torsten@161: }, torsten@161: getEidi: function() { torsten@227: var kid = this.get('kid'); torsten@161: var messId = this.get('messungsId'); torsten@161: var probeId = this.get('probeId'); torsten@161: return "/" + kid + "/" + messId + "/" + probeId; torsten@161: } torsten@161: });