1. #1
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    rajesh.vji is on a distinguished road

      0  

    Default Unanswered: 4.1.1 - issue on Combo box set Value & form reset functions

    Unanswered: 4.1.1 - issue on Combo box set Value & form reset functions


    we have upgraded to extjs 4.1.1 gl recently. after upgrading we are getting the following errors

    1. form reset functionality is not resetting the combo box (drop down) values but it works fine in Text fields. earlier version it was working fine including combo box (drop down).

    i have enclosed the extjs code which we are using. kindly help us to solve this issue at the earliest.


    var TxrlabDeviceField = new Ext.form.ComboBox(
    {
    // Initializing the field variables

    name : 'lab',
    id : 'lab',
    fieldLabel : 'Lab',
    store : LabStore,
    emptyText : '-Select Lab -',
    bodyStyle : 'padding:15px',
    loadmask : true,
    mode : 'remote',
    displayField : 'spname',
    valueField : 'lab_id',
    allowBlank : false,
    typeAhead : true,
    editable : true,
    queryMode : 'local',
    forceSelection : false,
    anchor :'30%',
    triggerAction : 'all',
    listeners:
    {
    // Adding a onSelect listener to LAB field
    select: function(combo, recordTest, index)
    {
    //Get lab value from the combo box
    var val = Ext.getCmp('lab').getValue();
    var record = Ext.getCmp('lab').findRecord(Ext.getCmp('lab').displayField, val);

    //Get the lab_id from the value of the lab combo box
    var labId = record.get('lab_id');

    refreshAisleCombo(labId,'aisle');

    Ext.getCmp("AisleLoc").getStore().removeAll();
    Ext.getCmp("AisleLoc").setValue(''); // Not working in extjs 4.1.1


    }
    }


    the form portion

    var gridForm = Ext.create('Ext.FormPanel', {

    frame: true,
    title: 'Change To',
    width: 900,
    layout:'hbox',
    fieldDefaults:
    {
    labelAlign: 'top',
    msgTarget: 'side'
    },
    defaults:
    {
    border: false,
    xtype: 'panel',
    flex: 1,
    layout: 'anchor'
    },


    defaultType: 'textfield',
    items: [TxrlabDeviceField, TxrAisleFieldDevice, TxrAisleLocFieldDevice,TxrDeviceOwner,TxrLDAPStatus],
    buttons: [{
    text: 'Reset',
    handler: function()
    {
    this.up('form').getForm().reset();// Not working in extjs 4.1.1
    }
    },
    {
    text: 'Transfer Asset(s)',
    handler: assetTransfer

    }]
    });

  2. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    8,868
    Answers
    652
    Vote Rating
    438
    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


    The following should work as expected:
    http://jsfiddle.net/jeMzE/

    Scott.

Thread Participants: 1

Tags for this Thread