title: JSF Add to selectOneMenu from a List<School>
body: <p>I have a List object which hold School.Id, School.Name, and School.Address .</p>
  
  <p>I need to list all the School.Name in a selectOneMenu List box. How will be the Java code and the corresponding JSF code will be.</p>
  
  <p>My workings so far;</p>
  
  <pre><code>&lt;h:selectOneMenu value="#{School.listschoolName}"&gt;
  &lt;f:selectItems value="#{School.listschoolName}" /&gt;
  &lt;/h:selectOneMenu&gt;
  </code></pre>
  
  <p>Java Class</p>
  
  <pre><code>//And also i got the corresponding getters and setters for these
  private List&lt;School&gt; listschool; 
  
  public void listschoolName(){
      setListschool(hml.findAllSchool());
  }
  </code></pre>
  
  <p>The <code>findAllSchool()</code> method actually returns a <code>List&lt;School&gt;</code> object.</p>
  
  <p>I need to display these School Names on a List Box (dropdown / selectOneMenu ). How can i do this ?</p>
  
  <ul>
  <li>I am using Netbeans 6.9.1 and Galssfish 3</li>
  </ul>