title: how to put a string value from <h:inputHidden> to a bean property?
body: <p>I have a simple "register" page built with primefaces tags where user inputs his login, clicks OK and that info is stored in DB via POST request to a bean. Login is saved properly, but there is another one...
  I want to store implicit String field which represents user's "role" and is always equal to "Guest". I've tried two different approaches but all of them failed for me:</p>
  
  <p>1)</p>
  
  <pre><code>&lt;h:outputLabel for="login" value="Login" /&gt;
  &lt;p:inputText required="true" id="login" value="#{userBean.login}" 
      label="Login" /&gt;
  &lt;h:inputHidden value="#{userBean.roleName}" id="rolename" 
      name="Guest" /&gt;
  &lt;p:commandButton value="OK" update="dataForm" action="#{userBean.create}" 
       ajax="false"&gt;
  </code></pre>
  
  <p>2)</p>
  
  <pre><code>&lt;h:outputLabel for="login" value="Login" /&gt;
  &lt;p:inputText required="true" id="login" value="#{userBean.login}"
       label="Login" /&gt;
  &lt;p:commandButton value="OK" update="dataForm" action="#{userBean.create}" 
      ajax="false"&gt;
      &lt;f:param id="rolename" value="User" binding="#{userBean.roleName}"/&gt; 
  &lt;/p:commandButton&gt;
  </code></pre>
  
  <p>could anybody provide an idea for me?
  thx.
  environment: jdk7, tomcat7, eclipse, primefaces</p>