This should be simple, but I am looking at other questions and I am not able to find the right answer for my issue.
I have a JSF page that calls a method myController.load()
:
<f:metadata>
<f:viewParam name="id" value="#{myController.id}" required="false"/>
<f:viewAction action="#{myController.load()}" />
This method will generate an id
that is placed in myController.id
if originally the page was not called with such parameter. My question is how can I make the URL at the navigation bar reflect this change, i.e. insert this new parameter in the URL. Basically:
--> Browse to myPage.xhtml
--> call to myController.load()
which sets myController.id
= 1
--> Reflect in URL myPage.xhtml?id=1
. Ideally without re-loading the page