Results 1 to 5 of 5

Thread: combobox problem

  1. #1

    Default combobox problem

    Hi, I have a problem with combobox.
    The code is
    PHP Code:
        var mainSS = new Ext.data.JsonStore({
            proxy: new Ext.data.HttpProxy({url: '<?= HTTP_SERVER;?>json/settings/allSuplList.php' }),
            reader: new Ext.data.JsonReader({
                id: 'allCntrList',
                totalProperty: 'total',
                root:'students'
            }, [{name: 'name'}, {name: 'id'}])
        });

        var mainS = new Ext.form.ComboBox({
            store: mainSS,
            hiddenId: 'id',
            hiddenName: 'suplId',
            tpl: '<tpl for=\".\"><div ext:qtip=\"{name}\" class=\"x-combo-list-item\">{name}</div></tpl>',
            displayField:'name',
            valueField: 'id',
            fieldLabel: 'Students',
            emptyText:'Select...',
            loadingText: 'Loading...',
            maxHeight: 100,
            allowBlank: false,
            editable:false,
            anchor:'100%',
            triggerAction: 'all',
            lazyRender:true,
            forceSelect: true,
            listClass: 'x-combo-list-small'
        });
    I definitely know that the store is getting the data.

    PHP Code:
    {students: [
    name:'Ivan J'id:'17'},
    name:'Anna H'id:'6'},
    name:'Nick F'id:'4'}
    ]} 
    With the previous EXT version everything was ok but since ext-3.0-rc2 I had a few things I really do not understand.
    Please, help to solve this one.
    Nick

  2. #2
    Sencha User
    Join Date
    Mar 2007
    Posts
    7,854

    Default

    "Have a problem with Combobox" doesn't tell us anything.

    Please review the JsonStore doc - there is no reader config. A JsonReader is internally configured.

  3. #3

    Default

    Hi, thank you for reply.
    You were right I had a few thing wrong. The store now is like this

    PHP Code:
    var store = new Ext.data.JsonStore({
        // store configs
        //autoDestroy: true,
        url: '<?= HTTP_SERVER;?>json/settings/allSuplList.php',
        storeId: 'allCntrList',
        // reader configs
        root: 'students',
        idProperty: 'name',
        fields: ['name', 'id']
    });
    But a combo still does not work. I have read the JsonStore docs. The server returns the right type of data. Console confirms the data relieved.
    Please, helpl to get it running.
    Thank you
    Nick

  4. #4

    Default

    Someone, please...

  5. #5

    Default

    I found the problem. The old version does work but I couldn't see the selector items list. The thing is that the list appears behind the window. As I said I was using the desktop interface and I had something similar with window z-indexes. In the forum I have found this: Ext.WindowMgr.zseed = 50000;.
    Is there any way to do the same with combo list items?
    Thank you
    Nick
    Attached Images Attached Images

Posting Permissions

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