Description
I have a TabPanel component which uses addBody() to gather a Collection of child Panels.
public void addBody(IRender element) {
super.addBody(element);
log.info("Panel: " + element + " " + element.getClass().getName());
if (element instanceof Panel)
}
This code worked in Tapesty 3.0 but in 4.0 it breaks because element is a dynamic proxy as the logging output shows below:
[11/17/05 11:26:59:253 CST] 0000004f TabPanel I com.webify.webapp.wlib.tabpanel.TabPanel addBody Panel: TextToken[type=TEXT location=classpath:/com/webify/webapp/wlib/shell/LHSMenu.html offset=165 length=10] org.apache.tapestry.parse.TextToken
[11/17/05 11:26:59:253 CST] 0000004f TabPanel I com.webify.webapp.wlib.tabpanel.TabPanel addBody Panel: $Panel_12@36725f10[Home/$Template.lhs.servicesPanel] $Panel_12
[11/17/05 11:26:59:269 CST] 0000004f TabPanel I com.webify.webapp.wlib.tabpanel.TabPanel addBody Panel: TextToken[type=TEXT location=classpath:/com/webify/webapp/wlib/shell/LHSMenu.html offset=7198 length=6] org.apache.tapestry.parse.TextToken
Is there a better way to get a component's children of a specific class?