You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Mike Perham (JIRA)" <ta...@jakarta.apache.org> on 2005/11/17 20:30:44 UTC
[jira] Commented: (TAPESTRY-761) Dynamic Proxies break 3.0 component
[ http://issues.apache.org/jira/browse/TAPESTRY-761?page=comments#action_12357919 ]
Mike Perham commented on TAPESTRY-761:
--------------------------------------
This is my mistake. Something has changed in components which have optional parameters and getter/setters with the same name. In 3.0 I could do something like this:
public boolean getCondition() {
IBinding bind = getBinding("condition");
if (bind != null) {
...
}
return true;
}
whereas this code fails to execute in 4.0. I'm assuming that 4.0 subclasses the class and overrides the getter to provide its own accessors for the parameter.
> 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: $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?
--
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: tapestry-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-dev-help@jakarta.apache.org