I have a JSF application and I want the URL in browser address bar be changed on navigation. When I'm on Home.xhtml
and I submit a form, it shows the next page AppHome.xhtml
, but the URL in browser address bar is not changed.
Here's the submit button:
<p:commandButton value="Connect" update="panel" id="ajax" action="#{user.check}" styleClass="ui-priority-primary"/>
Here is the navigation rule:
<navigation-rule>
<from-view-id>/Home.xhtml</from-view-id>
<navigation-case>
<from-outcome>Success</from-outcome>
<to-view-id>/AppHome.xhtml</to-view-id>
</navigation-case>
<navigation-case>
<from-outcome>Failure</from-outcome>
<to-view-id>/Home.xhtml</to-view-id>
</navigation-case>
</navigation-rule>
How do I change the URL in browser address bar when this navigation is performed?