strange problem with ajax4jsf and s:selectItems
hasc Jun 15, 2007 8:02 AMHi,
i'm getting a exception on my page and i have no clue why. the overall architecture is a little bit hard to explain so i'll try to do it in short and if you need more details please tell me.
I have have a few input fields within a a4j:region tag. if the value of a field changes all data is submitted to the bean and if the validation succeeds an object is created and added to a list. the list is in return outjected as datamodel and the table displaying the list is rerendered and the region of the input fields.
<a4j:region> <h:panelGrid id="allocateArea" columns="2" columnClasses="label,input"> <h:outputLabel for="utilisationType" value="#{messages.utilisationType}:"/> <h:panelGroup> <h:selectOneMenu converter="#{objectmanager.modeOfUtilisationConverter}" id="utilisationType" value="#{tcmanager.modeOfUtilisation}"> <f:selectItem itemLabel="" itemValue="#{objectmanager.nullModeOfUtilisation}" /> <s:selectItems value="#{tcmanager.modesOfUtilisation}"/> <a4j:support event="onchange" reRender="addArea" limitToList="true" ajaxSingle="true"/> </h:selectOneMenu> </h:panelGroup> <h:outputLabel for="allocatedAreas_numOfAreas" value="#{messages.amount}:"/> <h:panelGroup> <h:inputText id="allocatedAreas_numOfAreas" value="#{tcmanager.numOfAreas}"> <a4j:support event="onkeyup" requestDelay="50" reRender="addArea,errorPanel_allocatedAreas" limitToList="true"/> </h:inputText> ... more input fields </a4g:region>
so, whenever something changes all data is submitted. from time to time i get an exception when i add table items:
13:46:20,437 WARN [lifecycle] executePhase(PROCESS_VALIDATIONS 3,com.sun.faces.context.FacesContextImpl@d6130f) threw exception javax.faces.FacesException at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:108) at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:251) at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:244) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.ajax4jsf.framework.ajax.xmlfilter.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:127) at org.ajax4jsf.framework.ajax.xmlfilter.BaseFilter.doFilter(BaseFilter.java:277) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:63) at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:60) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.CharacterEncodingFilter.doFilter(CharacterEncodingFilter.java:43) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:57) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:79) at org.jboss.seam.web.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:49) at org.jboss.seam.web.SeamFilter.doFilter(SeamFilter.java:84) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96) 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:230) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175) at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:179) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:433) at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:104) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:437) at org.apache.coyote.ajp.AjpProtocol$AjpConnectionHandler.process(AjpProtocol.java:381) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447) at java.lang.Thread.run(Thread.java:595) Caused by: java.lang.IllegalArgumentException at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:166) at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:49) at javax.faces.component.UISelectOne.matchValue(UISelectOne.java:164) at javax.faces.component.UISelectOne.validateValue(UISelectOne.java:137) at javax.faces.component.UIInput.validate(UIInput.java:867) at javax.faces.component.UIInput.executeValidate(UIInput.java:1065) at javax.faces.component.UIInput.processValidators(UIInput.java:666) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030) at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030) at org.ajax4jsf.framework.ajax.AjaxViewRoot$3.invoke(AjaxViewRoot.java:311) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:75) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnComponent(JsfOneOneInvoker.java:80) at org.ajax4jsf.framework.ajax.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:55) at org.ajax4jsf.framework.ajax.AjaxContext.invokeOnRegionOrRoot(AjaxContext.java:191) at org.ajax4jsf.framework.ajax.AjaxViewRoot.processValidators(AjaxViewRoot.java:329) at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100) ... 39 more
this is maybe not enough info but i expect it gets more and more confusing.
thanks for any help
regards,
hasc