You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Patrick Casey <pa...@adelphia.net> on 2005/04/28 20:36:24 UTC

Looking for Advice on the "Tapestry Way" to recall where a page came from

 

            Right now I have a system that has a great deal of list forms
from which users select an element and got to a detail form where they do
some stuff and (usually) press submit.

 

            At the end of the submit, I want the user to redirect back to
the list form he was just on. 

 

            Right now I'm achieving this with a data structure in my visit
objects that keeps track of the "source" for each edit page the user has
rendered and then redirects back to that particular source when a successful
submit happens. It's sort of a frail solution though as a user could
potentially narf it by bringing up two parallel lists and editing from each
(in which case whichever edit button gets pressed second wins). Likewise
it's a solution that doesn't really use tapestry at all, it harkens back to
my pre-tapestry days when I'd either stash stuff in the session or (more
commonly) use lots, and lots, of hidden fields to allow loopback.

 

            Is there a best practices approach to enabling this sort of
thing within tapestry? Or is my old school approach more or less the way
others have been managing this?

 

            --- Pat


Re: Looking for Advice on the "Tapestry Way" to recall where a page came from

Posted by Erik Hatcher <er...@ehatchersolutions.com>.
Have a look at using ICallback and family.  The VLib example 
application leverages this for the login page so that a user attempting 
to go to a page before logging in is redirected to the login page, then 
redirected back to the page requested.  A stack of ICallback's can be 
quite handy!  I've even used them for a tree menu system and it worked 
well.

	Erik

On Apr 28, 2005, at 2:36 PM, Patrick Casey wrote:

>
>
>             Right now I have a system that has a great deal of list 
> forms
> from which users select an element and got to a detail form where they 
> do
> some stuff and (usually) press submit.
>
>
>
>             At the end of the submit, I want the user to redirect back 
> to
> the list form he was just on.
>
>
>
>             Right now I'm achieving this with a data structure in my 
> visit
> objects that keeps track of the "source" for each edit page the user 
> has
> rendered and then redirects back to that particular source when a 
> successful
> submit happens. It's sort of a frail solution though as a user could
> potentially narf it by bringing up two parallel lists and editing from 
> each
> (in which case whichever edit button gets pressed second wins). 
> Likewise
> it's a solution that doesn't really use tapestry at all, it harkens 
> back to
> my pre-tapestry days when I'd either stash stuff in the session or 
> (more
> commonly) use lots, and lots, of hidden fields to allow loopback.
>
>
>
>             Is there a best practices approach to enabling this sort of
> thing within tapestry? Or is my old school approach more or less the 
> way
> others have been managing this?
>
>
>
>             --- Pat
>


---------------------------------------------------------------------
To unsubscribe, e-mail: tapestry-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: tapestry-user-help@jakarta.apache.org