# HG changeset patch # User Torsten Irländer # Date 1369318145 -7200 # Node ID 3f801444b8d5cbbb30cf558e0c6987d4b971ea3a # Parent d090ba4104abc27f4ca3cecd8b4113619b2682fb Added store for Messstelle. Fill Messstellen widget on search page dynamically. diff -r d090ba4104ab -r 3f801444b8d5 app/controller/Sql.js --- 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'); diff -r d090ba4104ab -r 3f801444b8d5 app/store/Mst.js --- /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' + } + } +}); diff -r d090ba4104ab -r 3f801444b8d5 app/view/widgets/Mst.js --- 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);