https://issues.apache.org/jira/browse/TAPESTRY-1116
On 10/20/06, Sam Gendler <[EMAIL PROTECTED]> wrote:
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? --sam --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
-- Jesse Kuhnert Tapestry/Dojo/(and a dash of TestNG), team member/developer Open source based consulting work centered around dojo/tapestry/tacos/hivemind. http://blog.opencomponentry.com