1. #1
    Sencha User
    Join Date
    Mar 2012
    Location
    Jakarta
    Posts
    30
    Vote Rating
    2
    arivwd is on a distinguished road

      0  

    Default How to find Combobox object within Store?

    How to find Combobox object within Store?


    Dear pros,

    I've created combobox with this :

    Code:
    {
        xtype:'combobox',
        id: 'comboMasterDepartemen',
        emptyText: 'No records',
        name: 'cmb1',
        allowBlank: true,
        fieldLabel: 'Parent Org. ',
        store: new Ext.data.Store({
            autoLoad: true,
            fields: ['id_departemen', 'nm_departemen'],
            proxy: {
                type: 'ajax',
                url : 'master_departemen/master_departemen/data/3',
                reader: {
                    type: 'json',
                    root : 'dataRecords'
                }
            },
            listeners: {
                load: function () {
                    var combo = Ext.getCmp('comboMasterDepartemen');
                     combo.clearValue();
                     combo.applyEmptyText();
                    if(this.getCount()>0) { combo.setValue(this.first().data.id_departemen); }
                }
            }
        }),
        editable: false,
        displayField: 'nm_departemen',
        valueField: 'id_departemen',
        labelAlign: 'right',
        anchor:'100%'
    }
    How do i get the combobox object within Store without defining " Ext.getCmp('comboMasterDepartemen'); " explicitly, so i dont have to define " id " prop in combobox.

    Thanx

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,910
    Vote Rating
    443
    scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future scottmartin has a brilliant future

      0  

    Default


    Have a look at itemId ..

    Code:
    itemId: 'comboMasterDepartemen'
    ..
    form.down('#comboMasterDepartemen');
    You can also look at
    Ext.ComponentQuery()
    component.query()

    Regards,
    Scott.

Thread Participants: 1

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."