-
1. Re: Propagating request parameters question
qbit42 Dec 4, 2009 1:39 PM (in response to twocoasttb)Hi, I belive it talks about the request parameter you can use for <s:button> and <s:link>. They are different from the normal parameters of a form, because they are send throu GET requests. Let me give you an example:
<s:button> <f:param name="foo" value="bar" /> </s:button>
This button would generate an output like this:
<input id="someButton" type="button" onclick="location.href='/yourApp/yourPage.seam?foo=bar&cid=1'; return false;" />
As you can see, the parameter now is included (transparently) into your URL (Thats the main difference between GET and POST). As described in the documentation you now can map these params to an bean (6.3) or to the page contex (6.4).
If you wanna use these param in your action, you have to use the mapped value, get this value from the context or use the @RequestParameter annotation to inject the param (in my oppinion this is the easiest way).Somehow I even don't have to declare the params in the pages.xml and it stil works, but I'm not sure about this. I used Seam-gen and everthing works fine.
I hope this will help you understand reqest params.
-
2. Re: Propagating request parameters question
twocoasttb Dec 4, 2009 8:08 PM (in response to twocoasttb)Thanks Matthias, that clears it up for me.