PDA

View Full Version : button handler problem



horia.dragos
28 Mar 2010, 12:26 PM
var btnHandler = function(btn) {
searchStore.baseParams = {param: searchForm.getForm().findField('search').getValue()}
searchStore.reload();
var count = 0;
searchStore.each(function(results) {
++count;
resultsPanel.add(
new Ext.form.Label({
id: 'result-' + count,
html: results.data['title'] + ': <a href="' + results.data['url'] + '">' + results.data['url'] + '</a><br/><br/>'
})
);
resultsPanel.doLayout();
});
}
The request is sent, store is reloaded, but the panel content is not refreshed until the second click. Any ideas? Thank you