title: jsf h:selectonemenu problem
body: <p>I am developing a jsf,richfaces application.where i want to populate the values of second select menu on the basis of selecting the choice from the first one .i have achieved this like:
  first menu:</p>
  
  <p>
              
              
          
  second menu:</p>
  
  <pre><code>  &lt;h:outputText id="section1" value="Section" /&gt;
      &lt;h:selectOneMenu  id="section2" value="#{content.sectionname}" &gt;
          &lt;f:selectItems  value="#{content.sections}" /&gt;
    &lt;/h:selectOneMenu&gt;
  </code></pre>
  
  <p>what exactly i want is: I have two tables one for category and one for section. If a user choose a category from drop down menu then the other drop down menu for section should have the values only for selected category.Upto this i got the desired result but at the time of submitting the form i am getting the following error:</p>
  
  <p>exception</p>
  
  <pre><code>javax.servlet.ServletException
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  
  root cause
  
  java.util.NoSuchElementException
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:117)
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:144)
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:49)
      javax.faces.component.UISelectOne.matchValue(UISelectOne.java:164)
      javax.faces.component.UISelectOne.validateValue(UISelectOne.java:137)
      javax.faces.component.UIInput.validate(UIInput.java:867)
      javax.faces.component.UIInput.executeValidate(UIInput.java:1065)
      javax.faces.component.UIInput.processValidators(UIInput.java:666)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1033)
      org.richfaces.component.UISwitchablePanel.processValidators(UISwitchablePanel.java:218)
      javax.faces.component.UIForm.processValidators(UIForm.java:229)
      org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:442)
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:235)
      org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:458)
      com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:244)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:388)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:515)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
  </code></pre>
  
  <p>Can anyone please tell me what is the cause of this exception and how i can resolve this.
  Please help.</p>