I have a GET parameter url.xhtml?key=test which is displayed correctly on my site using:
value="#{param.key}"
Now i want to pass that param as an argument in an action method call to my bean inside a commandButton?
But it is always empty in the bean?
action="#{bean.action(param.key)}"
That EL expression is evaluated during the request of processing the form submit, not during the request of displaying the form. The request parameter is apparently not been retained in the subsequent request.
You can do that by adding it as a
<f:param>to the command component: