changeset 35:3f801444b8d5

Added store for Messstelle. Fill Messstellen widget on search page dynamically.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Thu, 23 May 2013 16:09:05 +0200
parents d090ba4104ab
children 2a67e062519b
files app/controller/Sql.js app/store/Mst.js app/view/widgets/Mst.js
diffstat 3 files changed, 18 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/app/controller/Sql.js	Thu May 23 16:02:00 2013 +0200
+++ b/app/controller/Sql.js	Thu May 23 16:09:05 2013 +0200
@@ -6,7 +6,8 @@
     ],
     stores: [
         'Sql',
-        'Uwb'
+        'Uwb',
+        'Mst'
     ],
     init: function() {
         console.log('Initialising the Sql controller');
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/app/store/Mst.js	Thu May 23 16:09:05 2013 +0200
@@ -0,0 +1,13 @@
+Ext.define('Lada.store.Mst', {
+    extend: 'Ext.data.Store',
+    fields: ['mstId'],
+    proxy: {
+        type: 'ajax',
+        api: {
+        read: 'server/rest/mst'
+        },
+        reader: {
+            type: 'json'
+        }
+    }
+});
--- a/app/view/widgets/Mst.js	Thu May 23 16:02:00 2013 +0200
+++ b/app/view/widgets/Mst.js	Thu May 23 16:09:05 2013 +0200
@@ -2,9 +2,9 @@
 Ext.define('Lada.view.widgets.Mst' ,{
         extend: 'Ext.form.ComboBox',
         alias: 'widget.mst',
-        store: 'Sql',
-        displayField:'name',
-        valueField: 'id' ,
+        store: 'Mst',
+        displayField:'mstId',
+        valueField: 'mstId' ,
         emptyText:'Wählen Sie eine Messstelle',
     initComponent: function() {
         this.callParent(arguments);

http://lada.wald.intevation.org