# HG changeset patch # User Torsten Irländer # Date 1372860368 -7200 # Node ID 3d3ad1f031bf71c56863cd9d3d010b47c7ab8c39 # Parent 62a356dc2517874e74bece830ee6b9923b4e66f9 Added model and store for messwert. diff -r 62a356dc2517 -r 3d3ad1f031bf app/model/Messwert.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/model/Messwert.js Wed Jul 03 16:06:08 2013 +0200 @@ -0,0 +1,31 @@ +Ext.define('Lada.model.Messwert', { + extend: 'Ext.data.Model', + fields: [ + {name: "id"}, + {name: "messungsId", mapping:"id.messungsId"}, + {name: "probeId", mapping:"id.probeId"}, + {name: "messgroesseId", mapping:"id.messgroesseId"}, + {name: "messwert", type:"float"}, + {name: "messfehler", type:"float"}, + {name: "nwgZuMesswert", type:"float"}, + {name: "mehId"}, + {name: "grenzwertueberschreitung", type: "boolean"}, + {name: "letzteAenderung", type:"date"} + ], + idProperty: "id", + proxy: { + type: 'rest', + appendId: true, //default + url: 'server/rest/messwert', + reader: { + type: 'json', + root: 'data' + } + }, + getEidi: function() { + var mid = this.get('messgroesseId'); + var messId = this.get('messungsId'); + var probeId = this.get('probeId'); + return "/" + mid + "/" + messId + "/" + probeId; + } +}); diff -r 62a356dc2517 -r 3d3ad1f031bf app/store/Messwerte.js --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/app/store/Messwerte.js Wed Jul 03 16:06:08 2013 +0200 @@ -0,0 +1,5 @@ +Ext.define('Lada.store.Messwerte', { + extend: 'Ext.data.Store', + model: 'Lada.model.Messwert' +}); +