Details
Description
<f:param> can be added to both commandLink and commandButton, for instance in "basic":
<h:commandButton id="button1" value="Show/Hide"
actionListener="#{basic.toggle}">
</h:commandButton>
<h:commandButton id="button1param" value="Show/Hide"
actionListener="#{basic.toggle}">
<f:param name="commandparam" value="buttonparam" />
</h:commandButton>
<h:commandLink id="link1param" value="Show/Hide"
actionListener="#{basic.toggle}">
<f:param name="commandparam" value="linkparam" />
</h:commandLink>
This should still yield Ajax interaction, but a full page refresh is observed with the commandLink and commandButton with f:param.
Generated markup is as follows (includes commandLink with no param as well):
<input id="button1" name="button1" type="submit" value="Show/Hide" />
<input id="button1param" name="button1param" onclick="mojarra.jsfcljs(document.getElementById('form1'),
{'button1param':'button1param','commandparam':'buttonparam'},'');return false" type="submit" value="Show/Hide" />
<a href="#" id="link1" onclick="mojarra.jsfcljs(document.getElementById('form1'),
{'link1':'link1','commandparam':'linkparam'},'');return false">Show/Hide</a>
<a href="#" id="linknoparam" onclick="mojarra.jsfcljs(document.getElementById('form1'),
{'linknoparam':'linknoparam'},'');return false">Show/Hide</a>