Thiago H de Paula Figueiredo wrote
> On Fri, 14 Dec 2012 21:43:17 -0200, bhorvat <
> horvat.z.boris@
> >
> wrote:
>
>> So what would be the best way to prevent a page to be accessed without
>> some context?
>
> Object onActivate(EventContext context) {
>
> if (context.getCount() == 0) {
> return ...; // some page or URL to redirect to.
> }
>
> return null;
>
> }
>
>> Also I want to know what is the best way to save cotext. Using onPasivate
>> maybe?
>
> That's the recommended way. Avoids the use of the session. Makes the page
> bookmarkable.
>
> --
> Thiago H. de Paula Figueiredo
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail:
> [email protected]
> For additional commands, e-mail:
> [email protected]
Thanks I will use this approach then.
cheers
--
View this message in context:
http://tapestry.1045711.n5.nabble.com/Best-way-to-prevent-page-to-be-accessed-without-context-tp5718737p5718744.html
Sent from the Tapestry - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]