0 Replies Latest reply on Nov 19, 2009 3:24 AM by Randika Hewawasam

    selectManyCheckBox exception

    Randika Hewawasam Newbie

      hi,

      i have a bean which has a List type of . i have getters and setters of the list.

      public List getPackageAdditionalModuleList() {
       packageAdditionalModuleList = new ArrayList();
       List addModList = tenantManager.getAdditionalModule(packageId);
       for (Object obj : addModList) {
       ViewPackageAdditionalModules addMod = (ViewPackageAdditionalModules) obj;
       packageAdditionalModuleList.add(new SelectItem(addMod.getPackageModuleId(), addMod.getModuleName()));
       }
       packageAdditionalModuleList = tenantManager.getAdditionalModule(packageId);
       return packageAdditionalModuleList;
       }


      and in the jsp page i have selectManyCheckBox


       <h:selectManyCheckbox value="#{tableBean.input}" layout="pageDirection">
       <f:selectItems value="#{tenantBean.packageAdditionalModuleList}"/>
       </h:selectManyCheckbox>
      


      and retrieve the selected values from the chatterboxes i have another List type of . (i have tried type of SelectItem also).

      but once i submit the button i'm getting a exception like this


      javax.servlet.ServletException
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:277)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)

      root cause

      java.util.NoSuchElementException
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:130)
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:157)
      javax.faces.component.SelectItemsIterator.next(SelectItemsIterator.java:61)
      javax.faces.component.SelectUtils.matchValue(SelectUtils.java:82)
      javax.faces.component.UISelectOne.validateValue(UISelectOne.java:144)
      javax.faces.component.UIInput.validate(UIInput.java:875)
      javax.faces.component.UIInput.executeValidate(UIInput.java:1072)
      javax.faces.component.UIInput.processValidators(UIInput.java:672)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
      javax.faces.component.UIComponentBase.processValidators(UIComponentBase.java:1058)
      javax.faces.component.UIForm.processValidators(UIForm.java:235)
      org.ajax4jsf.component.AjaxViewRoot$3.invokeContextCallback(AjaxViewRoot.java:439)
      org.ajax4jsf.component.AjaxViewRoot.processPhase(AjaxViewRoot.java:238)
      org.ajax4jsf.component.AjaxViewRoot.processValidators(AjaxViewRoot.java:455)
      com.sun.faces.lifecycle.ProcessValidationsPhase.execute(ProcessValidationsPhase.java:76)
      com.sun.faces.lifecycle.Phase.doPhase(Phase.java:100)
      com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:118)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
      org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
      org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:368)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:495)




      have no idea about this, so if you any idea about this just let me no
      regards,
      Randika