OK, I did the obvious thing here, even if it is less than elegant. Since I am deliberately calling forgetPage() to remove all information. I just call forgetPage() and then send an HTTP redirect back to the same page. I hate relying on redirects for things, but this seemed to be an appropriate time.
--sam On 10/20/06, Sam Gendler <[EMAIL PROTECTED]> wrote: > This isn't tacos specific, so I apologize for the pam, but it seems > like a lot of the more experienced tapestry developers don't read the > tap-users list terribly frequently, so I thought I'd try my luck over > here: > > I've got a CSS menu bar on my pages. I want the links in the menu to > use ExternalLink so that they are bookmarkable. I can't have the link > submitting back to a listener method in my shell component, beacuse > then the URL is always one page behind the page I am actually looking > at, since the parameters in the URL will have the page name/component > name of the PREVIOUS page. > > Many of the pages accessed via the menu have tables on them which are > derived from contrib:table, meaning that the state of the table pages > and sorted column are kept in the session. > > When accessing a page via the menu, I always want the page to be in > its default state. I only want the table state to be retained when > accessing the page via other links, never the menu. I can't easily > just reset all the values in activateExternalPage because many of the > persistent properties are actually part of components nested several > levels deep within the page. Calling cycle.forgetPage() would > ordinarily be enough to blow all the stored state about any component > in the page out of the session (I assume that's what it does, anyway). > > So I tried adding a parameter to the service parameters that get > passed to activateExternalPage(). If I get a reset param, then I call > cycle.forgetPage(getPageName()); This mostly works - however, because > activateExternalPage is called AFTER the page is attached, it has > already been populated with values from the session, so after > activateExternalPage runs, the page displays with its stored state. > Then, if I hit reload, the page gets a new instance form the page > cache, and this time the session has been cleared of all data BEFORE > the page was attached, so now it displays in its default state. > > So then I tried calling cycle.forgetPage() and then created an > ExternalCallback to the > current page, this time without the reset parameter, since the page > has already been reset. I then call performCallback on the callback, > to try to get an instance of the page to run which is populated after > the call to forgetPage(). In my logs, I can see activateExternalPage > getting called twice, but the second one still has the saved state. > The only way to get the reset to actually show up is to reload the > page - basically, it appears to require a new request cycle in order > to forget a page. > > Is there some other way around this? > ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Tacos-devel mailing list Tacos-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/tacos-devel