• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

at javax.faces.component.SelectItemsIterator.next

 
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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)
 
Crusading Chameleon likes the size of this ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic