Can I change the request params in my backing bean?
I want to change the request params in the backing bean method.
For example:
<h:commandLink value="test" action"myBean.test">
<f:param name="a" value="1" />
</h:commandLink>
When user click the link, myBean.test() will be invoked.
Can I change the request param values in myBean.test()?
I mean, if I can change the value of "a" to "2" or add a new param?
Thanks!
[435 byte] By [
zhlmmca] at [2007-10-2 21:04:49]

I'm not sure if You can change any request parameters...
You can set e.g. a request attribute in the case that You get the request object from the faces context and set the attribute.
something like this...
FacesContext fc = FacesContext.getCurrentInstance();
HttpServletRequest req =HttpServletRequest)fc.getExternalContext().getRequest();
req.getParameter("id");
req.setAttribute("id", new Integer(2));