I haven't tried to solve your situation as I'm not sure I understand
your case but here is my attempt to give back to this list something
in return :)

Q1. onActivate is "eventually" called because the page link directed
to that page, it's not the direct result of clicking that link (event
handling method), it's just the eventual result.

Q2. This page will help you
http://tapestry.apache.org/page-navigation.html. May be you need to
have a "actionlink" instead, and handle it, then return what suits you
most.

Tell me if this helps :)

On Wed, Sep 7, 2011 at 5:25 PM, lifestyles_ <lifestyl...@hotmail.com> wrote:
> Hi, i'm trying to implement a situation where as, i have a PageA, PageB and
> PageC.  When using PageA, depending on different situations, i would want
> the page to render, otherwise, it would want to render PageC.
>
> What happen's in real life is :
> Start of with PageA::onActivate(), the conditions don't apply for a
> redirection to PageC, so PageA is rendered.  On PageA, i've got a PageLink
> that brings me to PageB.  When i click on it, PageA::onActivate() is called,
> and at this point, the conditions apply for a redirection to PageC, so PageB
> is never called (since i clicked on the PageLink, i want to show PageB, but
> the onActivate is called and i don't have a way to determine if it's from
> the PageLink).
>
> Everywhere i read, it's suggested that the onActivate : <<A good
> "rule of thumb" is to use onActivate(...) and onPassivate() for no
> more than receiving and returning the activation context.
> In this page, for example, onActivate(...) receives a person id and
> onPassivate() returns a person id. It can be tempting to put setup code into
> onActivate(...) but avoid this because onActivate(...) is called very
> often" >>
> http://jumpstart.doublenegative.com.au/jumpstart/examples/navigation/onactivateandonpassivate/3
> Jumpstart - PageNavigation .
>
> Question #1 : Why is the onActivate() called when choosing the PageLink ?
>
> Question #2 : What other way can i redirect a to another page without using
> onActivate ?
>
> Thank you for your time
>
> Rene
>
> --
> View this message in context: 
> http://tapestry.1045711.n5.nabble.com/Page-redirection-tp4778938p4778938.html
> Sent from the Tapestry - User mailing list archive at Nabble.com.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
> For additional commands, e-mail: users-h...@tapestry.apache.org
>
>



-- 
Regards,
Muhammad Gelbana
Java Developer

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to