>From  Matt Raible <[EMAIL PROTECTED]>:
> On 3/31/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> > 1) Why not have a custom StaleSession.html page?
> > Its pageBeginRender could redirect to the login form, couldn't it?
> 
> Yes it could.  I'm assuming the code needed to override this page is
> similar to overriding the error page in hivemodule.xml?
> 
>     <contribution configuration-id="tapestry.InfrastructureOverrides">
>         <property name="exceptionPageName" value="error"/>
>         <property name="staleSessionPageName" value="staleSession"/> (??)
>     </contribution>

Yea - see
http://jakarta.apache.org/tapestry/tapestry/hivedocs/config/tapestry.Infrastructure.html
But why override the name?
Simply create a StaleSession.html and StaleSession.page file in WEB-INF

> 
> >
> > 5) Review
> http://jakarta.apache.org/tapestry/UsersGuide/listenermethods.html :)
> > .. and return an ILink instance from your listener
> 
> Yeah, I'm using that in other areas. Will Tapestry doesn't seem to
> retain any properties I set on the page when using this? 

That's the idea - it forces a client redirect .. only persisted properties will
remain (either session, or client or flash persisted).

> Also, in some
> instances, I'm redirecting to the root of my application rather than a
> specific Tapestry page, but I guess
> getRequestCycle().sendRedirect(contextPath) will work for that.

It should work, but why not activate the Home service? Inject it and
return _homeService.getLink(...)

With all those refactorings in place, request cycle almost 
disappears from user classes = no need to mock it + even easier tests.

> 
> Thanks,
> 
> Matt
> 
> 



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

Reply via email to