dante
24 Aug 2007, 4:42 AM
I have a page containing a BorderLayout containing ContentPanels and also a NestedLayoutPanel. The latter one has tabs and I would like to have an ajax action executed automatically when a tab is activated. This already works using the following code (example):
mainLayout.getRegion('east').getPanel('east-div2').getLayout().getRegion('center').getPanel('report_periods').addListener('activate', function(){alert('test');});
However, I wonder where to put those Listener definitions? Or is it possible to define a Listener using the constructor of a ContentPanel?
So what's best practice in defining Listeners which don't have to be set up dynamically?
mainLayout.getRegion('east').getPanel('east-div2').getLayout().getRegion('center').getPanel('report_periods').addListener('activate', function(){alert('test');});
However, I wonder where to put those Listener definitions? Or is it possible to define a Listener using the constructor of a ContentPanel?
So what's best practice in defining Listeners which don't have to be set up dynamically?