PDA

View Full Version : Post processing tab content?



thewoodsman
17 Jan 2008, 9:32 AM
Hi,

I'm trying to integrate an existing site with Ext, specifically with a Tab Panel.

When a tab panel item gets its content, I need to post process this content to alter all form submissions and links to use ajax, so they display inside the tab panel item.

I've attempted this using jquery, but it's all a bit messy at the moment.

Does anyone has any advice on this, especially which events I can attach to to be called every time the content of a tab changes (not the tab itself actually changing!) in Ext 1.x.

Thanks in advance, any help would be appreciated!

hendricd
17 Jan 2008, 9:38 AM
Best place for that would be a customer renderer for that tab's updateManager:


tab.getUpdateManager().setRenderer({ render: function(el, response, callback) {

var massagedContent = response.responseText.replace( rule, "??? ") ;
el.update(massagedContent);

if(callback)callback(); //important, dont forget this!
}});