@BalusC's solution should do the trick, as always. But I would like to point out a few things, since you seem to be using Primefaces. Both are not related to the question, but may help you at some point.
First, you can use implicit navigation (introduced in JSF2). This way you won’t need to define all the navigation rules in the faces-config.xml file (I’m working on an old JSF 1.2 project and hate the need to define navigation roles for everything). Here's how you do it:
<h:commandButton value="Register for the first time" action="registerFirstTime.xhtml?faces-redirect=true"/>
The face redirection option forces redirection instead of redirection, if you need it.
Also, let's say you want to handle some values correctly, but not all of them. In this case, you can use the process attribute for p: commandButton or p: ajax. for example
<h:commandButton value="Register for the first time" action="registerFirstTime.xhtml?faces-redirect=true" process="@this, name"/>
This would force JSF to process only the button (@this) and the component with id = "name" (your email field). Again, this probably doesn't apply to the this question, but I often use it.
Andre
source share