Piero,

Thanks a lot!! It worked!

  - Ashwanth

On Sun, Dec 27, 2009 at 6:17 PM, Piero Sartini <li...@pierosartini.de>wrote:

> >   2. If No, help me with the following scenario in my project.
> >   I need to show a page a page to the user, only when it has a context
> with
> >   it! Else i need to redirect the user to another page. Though i  link
> the
> >   page, only with the t:context, i just need to confirm no one has ever
> >   bookmarked the page, and is seeing it.
>
> Instead of using 2 onActivate() methods, you may also make use of
> EventContext. It's often less verbose and better to read:
>
> ----------------------------------
> Object onActivate(EventContext eventContext) {
>  switch (eventContext.getCount()) {
>      case 0:
>            return NoContextPage.class;
>      case 1:
>            this.myparameterstring = eventContext.get(String.class, 1);
>      break;
>  }
> }
> ----------------------------------
>
>
>           Piero
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>

Reply via email to