2
votes

I need to refresh a panel that has autoLoad content.

var contentPanel = new Ext.Panel({
    border: false,
    plain : true,
    autoLoad : {
        url : 'content.html'
    }
});

I tried,

click : function(){
  contentPanel.getUpdater().refresh();
}

but it does not work.

anybody know how to refresh that panel content?

Thank you!

1
Where is the click property defined? - Grant Zhu
i tested it,.. and works fine,.. the code inside click event is the correct way to refresh panel... i think the problem in somewhere else - Egy Mohammad Erdin
//WarungNasi49 How did you do? did you do this way? contentPanel.getUpdater().refresh(); - Expert wanna be

1 Answers

3
votes

There are two ways to do that:

contentPanel.autoLoad = {
    url : '/echo/js/?js=blahblahblah'
};
contentPanel.doAutoLoad();

or

contentPanel.body.getUpdater().update({
    url : '/echo/js/?js=blahblahblah'
});

Working sample: http://jsfiddle.net/lolo/Hz6dg/3/