3 Replies Latest reply on Sep 20, 2007 5:46 PM by Brian Smith

    selectOneMenu and s:convertEntity problems

    Brian Smith Apprentice

      I have some selectOneMenus I am having problems with. I can only assume that this has something to do with s:convertEntity (Seam 2 Beta1)

      Here is my view

      <ui:define name="inputArea">
       <h:panelGrid columns="2">
       <h:outputLabel value="#{messages['Assignment.complaintType']}" for="complaintType_select"/>
       <h:selectOneMenu id="complaintType_select" value="#{complaintType}">
       <s:selectItems label="#{complaint.complaintTypeDescription}"
       value="#{serviceRequest.requestType.complaintTypeList}"
       var="complaint"
       noSelectionLabel="(none)"/>
       <s:convertEntity/>
       <a4j:support event="onchange"
       ajaxSingle="true" reRender="sectionComplaint_select"/>
       </h:selectOneMenu>
       <h:outputLabel for="sectionComplaint_select" value="#{messages['Assignment.divisionSection']}"/>
       <h:selectOneMenu id="sectionComplaint_select" value="#{sectionComplaint}">
       <c:choose>
       <c:when test="#{complaintType != null}">
       <s:selectItems label="#{sectComplaint.divisionSection.division.divisionName} - #{sectComplaint.divisionSection.divisionSectionName}"
       value="#{complaintType.sectionComplaintList}"
       var="sectComplaint"/>
       <s:convertEntity/>
       </c:when>
       <c:otherwise>
       <f:selectItem/>
       </c:otherwise>
       </c:choose>
       </h:selectOneMenu>
       <h:outputLabel for="priority_select" value="#{messages['Assignment.priority']}"/>
       <h:selectOneMenu id="priority_select" value="#{priority}">
       <s:selectItems label="#{prior.priorityDescription}"
       value="#{allPriorities.resultList}"
       var="prior">
       </s:selectItems>
       <s:convertEntity/>
       </h:selectOneMenu>
       <h:outputLabel value="#{messages['Assignment.courtesy']}" for="courtesy_input"/>
       <h:selectBooleanCheckbox id="courtesy_input" value="#{assignment.courtesy}"/>
       </h:panelGrid>
      </ui:define>
      <ui:define name="buttonArea">
       <a4j:commandButton id="createAssignment_button"
       value="#{messages['ServiceRequest.createAssignment']}"
       actionListener="#{serviceRequestManager.createAssignment}"
       reRender="assignmentOutput"/>
      </ui:define>
      


      My actionListener is never called, the error is being thrown while jsf is processing the request.

      All of my entities have implemented equals() appropriately (primary key equality)

      Here is the stack trace.

      javax.servlet.ServletException
       at javax.faces.webapp.FacesServlet.service(FacesServlet.java:256)
       at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
       at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
       at org.jboss.seam.debug.hot.HotDeployFilter.doFilter(HotDeployFilter.java:63)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:87)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:63)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:46)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
       at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
       at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:40)
       at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
       at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:140)
       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.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:156)
       at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
       at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:241)
       at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
       at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:580)
       at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
       at java.lang.Thread.run(Thread.java:595)
      Caused by: java.util.NoSuchElementException
       at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:117)
       at javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:144)
       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 org.richfaces.component.UISwitchablePanel.processValidators(UISwitchablePanel.java:219)
       at javax.faces.component.UIForm.processValidators(UIForm.java:229)
       at javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1030)
       at javax.faces.component.UIViewRoot.processValidators(UIViewRoot.java:662)
       at org.ajax4jsf.component.AjaxViewRoot.access$201(AjaxViewRoot.java:59)
       at org.ajax4jsf.component.AjaxViewRoot$3.invokeRoot(AjaxViewRoot.java:321)
       at org.ajax4jsf.context.JsfOneOneInvoker.invokeOnRegionOrRoot(JsfOneOneInvoker.java:56)
       at org.ajax4jsf.context.AjaxContextImpl.invokeOnRegionOrRoot(AjaxContextImpl.java:173)
       at org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:335)
       at com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:100)
       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)
       ... 35 more