Yea - to quote you from http://issues.apache.org/jira/browse/TAPESTRY-647
"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!"

:)

On Wed, Aug 20, 2008 at 3:45 AM, Howard Lewis Ship <[EMAIL PROTECTED]> wrote:
> Using exceptions for control flow was never one of Tapestry great
> ideas; that's why its gone in Tapestry 5.  Exceptions are exceptions,
> representing things that have failed.
>
> In any case, the activate event is a good place to perform checks.
> The return vaslue from onActivate() (the name of the event handler,
> following the naming conventions) can be another page in the
> application.  So instead of throwing a redirect to the Login page, you
> just return an instance of it.
>
> On Tue, Aug 19, 2008 at 4:25 PM, Ben Wong <[EMAIL PROTECTED]> wrote:
>> Hi everyone,
>>
>>
>>
>> We have been using Tapestry 3 + Spring + Acegi for the last three years and
>> had a pretty decent integrated architecture going.  Now we are trying to
>> replace Tapestry 3 with Tapestry 5.  One of the things I am trying to do is
>> duplicate a base Tapestry page class that checks if the user is logged in.
>> If not, it will throw a RedirectException to the Login page.
>>
>>
>>
>> I followed the following wiki page on the Tapestry 5 web site but it looks
>> like the method I added in the AppModule never gets call.  Hence, Tapestry 5
>> just throws the RedirectException all the way to the top and the app blows
>> up.
>>
>> http://wiki.apache.org/tapestry/Tapestry5RedirectException
>>
>>
>>
>> BTW, I am using the tapestry-spring module so it is configured to use the
>> TapestrySpringFilter, not the standard TapestryFilter.  I don't know if this
>> makes a difference.
>>
>>
>>
>> I just started learning Tapestry 5 so I am not really sure how the AppModule
>> methods actually get call.  I tried adding debugging statements in the
>> methods but none of the log statements show up.
>>
>>
>>
>> Hope someone can help or point the way to enlightenment.
>>
>>
>>
>> Thanks in advance,
>>
>> Ben Wong
>>
>>
>
>
>
> --
> Howard M. Lewis Ship
>
> Creator Apache Tapestry and Apache HiveMind
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>



-- 
Andreas Andreou - [EMAIL PROTECTED] - http://blog.andyhot.gr
Tapestry / Tacos developer
Open Source / JEE Consulting

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

Reply via email to