You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Shawn Church <sh...@boxity.com> on 2004/03/24 22:07:25 UTC
Page activation and navigation
I would like to be able to return to an origin page after activating a
target page, without hard-coding the return page in the target. For
example, I have a list of items on a page, each with a DirectLink to an
item edit page. After the item is edited, I would like to return to
the original item list (rebuilding it as appropriate).
I thought of storing the origin Page object as an attribute of my Visit
just prior to activating the target page, but I wonder if there may be
a better way since the Page object will not be that useful (I suppose
it may not even exist if I don't have caching enabled). I believe the
Page is initialized to a pristine state and returned to the pool after
it drops out of the current request cycle.
I will also need to restore as much of the origin page's initial state
as possible, to be able to regenerate stateless data. Some type of
object stack might work, but I would like it to be generic enough to
avoid introducing page dependencies. Any ideas?
Shawn
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Page activation and navigation
Posted by Shawn Church <sh...@boxity.com>.
Norbi,
Thanks, this worked perfectly. I've seen PageCallback in the login
example, but I didn't realize it would retain the original page state
(which it does). I would like to know how this works (and how the
lifecycle of the original page is affected), but it seems to do what I
needed.
The API example doesn't work however, since the page loses the initial
value of _callback between requests. I had to define this as a
persistent .page property, which did the trick.
Shawn
Quoting Programozás <pr...@hotmail.com>:
> Check out org.apache.tapestry.callback.PageCallback's API docs.
> Norbi
>
> ----- Original Message -----
> From: "Shawn Church" <sh...@boxity.com>
> To: "Tapestry users" <ta...@jakarta.apache.org>
> Sent: Wednesday, March 24, 2004 10:07 PM
> Subject: Page activation and navigation
>
>
> > I would like to be able to return to an origin page after
> activating a
> > target page, without hard-coding the return page in the target.
> For
> > example, I have a list of items on a page, each with a DirectLink
> to an
> > item edit page. After the item is edited, I would like to return
> to
> > the original item list (rebuilding it as appropriate).
> >
> > I thought of storing the origin Page object as an attribute of my
> Visit
> > just prior to activating the target page, but I wonder if there may
> be
> > a better way since the Page object will not be that useful (I
> suppose
> > it may not even exist if I don't have caching enabled). I believe
> the
> > Page is initialized to a pristine state and returned to the pool
> after
> > it drops out of the current request cycle.
> >
> > I will also need to restore as much of the origin page's initial
> state
> > as possible, to be able to regenerate stateless data. Some type of
>
> > object stack might work, but I would like it to be generic enough
> to
> > avoid introducing page dependencies. Any ideas?
> >
> > Shawn
> >
> >
> >
> >
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail:
> tapestry-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail:
> tapestry-user-help@jakarta.apache.org
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
Re: Page activation and navigation
Posted by Programozás <pr...@hotmail.com>.
Check out org.apache.tapestry.callback.PageCallback's API docs.
Norbi
----- Original Message -----
From: "Shawn Church" <sh...@boxity.com>
To: "Tapestry users" <ta...@jakarta.apache.org>
Sent: Wednesday, March 24, 2004 10:07 PM
Subject: Page activation and navigation
> I would like to be able to return to an origin page after activating a
> target page, without hard-coding the return page in the target. For
> example, I have a list of items on a page, each with a DirectLink to an
> item edit page. After the item is edited, I would like to return to
> the original item list (rebuilding it as appropriate).
>
> I thought of storing the origin Page object as an attribute of my Visit
> just prior to activating the target page, but I wonder if there may be
> a better way since the Page object will not be that useful (I suppose
> it may not even exist if I don't have caching enabled). I believe the
> Page is initialized to a pristine state and returned to the pool after
> it drops out of the current request cycle.
>
> I will also need to restore as much of the origin page's initial state
> as possible, to be able to regenerate stateless data. Some type of
> object stack might work, but I would like it to be generic enough to
> avoid introducing page dependencies. Any ideas?
>
> Shawn
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: tapestry-user-help@jakarta.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org