[ 
https://issues.apache.org/jira/browse/TAPESTRY-1771?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12529709
 ] 

Howard M. Lewis Ship commented on TAPESTRY-1771:
------------------------------------------------

Because of the piecewise way Tapestry handles things, the methods look like 
different methods to Tapestry.

That is, Tapestry adds an implementation of the methods of the Component 
interface that invokes the base class method.

It then implements, in a subclass, the same Component method; the subclass 
delegates to the super implementation, then invokes the methods of the subclass 
... inlcuding the override.

I think the correct thing here is for Tapestry to recognize that a particular 
render phase method is an override of a method of the super class.  It may rely 
on the user placing an @Override annotation on the subclass method.  In those 
cases, the subclass method will only be invoked from the render phase method 
implementation of the class in which it is introduced (that is, the base class, 
not the sub class).

In the meantime ... the easy workaround is to make render phase methods in base 
classes final, or at least, don't override them.

> Render Phase method called twice when overriding base class method
> ------------------------------------------------------------------
>
>                 Key: TAPESTRY-1771
>                 URL: https://issues.apache.org/jira/browse/TAPESTRY-1771
>             Project: Tapestry
>          Issue Type: Bug
>    Affects Versions: 5.0.5
>            Reporter: Ted Steen
>             Fix For: 5.0.6
>
>
> When implementing a render phase method in a base class (in base package) and 
> then overriding it in the extending class (in the page package) the render 
> phase method is called twice. Expected behaviour is that it should be called 
> once.
> Also if the method in the base class has a different name than the method in 
> the extending class, then the annotated method in the base class is called 
> _and_ the annotated method in the extending class is called. But maybe this 
> is expected behaviour?

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


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

Reply via email to