Thiago, It turned out that I didn't need bi-directional traversal of the page history, just backtracking. So I went with a stack of objects that encapsulated all the page data I needed to persist. Works great!
Question: To clear the persisted stack, do I need to do anything other than set it to null when I'm done with it? Best, George On Fri, Aug 3, 2012 at 8:01 PM, Thiago H de Paula Figueiredo < thiag...@gmail.com> wrote: > On Fri, 03 Aug 2012 19:32:13 -0300, George Ludwig <georgelud...@gmail.com> > wrote: > > Thiago, >> > > Hi, George! > > > Thanks, that's what I thought was going on. Off the top of my head, my >> thought is to create an aggregating data structure that holds all the >> fields I really need (including a page id, and a previous page id), and >> persist a list of them. Then, in my "onback" method, pass the index of >> the previous page to the setup method. >> > > Sounds good to me. > > > Is there a "best practice" for doing this? >> > > As far as I know, no, so go ahead. :) The only related best practice I can > think of is to only use session persistence when really needed and to > remove stuff from the session when it's not needed anymore. > > >> -George >> >> >> On Thu, Aug 2, 2012 at 6:38 PM, Thiago H de Paula Figueiredo < >> thiag...@gmail.com> wrote: >> >> On Thu, 02 Aug 2012 22:11:47 -0300, George Ludwig < >>> georgelud...@gmail.com> >>> wrote: >>> >>> Thiago, >>> >>>> >>>> >>> Hi! >>> >>> >>> >>> The previouspage object is referenced when we execute the continue >>>> method, >>>> which is what advances to the next iteration: >>>> >>>> @InjectPage >>>> private Refine refine; >>>> >>>> Object onContinue() throws Exception { >>>> >>>> // do a bunch of business logic >>>> >>>> refine.setup(this); >>>> >>>> return refine; >>>> >>>> } >>>> >>>> >>> Yep, what you're seeing is expected. The object is always the same >>> because >>> since Tapestry 5.2 there's a single instance of each page class. Instead >>> of >>> persisting the page instance, persist the data with one or more @Persist >>> fields. >>> >>> >>> -- >>> Thiago H. de Paula Figueiredo >>> >>> ------------------------------****----------------------------** >>> --**--------- >>> To unsubscribe, e-mail: >>> users-unsubscribe@tapestry.**a**pache.org<http://apache.org> >>> <users-unsubscribe@**tapestry.apache.org<users-unsubscr...@tapestry.apache.org> >>> > >>> >>> For additional commands, e-mail: users-h...@tapestry.apache.org >>> >>> >>> > > -- > Thiago H. de Paula Figueiredo > > ------------------------------**------------------------------**--------- > To unsubscribe, e-mail: > users-unsubscribe@tapestry.**apache.org<users-unsubscr...@tapestry.apache.org> > For additional commands, e-mail: users-h...@tapestry.apache.org > >