1. #1
    Banned
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    101
    Vote Rating
    0
    junkzilla is on a distinguished road

      0  

    Default can't select option in combobox

    can't select option in combobox


    Hi all.
    I populated a combobox with a XML file.
    The options render ok, but when I try to select one, only the first option gets selected, always.
    This is my code.

    Code:
                  var vatRecords = Ext.data.Record.create([
                        {name: 'vatid', type: 'string'}
                        ,{name: 'vat', type: 'float'}
                    ]);
                    
                    var vat_ds = new Ext.data.Store({
                        url: '<%= request.getContextPath() %>/remoteadmin/products/vat/index.do'
                        ,reader: new Ext.data.XmlReader({
                            record: 'row'
                        }, 
                        vatRecords)
                    });                                                
                   
                    var combo = new Ext.form.ComboBox({                    
                        store: vat_ds
                        ,valueField: 'vatid'
                        ,typeAhead: true
                        ,displayField:'vat'          
                        ,mode: 'remote'                    
                        ,triggerAction: 'all'
                        ,emptyText:'Select vat...'
                        ,selectOnFocus:true
                        ,applyTo: 'vat_cb' 
                        ,forceSelection: true
                    });
    Thanks in advanced.
    Cheers.

  2. #2
    Banned
    Join Date
    Nov 2007
    Location
    Germany
    Posts
    101
    Vote Rating
    0
    junkzilla is on a distinguished road

      0  

    Default


    My mistake, sorry.
    The valueField wasn't 'vatid', it was 'id'.
    Thanks anyway.

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar