Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Sencha User galdaka's Avatar
    Join Date
    Mar 2007
    Location
    Spain
    Posts
    1,166
    Vote Rating
    -1
    galdaka is an unknown quantity at this point

      0  

    Default [CLOSED][3.0] SetValue shows "valueField" instead of "displayField". mode "local".

    [CLOSED][3.0] SetValue shows "valueField" instead of "displayField". mode "local".


    Hi,

    The problem is described here: http://www.extjs.com/forum/showthread.php?t=54654

    The problem is the same with mode:'local'.

    I tried Condors and Animals overrides without results:

    http://www.extjs.com/forum/showthread.php?t=49002
    http://www.extjs.com/forum/showthread.php?p=364333


    Description: When I call "setValue" the combobox display "valueField" instead of "displayField". I attach the code:

    PHP Code:
                    xtype'combo',
                    
    triggerAction'all',
                    
    fieldLabel'Categoria',
                    
    editablefalse,
                    
    id'eCategoria',
                    
    valueField'idCategoria',
                    
    displayField'nombreCategoria',
                    
    mode'local',
                    
    store: new Ext.data.ArrayStore({ 
                      
    fields: ['idCategoria''nombreCategoria'],
                      
    data: [['01''Técnico de Sistemas A'],['02''Técnico de Sistemas B'],['03''Programador Junior'],['04''Programador Senior'],['05''Analista programador'],['06''Jefe de proyecto']]
                    }) 
    Greetings,

  2. #2
    Sencha - Community Support Team Condor's Avatar
    Join Date
    Mar 2007
    Location
    The Netherlands
    Posts
    24,246
    Vote Rating
    92
    Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of Condor has much to be proud of

      0  

    Default


    Are you sure you are setting an existing value?

    (configure the combobox with valueNotFoundText:'[unknown]' and make your setValue call again)

  3. #3
    Sencha - Ext JS Dev Team Animal's Avatar
    Join Date
    Mar 2007
    Location
    Notts/Redwood City
    Posts
    30,506
    Vote Rating
    54
    Animal has a spectacular aura about Animal has a spectacular aura about Animal has a spectacular aura about

      0  

    Default


    Nope.

    I just ran this:

    Code:
    Ext.getBody().update('');
    var c = new Ext.form.ComboBox({
        triggerAction: 'all',
        fieldLabel: 'Categoria',
        editable: false,
        id: 'eCategoria',
        valueField: 'idCategoria',
        displayField: 'nombreCategoria',
        mode: 'local',
        store: new Ext.data.ArrayStore({ 
          fields: ['idCategoria', 'nombreCategoria'],
          data: [['01', 'Técnico de Sistemas A'],['02', 'Técnico de Sistemas B'],['03', 'Programador Junior'],['04', 'Programador Senior'],['05', 'Analista programador'],['06', 'Jefe de proyecto']]
        }),
        renderTo: document.body
    });
    c.setValue('05');
    In firebug, and got this:


  4. #4

Thread Participants: 2