Results 1 to 2 of 2

Thread: Problem with a combo box

  1. #1

    Default Problem with a combo box

    Hi all,
    I have a problem with a comboBox the list of is empty

    Following my code:

    Store Definition
    Code:
    var DcmStoreCompany = Ext.extend(Ext.data.Store, {
    	constructor: function(cfg) {
            cfg = cfg || {};
            DcmStoreCompany.superclass.constructor.call(this, Ext.apply({
        	  proxy: new Ext.data.HttpProxy({
        	       url: 'example.jsp'
        	     , method: 'POST'
        	    }),
        	  reader: new Ext.data.JsonReader({
        	         root: 'company',
        	         totalProperty: 'totalCount',
        	         id: 'id',
        	         fields: [{name: 'id', mapping: 'id'}
        	                  ,{name: 'name', mapping: 'name'}]
        	      }),
        	  autoLoad: true,
        	  id: 'storeCompany'
            	/*
            	url: 'example.jsp',
                id: 'storeCompany',
                root: 'company',
                totalProperty:'totalCount',
                fields: ['id','name']
                */
            }, cfg));
        }
    });
    Combo Definition
    Code:
    var DcmCmbCompay = Ext.extend(Ext.form.ComboBox, {
        id: 'cmbCompany',
        name: 'cmbCompany',
        fieldLabel: etichette.company,
        allowBlank: false,
        store: new DcmStoreCompany(),
        valueField: 'id',
        displayField: 'name',
        anchor: '100%',
        initComponent: function() {
        	DcmCmbCompay.superclass.initComponent.call(this);
        }
    });
    Thanks a lot
    Fabio

  2. #2
    Sencha Premium Member skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,791

    Default

    Add triggerAction: 'all' to your combobox.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •