Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-761

Dynamic Proxies break 3.0 component

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Won't Fix
    • 4.0
    • 4.0
    • Framework
    • None

    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)

      { 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: $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?

      Attachments

        Activity

          People

            hlship Howard Lewis Ship
            mperham Mike Perham
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: