-
1. Re: Loosing the URL parameters between requests
pmuir May 3, 2007 5:43 PM (in response to vralev)I think page parameters should do what you are after?
-
2. Re: Loosing the URL parameters between requests
robjellinghaus May 3, 2007 6:52 PM (in response to vralev)The "blogEntryId" *is* a page parameter in the blog example.
I don't understand the theme stuff well enough to know of any easy way to pass the page parameters along with the theme re-request. -
3. Re: Loosing the URL parameters between requests
pmuir May 4, 2007 9:56 AM (in response to vralev)It looks like page parameters don't get added if the page is redisplayed (rather than a navigation performed). Gavin really need to look at this.
-
4. Re: Loosing the URL parameters between requests
vralev May 4, 2007 9:59 AM (in response to vralev)Yes, page parameters don't seem to keep it.
My use case is more common than a theme change. The user is browsing some bookmarkable articles, and if he wants to add a comment he has to log in and stay on the same page. After the log-in the GET params disappear.
One workaround is to use a4j login action and rerender the the needed parts, which is a bit more complicated (and bugged with richfaces right now). -
5. Re: Loosing the URL parameters between requests
sammy8306 May 5, 2007 7:18 AM (in response to vralev)My approach is to cache the parameters in a page scoped component.
-
6. Re: Losing the URL parameters between requests
vralev May 13, 2007 6:26 PM (in response to vralev)After taking a deeper look I figured it out. It needs some navigation defined in pages.xml. For example in the blog demo entry.xhtml page definition should be:
<page view-id="/entry.xhtml"> <param name="blogEntryId" value="#{blogEntry.id}"/> <action execute="#{entryAction.loadBlogEntry(blogEntry.id)}"/> <navigation from-action="#{themeSelector.select}"> <redirect view-id="/entry.xhtml"/> </navigation> </page>
It would be possible to automate this in Seam. It needs:entry.setDefaultNavigation(..);
in Pages.parseActionNavigation for every page, but I see it's specifically coded to avoid creating this default navigation and may be it's better to leave it that way.