torsten@120: var uwbStore = Ext.create('Ext.data.Store', { torsten@261: fields: ['umwId', 'umweltBereich'], torsten@260: sorters: [{ torsten@260: property: 'umwId', torsten@260: }], torsten@367: autoLoad: true, torsten@120: proxy: { torsten@120: type: 'ajax', torsten@120: api: { torsten@120: read: 'server/rest/uwb' torsten@120: }, torsten@120: reader: { torsten@120: type: 'json', torsten@120: root: 'data' torsten@120: } torsten@120: } torsten@120: }); torsten@120: torsten@352: /** torsten@352: * Combobox for Umweltbereich torsten@352: */ torsten@31: Ext.define('Lada.view.widgets.Uwb' ,{ torsten@272: tpl: '
{umwId} - {umweltBereich}
', torsten@31: extend: 'Ext.form.ComboBox', torsten@31: alias: 'widget.uwb', torsten@120: store: uwbStore, torsten@33: displayField:'umwId', torsten@33: valueField: 'umwId', torsten@33: emptyText:'Wählen Sie einen Umweltbereich', torsten@355: // Enable filtering of comboboxes torsten@355: autoSelect: false, torsten@355: queryMode: 'local', torsten@355: triggerAction : 'all', torsten@355: typeAhead: true, torsten@355: minChars: 0, torsten@272: // TODO: Set value in disply after selection. Can not figure out why torsten@272: // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52> torsten@272: //listeners: { torsten@272: // select: function(combo, record, index) { torsten@272: // console.log("1"); torsten@272: // console.log(record); torsten@272: // console.log("2"); torsten@272: // var text = record.data['umwId'] + " - " + record.data['umweltBereich']; torsten@272: // console.log("3"); torsten@272: // Ext.form.ComboBox.superclass.setValue.call(this, text); torsten@272: // combo.value = record.id; torsten@272: // } torsten@272: //}, torsten@31: initComponent: function() { torsten@31: this.callParent(arguments); torsten@31: } torsten@31: });