Skip to content Skip to sidebar Skip to footer

Ext Js Empty Itemselector When Loaded For The Second Time

i'm a newbie with ExtJS, i'm using ExtJS 4.0.7 and what they call MVC, just getting use to the code, so, i was taking a look to the examples, and there is one that works perfect fo

Solution 1:

I was looking into the Ext js forum, someone gave a solution, i don't know if it is the best but it works for me,

studentStore.load(function(){
            win.down('#itemselector-field').bindStore(studentStore);
        });  

now, it is working as i wanted

hope it can help others

Solution 2:

In my Forms initComponent method I added a listener for beforerender

initComponent: function () {
    var me = this;
    Ext.applyIf(me, {
        listeners: {
        beforerender: {
                fn: me.onFormBeforeRender,
                scope: me
            }
       }
    });

    me.callParent(arguments);

},

onFormBeforeRender: function(abstractcomponent, options) {
            // where store is created globally like this var store = Ext.create('TIP.store.CommodityStore');

    store.load(function(){
        Ext.getCmp("commoselector").bindStore(store);
    });
}

Post a Comment for "Ext Js Empty Itemselector When Loaded For The Second Time"