can you halp me to do something like this
{
xtype : 'button',
text : 'Prikazi',
handler : function(item,el){
this.setDisabled(true);
store.load(function(records, operation, success) {
if(success){ this.up('button').setDisabled(false); }
});
}
}
problem: this.up(‘button’)
Just use the parameters that you’re passing –
because ‘this’ refers first to the button and in the callback it refers to the store:
Might be more elegant to use the store’s beforeload event to control the button-state.
Update: changed variable names to make the example even more obvious.
Maybe checkout FireBug or Chrome Developer Tools once
… and please accept the answer in case it should have been helpful.