You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by "Howard M. Lewis Ship (JIRA)" <ta...@jakarta.apache.org> on 2005/09/21 22:03:29 UTC

[jira] Closed: (TAPESTRY-647) RedirectException being caught from listener methods as an application exception rather than causing the redirect

     [ http://issues.apache.org/jira/browse/TAPESTRY-647?page=all ]
     
Howard M. Lewis Ship closed TAPESTRY-647:
-----------------------------------------

    Fix Version: 4.0
     Resolution: Fixed

Which just goes to show why using exceptions for this kind of control flow really is a bad idea!  I'll fix it on my next framework, promise!

> RedirectException being caught from listener methods as an application exception rather than causing the redirect
> -----------------------------------------------------------------------------------------------------------------
>
>          Key: TAPESTRY-647
>          URL: http://issues.apache.org/jira/browse/TAPESTRY-647
>      Project: Tapestry
>         Type: Bug
>   Components: Framework
>     Versions: 4.0
>  Environment: Tomcat 5.0.28, WindowsXP Java1.4.2
>     Reporter: Eli Doran
>     Assignee: Howard M. Lewis Ship
>      Fix For: 4.0
>  Attachments: ListenerMethodBinding.patch, TestListenerMethodBinding.patch
>
> up to beta-6 my RedirectException's correctly cause redirects from pageValidate and listener methods. Starting with recent source from SVN the listener methods throwing a RedirectException fail and the RedirectException is displayed in the exception page summary.  The redirect location is valid. If you copy it from the exception display into the browser's location the page will load just fine. 
> Below is some of the information provided when I click on my 'Logout' link. It calls 'doLogout' listener method which throws a RedirectException to the home page.
> Exception invoking listener method doLogout of component member/view: org.apache.tapestry.RedirectException
> redirectLocation:  	/home?page=home&service=page
> # com.elidoran.tapestry.pages.member.MemberPage.doLogout(MemberPage.java:87)
> # sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> # sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> # sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> # java.lang.reflect.Method.invoke(Method.java:324)
> # org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeTargetMethod(ListenerMethodInvokerImpl.java:230)
> # org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:155)
> # org.apache.tapestry.listener.ListenerMethodInvokerImpl.searchAndInvoke(ListenerMethodInvokerImpl.java:124)
> # org.apache.tapestry.listener.ListenerMethodInvokerImpl.invokeListenerMethod(ListenerMethodInvokerImpl.java:69)
> # org.apache.tapestry.listener.SyntheticListener.actionTriggered(SyntheticListener.java:51)
> # org.apache.tapestry.binding.ListenerMethodBinding.actionTriggered(ListenerMethodBinding.java:76)
> # org.apache.tapestry.listener.ListenerInvokerTerminator.invokeListener(ListenerInvokerTerminator.java:51)
> # $ListenerInvoker_1065a8b4da8.invokeListener($ListenerInvoker_1065a8b4da8.java)
> # $ListenerInvoker_1065a8b4da7.invokeListener($ListenerInvoker_1065a8b4da7.java)
> # org.apache.tapestry.link.DirectLink.trigger(DirectLink.java:105)
> # org.apache.tapestry.engine.DirectService.triggerComponent(DirectService.java:144)
> # org.apache.tapestry.engine.DirectService.service(DirectService.java:130)
> # $IEngineService_1065a8b4e00.service($IEngineService_1065a8b4e00.java)
> # org.apache.tapestry.services.impl.EngineServiceInnerProxy.service(EngineServiceInnerProxy.java:74)
> # org.apache.tapestry.services.impl.EngineServiceOuterProxy.service(EngineServiceOuterProxy.java:65)
> # org.apache.tapestry.engine.AbstractEngine.service(AbstractEngine.java:248)

-- 
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