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

      0  

    Default Answered: Combo Box is not getting filled when using in Form/Window

    Answered: Combo Box is not getting filled when using in Form/Window


    Hi All,

    This is my script -
    /* To open new obj form */
    function openobj() {
    var obj_spec_store = new Ext.data.SimpleStore({
    url : 'mngr_obj_ajx.php',
    fields : [ 'value', 'text' ]
    });
    obj_spec_store.load({
    params : {
    todo : 'Get_obj_Spec'
    }
    });
    var parent_obj_store = new Ext.data.SimpleStore({
    url : 'mngr_obj_ajx.php',
    fields : [ 'value', 'text' ]
    });
    parent_obj_store.load({
    params : {
    todo : 'Get_Parent_obj'
    }
    });
    var menuWin = new Window('menuWindow', {
    title : "Create obj",
    width : 980,
    height : 340,
    id:'menuWin',
    draggable : true,
    destroyOnClose : true,
    hideEffect : Element.hide,
    showEffect : Element.show,
    minimizable : false,
    maximizable : false,
    closable : true,
    resizable : false,
    items : [ new Ext.FormPanel({
    renderTo : 'create_obj_form',
    id : 'mngobjForm',
    layout : 'form',
    height : innerHeight - 250,
    width : innerWidth - 50,
    frame : true,
    destroyOnClose : true,
    defaults : {
    msgTarget : 'side',
    labelSeparator : ''
    },
    labelAlign : 'right',
    items : [ {
    xtype : 'combo',
    fieldLabel : 'obj Specification ',
    store : obj_spec_store,
    displayField : 'text',
    valueField : 'value',
    mode : 'local',
    emptyText : 'Select Specification...',
    triggerAction : 'all',
    name : 'specId2',
    id : 'specId2',
    hiddenName : 'specIdHid',
    width : 150,
    forceSelection : false,
    editable : true,
    selectOnFocus : true
    }, {
    xtype : 'combo',
    fieldLabel : 'Parent obj ',
    store : parent_obj_store,
    displayField : 'text',
    valueField : 'value',
    mode : 'local',
    emptyText : 'Select obj...',
    triggerAction : 'all',
    name : 'specId3',
    id : 'specId3',
    hiddenName : 'objIdHid2',
    width : 150,
    forceSelection : false,
    editable : true,
    selectOnFocus : true
    }, {
    xtype : 'combo',
    fieldLabel : 'Dependent obj ',
    store : parent_obj_store,
    displayField : 'text',
    valueField : 'value',
    mode : 'local',
    emptyText : 'Select obj...',
    triggerAction : 'all',
    name : 'specId4',
    id : 'specId4',
    hiddenName : 'objIdHid3',
    width : 150,
    forceSelection : false,
    editable : true,
    selectOnFocus : true
    } ]
    }) ]
    });
    menuWin.getContent().innerHTML = $('contentWindow').innerHTML;
    menuWin.show();
    menuWin.setDestroyOnClose();
    menuWin.showCenter(true);
    menuWin.doResize(true);
    $("menuWindow_close").onclick = function(e) {
    if (menuWin)
    menuWin.hide();
    closeCal();
    };
    }

    when I use combo box directly out side window, I am getting values. But when I paste them in Window (contectwindow), I don't get any data, but getting only combo box.


    Please help.

  2. Hi,

    In your code may be scope problem that's why combo is not able to get its store
    give some id to your combo store and try to do like this
    http://docs.sencha.com/ext-js/4-1/#!...a.StoreManager

  3. #2
    Sencha - Community Support Team sword-it's Avatar
    Join Date
    May 2012
    Location
    Istanbul
    Posts
    1,333
    Answers
    124
    Vote Rating
    85
    sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough sword-it is a jewel in the rough

      0  

    Default


    Hi,

    In your code may be scope problem that's why combo is not able to get its store
    give some id to your combo store and try to do like this
    http://docs.sencha.com/ext-js/4-1/#!...a.StoreManager
    sword-it.com, Sencha Developer House in Turkey - Istanbul University Technopark Suite 204.

  4. #3
    Sencha User
    Join Date
    Jan 2012
    Posts
    4
    Vote Rating
    0
    adn295 is on a distinguished road

      0  

    Default Thanks. Will check this

    Thanks. Will check this



Thread Participants: 1

Tags for this Thread