view app/view/widgets/Messmethode.js @ 261:1375ff0f248d

Issue50. Show ID an text in combobox.
author Torsten Irländer <torsten.irlaender@intevation.de>
date Fri, 26 Jul 2013 10:12:58 +0200
parents 70a1b5962930
children 852dc338894e
line wrap: on
line source
// Combobox for Messmethode
var mmtStore = Ext.create('Ext.data.Store', {
    fields: ['mmtId', 'messmethhode'],
    sorters: [{
        property: 'mmtId',
    }],
    proxy: {
        type: 'ajax',
        api: {
        read: 'server/rest/messmethode'
        },
        reader: {
            type: 'json',
            root: 'data'
        }
    }
});

Ext.define('Lada.view.widgets.Messmethode' ,{
        tpl: '<tpl for="."><div class="x-combo-list-item" >{mmtId} - {messmethhode}</div></tpl>',
        extend: 'Ext.form.ComboBox',
        alias: 'widget.messmethode',
        store: mmtStore,
        displayField:'messmethhode',
        valueField: 'mmtId',
        emptyText:'Wählen Sie eine Messmethode',
    initComponent: function() {
        this.callParent(arguments);
    }
});

http://lada.wald.intevation.org