title: Primefaces selectonemenu requiredmessage
body: <p>I am creating a selectonemenu using Primefaces and JSF.
  I want to appear a message saying "Choose one of the options". How can I do that?</p>
  
  <p>This is the code: </p>
  
  <pre><code>  &lt;!--Gender--&gt;
             &lt;p:selectOneMenu id="gender" value="#{users.gender}" required="true"
                                 requiredMessage="Choose one of the options"&gt;
              &lt;f:selectItem itemLabel="Choose gender" itemValue="#{null}" /&gt;
               &lt;f:selectItem itemLabel="Male" itemValue="Male" /&gt;
              &lt;f:selectItem itemLabel="Female" itemValue="Female" /&gt;
            &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>Thanks </p>