title: Primefaces selectOneMenu doesn't retain focus on selected item when reopened
body: <p>The Primefaces <code>p:selectOneMenu</code> component does not seem to bring focus to a previously selected item. For example, if I have a menu of countries set up as follows</p>
  
  <pre><code>    &lt;p:selectOneMenu id="countryMenu" value="#{myBean.selectedCountry}"&gt;
          &lt;f:selectItem value="#{null}" itemLabel="Please select a Country..."/&gt;
          &lt;f:selectItems value="#{myBean.countries}" var="country" 
                         itemValue="#{country.code}" 
                         itemLabel="#{country.name}"/&gt;
          &lt;p:ajax update="anotherComponent"/&gt;
      &lt;/p:selectOneMenu&gt;
  </code></pre>
  
  <p>and I select a country from the list, then click on the menu again it displays the list of countries from the beginning. It <em>does</em> retain the selected country - it just doesn't scroll down and focus on it.</p>
  
  <p>The standard JSF <code>h:selectOneMenu</code> displays the expected behaviour - it opens with the previously selected country visible.</p>
  
  <p>Is there some trick to this or is this a bug? </p>
  
  <p>It also has a <a href="http://forum.primefaces.org/viewtopic.php?f=3&amp;t=14182" rel="nofollow">number of other quirks</a> with how it responds to keyboard input (pressing up/down when the menu has focus doesn't open the menu, for example), which is a little frustrating.</p>
  
  <p>I'm using:</p>
  
  <ul>
  <li>Primefaces 3.1 </li>
  <li>Glassfish 3.1.1 </li>
  <li>NetBeans 7.1</li>
  </ul>