I am developing an application where I have to show data from the database based on User Input (let's say field empid for employee id and I show some information from database based on this input). I am using JSF, PrimeFace and Hibernate.
Now I have the index.xhtml page where I am taking input the empid. After that, I have to redirect to another page page2.xhtml.
Here is a snippet from index.xhtml:
<h:form>
<p>Employee ID:
<p:inputText value="#{userBean.newuser.empid}" required="true"/></p>
</h:form>
<br />
<h:form>
<p:commandButton action="page2?faces-redirect=true" value="Enter" />
</h:form>
But after re-directing to page2.xhtml, the empid input from index.xhtml page is lost. I tried to read a few posts on this but was not able to understand. Please help. I am sorry if it is a repeated question.