diff app/model/Zusatzwert.js @ 106:b91d5376db19

Load Zusatzwerte from server
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 18 Jun 2013 14:02:48 +0200
parents
children 189a93e31be9
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/model/Zusatzwert.js	Tue Jun 18 14:02:48 2013 +0200
@@ -0,0 +1,32 @@
+Ext.define('Lada.model.Zusatzwert', {
+    extend: 'Ext.data.Model',
+    fields: [
+        {name: "id"},
+        {name: "convertedId", convert:buildId},
+        {name: "probeId"},
+        {name: "messwertNwg"},
+        {name: "messwertPzs"},
+        {name: "messfehler"},
+        {name: "mehId"},
+        {name: "letzteAenderung"},
+        {name: "sprobenZusatz"},
+        {name: "pzsId"},
+        {name: "beschreibung"},
+        {name: "zusatzwert"},
+        {name: "eudfKeyword"}
+    ],
+    idProperty: "convertedId",
+    proxy: {
+        type: 'rest',
+        appendId: true, //default
+        url: 'server/rest/zusatzwert',
+        reader: {
+            type: 'json',
+            root: 'data'
+        }
+    }
+});
+
+function buildId(v, record){
+    return record.get('probeId') + record.get('pzsId');
+}

http://lada.wald.intevation.org