view app/view/widgets/Verwaltungseinheit.js @ 442:bba7fbcf2f70

Simplified logic in Messwert listing. No extra logic anymore to check if a "<" char is displayed in front of the measured value. Simply dislplay the value and value form messwertNwg.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Tue, 03 Dec 2013 11:23:15 +0100
parents 651ee49ff3c2
children debfcc7713e3
line wrap: on
line source
/**
 * Combobox for Verwaltungseinheit
 */
Ext.define('Lada.view.widgets.Verwaltungseinheit' ,{
        extend: 'Ext.form.ComboBox',
        alias: 'widget.verwaltungseinheiten',
        store: 'Verwaltungseinheiten',
        displayField: 'bezeichnung',
        valueField: 'gemId',
        emptyText:'Wählen Sie eine Verwaltungseinheit',
        hideTrigger: true,
        // Enable filtering of comboboxes
        autoSelect: false,
        queryMode: 'remote',
        triggerAction : 'type',
        typeAhead: true,
        minChars: 2,
    initComponent: function() {
        this.callParent(arguments);
    },
    // This listener is used to load currently "selected" verwaltungseinheit.
    // This is needed as without having this record the field would only
    // display the raw value (id) of the verwaltungseinheit.
    listeners: {
        render: function(combo, eOpts) {
            combo.store.load({
                id: this.getValue()
            });
        }
    }
});

http://lada.wald.intevation.org