title: primefaces selectOneMenu how to reload
body: <p>I use 3 selectOneMenu components in my project. I need to reload content of the second after change in the first. Here are some parts of the files</p>
  
  <p>index.xhtml</p>
  
  <pre><code>&lt;h:form id="form"&gt;
  &lt;p:selectOneMenu id="Rząd" value="#{birdSelectorBean.selectedState}" effect="fade"
  style="width: 150px;"&gt;  
  &lt;f:selectItem itemLabel="Rząd" itemValue="" /&gt;  
  &lt;f:selectItems value="#{birdSelectorBean.rzad}" /&gt;  
  &lt;p:ajax render="@form" listener="#{birdSelectorBean.stateChangeListener}" /&gt;
  &lt;/p:selectOneMenu&gt; 
  
  &lt;p:selectOneMenu id="rodzina" value="#{birdSelectorBean.selectedState}" effect="fade"
  style="width: 150px;"&gt;  
  &lt;f:selectItem itemLabel="Rodzina" itemValue="" /&gt;
  &lt;f:selectItems value="#{birdSelectorBean.rodzina}" /&gt;
  &lt;/p:selectOneMenu&gt;
  
  &lt;p:selectOneMenu id="rodzaj" value="#{birdSelectorBean.selectedState}" effect="fade"
  style="width: 150px;"&gt;  
  &lt;f:selectItem itemLabel="Rodzaj" itemValue="" /&gt;   
  &lt;f:selectItems value="#{birdSelectorBean.rodzaj}" /&gt;
  &lt;/p:selectOneMenu&gt;
  &lt;/h:form&gt;
  </code></pre>
  
  <p>BirdSelectionBean.java:</p>
  
  <pre><code>public class BirdSelectorBean
  {
  private String selectedState;
  private List&lt;SelectItem&gt; rzad;
  private List&lt;SelectItem&gt; rodzina;
  private List&lt;SelectItem&gt; rodzaj;
  
  public BirdSelectorBean()
  {
      rzad = new ArrayList&lt;&gt;();
      rzad.add(new SelectItem("Rząd_X"));
      rzad.add(new SelectItem("Rząd_Y"));
      rzad.add(new SelectItem("Rząd_Z"));
  
      rodzina = new ArrayList&lt;&gt;();
      rodzaj = new ArrayList&lt;&gt;();
  }
  
  public void stateChangeListener(ValueChangeEvent event)
  {
      rodzina.clear();
      rodzina.add(new SelectItem("Rodzina_A"));
      rodzina.add(new SelectItem("Rodzina_B"));
      rodzina.add(new SelectItem("Rodzina_C"));
  }
  ...
  getters and setters
  ...
  }
  </code></pre>
  
  <p>I read many topics on that but it doesn't work for me. I tried update="rodzina" like it is in example
  <a href="http://www.primefaces.org/showcase/ui/pprSelect.jsf" rel="nofollow noreferrer">here</a>
  and render option like it is said in that
  <a href="https://stackoverflow.com/questions/12641409/update-selectonemenu-if-value-of-ohter-selectonemenu-is-set-event-isnt-fired">topic</a>:
  But it still doesn't work. Please help me :]</p>