Dynamic Proxies break 3.0 component
-----------------------------------

         Key: TAPESTRY-761
         URL: http://issues.apache.org/jira/browse/TAPESTRY-761
     Project: Tapestry
        Type: Bug
  Components: Framework  
    Versions: 4.0    
    Reporter: Mike Perham


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) {
            Panel panel = (Panel) element;
            panel.setTabPanel(this);
            _panels.add(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: [EMAIL 
PROTECTED]/$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?

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
   http://www.atlassian.com/software/jira


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to