I have this JSF page with a form which contains fields "company". I am trying to pre-populate the company fields with the URL. So, once the following link is clicked
localhost/accounts/index.jsf?company=test
users should see the form with company field filled with value "test".
Here is my JSF file
<p><h:inputText id="company" name="company" value="#{Bean.company}" required="true"
requiredMessage="Please enter your company" /></p>
I have tried to use f:viewParam by followed this tutorial (8. page parameters), but still could not get it working. http://java.dzone.com/articles/how-do-10-common-tasks-jsf-20
Does anyone know how to fix this? Thanks!