-
1. Re: Request parameters deleted after first submit
sjmenden Jul 6, 2008 9:59 PM (in response to bogdanmocanu2011)See: http://docs.jboss.com/seam/2.0.3.CR1/reference/en-US/html_single/#d0e2121 for an example on a bookmarkable search page and see: http://docs.jboss.com/seam/2.0.3.CR1/reference/en-US/html_single/#d0e4475 for more detail on page params.
-Samuel
-
2. Re: Request parameters deleted after first submit
bogdanmocanu2011 Jul 7, 2008 9:59 AM (in response to bogdanmocanu2011)Thank you Samuel for your answer.
Yes indeed, the links that you specified contain the answer to my question. I also found the following page that provides more information on page parameters, conversations and workspace management: http://docs.jboss.com/seam/latest/reference/en-US/html/conversations.html
The ideea is that when when you need a page to receive a parameter as a request parameter (through GET), then the best strategy is to use the PARAM tag in pages.xml. However, after you design that page to accept and use that parameter, there are some cases (as I had a few days ago, when I posted the first message) when I needed to directly generate some links to this page, links that contain the GET parameter. And to solve this problem, the most elegant solution is to use <f:param/> inside a <h:outputLink/>. Moreover, this way you can also propagate the conversationId parameter (not just the conversation itself) (or just keep the parameter in the address bar, since Seam has the bad behaviour of removing the conversationId from the address sent to the browser for redirection).
Bogdan.
-
3. Re: Request parameters deleted after first submit
tienlantri Oct 5, 2010 11:04 AM (in response to bogdanmocanu2011)Hi Bogdan,
I have the same problem as you even though I dont do bookmark like u. My purpose is to write only one xhtml page and one Action but it can be served to many objects (have the same type of attributes). That's why I need to use request parameter to distinguish the object in order to instantiate them correctly.
However, I cannot use <h:outputLink/> because I need to perform an action when I click on the link. That's why I use <a4j:commandLink/>
So do you have any idea to keep the parameter attached to the URL to the end (I mean after do several actions)?
Thanks,
Tina -
4. Re: Request parameters deleted after first submit
lvdberg Oct 5, 2010 2:29 PM (in response to bogdanmocanu2011)Hi,
you can use the @in and @out annotations also to pass parameters between requests. Is better manageable and you keep the parametersclose to your code instead of inside a pages.xml file.
Leo