I have a page that I access using a GET request. Basically along the lines of https://example.com/SomeView.jsf?id=123&somethingElse=1&evenMore=3
Now I want to stay on this page while cycling through some parameter. I can do something along the lines of:
<h:outputLink value="#{request.requestURI}" >
<f:param name="id" value="#{request.getParameter('id')}"/>
<f:param name="somethingElse" value="#{request.getParameter('somethingElse')}"/>
<f:param name="evenMore" value="#{request.getParameter('evenMore')}"/>
<f:param name="displayMode" value="#{bean.nextMode}"/>
Next Display Mode
</h:outputLink>
but I guess there exists a better more idiomatic way of fixing it.
NOTE: It has been suggested that this question is a duplicate of another question that deals with form submits. It is not as clicking the outputLink does not result in a form submit.