Mercurial > lada > lada-client
comparison app/model/Messwert.js @ 167:3d3ad1f031bf
Added model and store for messwert.
author | Torsten Irländer <torsten.irlaender@intevation.de> |
---|---|
date | Wed, 03 Jul 2013 16:06:08 +0200 |
parents | |
children | 53e50427888b |
comparison
equal
deleted
inserted
replaced
166:62a356dc2517 | 167:3d3ad1f031bf |
---|---|
1 Ext.define('Lada.model.Messwert', { | |
2 extend: 'Ext.data.Model', | |
3 fields: [ | |
4 {name: "id"}, | |
5 {name: "messungsId", mapping:"id.messungsId"}, | |
6 {name: "probeId", mapping:"id.probeId"}, | |
7 {name: "messgroesseId", mapping:"id.messgroesseId"}, | |
8 {name: "messwert", type:"float"}, | |
9 {name: "messfehler", type:"float"}, | |
10 {name: "nwgZuMesswert", type:"float"}, | |
11 {name: "mehId"}, | |
12 {name: "grenzwertueberschreitung", type: "boolean"}, | |
13 {name: "letzteAenderung", type:"date"} | |
14 ], | |
15 idProperty: "id", | |
16 proxy: { | |
17 type: 'rest', | |
18 appendId: true, //default | |
19 url: 'server/rest/messwert', | |
20 reader: { | |
21 type: 'json', | |
22 root: 'data' | |
23 } | |
24 }, | |
25 getEidi: function() { | |
26 var mid = this.get('messgroesseId'); | |
27 var messId = this.get('messungsId'); | |
28 var probeId = this.get('probeId'); | |
29 return "/" + mid + "/" + messId + "/" + probeId; | |
30 } | |
31 }); |