You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ji...@apache.org> on 2013/07/25 02:07:49 UTC

[jira] [Assigned] (TAP5-1736) Overridden base class methods causing a second submit

     [ https://issues.apache.org/jira/browse/TAP5-1736?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Howard M. Lewis Ship reassigned TAP5-1736:
------------------------------------------

    Assignee: Howard M. Lewis Ship
    
> Overridden base class methods causing a second submit
> -----------------------------------------------------
>
>                 Key: TAP5-1736
>                 URL: https://issues.apache.org/jira/browse/TAP5-1736
>             Project: Tapestry 5
>          Issue Type: Bug
>          Components: tapestry-core
>    Affects Versions: 5.3
>            Reporter: Peter Stavrinides
>            Assignee: Howard M. Lewis Ship
>
> As of Tapestry 5.3.0 overridden base class methods are causing a second submit, behaviour not present in Tapestry 5.1:
> public abstract class BaseClass {
>    public abstract Object onSuccessFromStep1();
> }
>  public class SubClass extends BaseClass{
> @Override
> public Object onSuccessFromStep1() {
>    if (!foundErrors())
>         incrementStep();
>    return null;
> }
> }
> onSuccessFromStep1()  is invoked twice in this example... the simple workaround is to return true, but this will not suffice when handling objects. 
> Comment from Howard:
> I suspect Tapestry is not recognizing that
> SubClass.onSuccessFromStep1() is an override of
> BaseClass.onSuccessFromStep1() (perhaps the abstract flag is throwing
> it).
> So, Tapestry builds code for BaseClass, and implements
> dispatchComponentEvent() to invoke onSuccessFromStep1().
> It then builds code for SubClass, sees onSuccessFromStep1(), doesn't
> think it's an override of the base class method (for whatever reason),
> and implements dispatchComponentEvent() to (a) invoke
> super.dispatchComponentEvent(), and (b) invoke onSuccessFromStep1().
> Thus two invocations.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira