changeset 50:2fbd53b944fc

Move proxy definition into the model. Else the building of the URL does not work correct.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Mon, 27 May 2013 14:58:31 +0200
parents 792c34b3f5a9
children 230bac063b0b
files app/model/Probe.js app/store/Proben.js
diffstat 2 files changed, 13 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/app/model/Probe.js	Mon May 27 10:14:29 2013 +0200
+++ b/app/model/Probe.js	Mon May 27 14:58:31 2013 +0200
@@ -1,6 +1,7 @@
 Ext.define('Lada.model.Probe', {
     extend: 'Ext.data.Model',
     fields: [
+        {name: "probeId"},
         {name: "baId"},
         {name: "datenbasisId"},
         {name: "erzeugerId"},
@@ -23,7 +24,17 @@
         {name: "solldatumEnde", type: 'date', convert: ts2date},
         {name: "test"},
         {name: "umwId"}
-    ]
+    ],
+    proxy: {
+        type: 'rest',
+        appendId: true, //default
+        url: 'server/rest/proben',
+        api: {
+        },
+        reader: {
+            type: 'json'
+        }
+    }
 });
 
 function ts2date(v, record){
--- a/app/store/Proben.js	Mon May 27 10:14:29 2013 +0200
+++ b/app/store/Proben.js	Mon May 27 14:58:31 2013 +0200
@@ -1,13 +1,4 @@
 Ext.define('Lada.store.Proben', {
     extend: 'Ext.data.Store',
-    model: 'Lada.model.Probe',
-    proxy: {
-        type: 'ajax',
-        url: 'server/rest/proben',
-        api: {
-        },
-        reader: {
-            type: 'json'
-        }
-    }
+    model: 'Lada.model.Probe'
 });

http://lada.wald.intevation.org