# HG changeset patch # User Torsten Irländer # Date 1375800827 -7200 # Node ID 852dc338894e3459c3ee2f885ee7b2ce85a023f8 # Parent 11f8a2c1b610c7f390246eb5c4dd1cc7ee0d432b Make custom comboboxed selectable diff -r 11f8a2c1b610 -r 852dc338894e app/view/widgets/Messmethode.js --- a/app/view/widgets/Messmethode.js Tue Aug 06 16:03:38 2013 +0200 +++ b/app/view/widgets/Messmethode.js Tue Aug 06 16:53:47 2013 +0200 @@ -17,7 +17,7 @@ }); Ext.define('Lada.view.widgets.Messmethode' ,{ - tpl: '
{mmtId} - {messmethhode}
', + tpl: '
{mmtId} - {messmethhode}
', extend: 'Ext.form.ComboBox', alias: 'widget.messmethode', store: mmtStore, diff -r 11f8a2c1b610 -r 852dc338894e app/view/widgets/Uwb.js --- a/app/view/widgets/Uwb.js Tue Aug 06 16:03:38 2013 +0200 +++ b/app/view/widgets/Uwb.js Tue Aug 06 16:53:47 2013 +0200 @@ -17,13 +17,26 @@ }); Ext.define('Lada.view.widgets.Uwb' ,{ - tpl: '
{umwId} - {umweltBereich}
', + tpl: '
{umwId} - {umweltBereich}
', extend: 'Ext.form.ComboBox', alias: 'widget.uwb', store: uwbStore, displayField:'umwId', valueField: 'umwId', emptyText:'Wählen Sie einen Umweltbereich', + // TODO: Set value in disply after selection. Can not figure out why + // accessing the recored.data attribute fails here (ti) <2013-08-06 16:52> + //listeners: { + // select: function(combo, record, index) { + // console.log("1"); + // console.log(record); + // console.log("2"); + // var text = record.data['umwId'] + " - " + record.data['umweltBereich']; + // console.log("3"); + // Ext.form.ComboBox.superclass.setValue.call(this, text); + // combo.value = record.id; + // } + //}, initComponent: function() { this.callParent(arguments); }