posted 14 years ago
I have a requirement where I need to populate the drop down content after user interaction. I'm populating the drop down using a4j, but again when I submit this form, for some reason, it seems it cannot read the or identity the data present inside the drop down....
<h:form>
.......
<h:selectOneMenu value="#{coreServices.selectSomething}" id="list" rendered="true">
<f:selectItems value="#{coreServices.selectListOfValues}" />
</h:selectOneMenu>
<a4j:commandButton action="#{coreServices.ListOfValues}" value="Get Values" reRender="list"/>
.....
</h:form>
The above code it working as expected, like when I click on action "Get Values" it is populating the drop down menu.
But again, when I select one of the values from the drop down and submit the page, I get following error. Can someone suggest, what I'm missing or doing wrong ?
java.util.NoSuchElementException
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:118)
at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:144)
at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:161)
at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:134)
at javax.faces.component.UIInput.validate(UIInput.java:665)
at javax.faces.component.UIInput.executeValidate(UIInput.java:869)
at javax.faces.component.UIInput.processValidators(UIInput.java:432)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
at javax.faces.component.UIForm.processValidators(UIForm.java:190)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:932)
at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:362)
at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:57)
at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:319)
at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:170)
at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:333)
at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:98)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:245)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:110)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:213)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)