PDA

View Full Version : Ext.Picker dynamically set slot store



mikeycgto
14 Mar 2011, 1:46 PM
I have a picker, with a single slot, that constantly changes. When the picker is initially created, I set the store to null, since I don't know which store it should be linked to (yet).

The user does some stuff and now I need to set the slot's store. How can I do this dynamically and force the component to update itself with the new data?

mikeycgto
14 Mar 2011, 2:20 PM
was able to set slot's store by doing the following:



new Ext.Picker({
slots : [{
store:null,
name:'picker'
}],

setStore : function(store){
var slot = this.items.first();
slot.bindStore(store);

this.show();
}
})