2 Replies Latest reply on Feb 5, 2008 11:21 AM by oyesiji77

    Problem using listShuttle

    oyesiji77

      I am having a problem submitting my page containing listShuttle, It loads fine but whenever i submit the page I get the exception




      org.apache.jasper.JasperException: javax.faces.FacesException: Could not retrieve value of component with path : {Component-Path : [Class: org.ajax4jsf.component.AjaxViewRoot,ViewId: /applicant/UploadResume.jsp][Class: javax.faces.component.html.HtmlForm,Id: hf206][Class: org.richfaces.component.html.HtmlPanel,Id: _idJsp13][Class: javax.faces.component.html.HtmlPanelGrid,Id: hpg252][Class: javax.faces.component.html.HtmlPanelGrid,Id: hpg288][Class: org.richfaces.component.html.HtmlListShuttle,Id: rls295][Class: org.richfaces.component.html.HtmlColumn,Id: _idJsp23][Class: javax.faces.component.html.HtmlOutputText,Id: hot297]}
      org.apache.jasper.servlet.JspServletWrapper.handleJspException(JspServletWrapper.java:541)
      org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:435)
      org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:320)
      org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
      javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
      org.apache.myfaces.context.servlet.ServletExternalContextImpl.dispatch(ServletExternalContextImpl.java:419)
      org.apache.myfaces.application.jsp.JspViewHandlerImpl.renderView(JspViewHandlerImpl.java:211)
      org.ajax4jsf.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:108)
      org.ajax4jsf.application.AjaxViewHandler.renderView(AjaxViewHandler.java:216)
      org.apache.myfaces.lifecycle.RenderResponseExecutor.execute(RenderResponseExecutor.java:41)
      org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:132)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:140)
      org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:141)
      org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:281)
      org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)




      Seems its not able to set the targetValue, is there something i am not doing???


      <rich:listShuttle sourceValue="#{newApplicant.freeStates}"
       targetValue="#{newApplicant.choosenStates}" var="items"
       sourceCaptionLabel="Available Locations"
       targetCaptionLabel="Selected Locations" id="rls327" converter="listShuttleConverter">
       <rich:column>
       <h:outputText value="#{items.label}"></h:outputText>
       </rich:column>
       <a4j:support event="onlistchanged" reRender="toolBar" />
       </rich:listShuttle>


        • 1. Re: Problem using listShuttle
          ilya_shaikovsky

          please share the sample. I've built demosite sample in myFaces env.. and can't reproduce this error.

          • 2. Re: Problem using listShuttle
            oyesiji77

            The JSF Source is

            <rich:listShuttle sourceValue="#{newApplicant.freeItems}"
             targetValue="#{newApplicant.selectedIndustry}" var="items"
             sourceCaptionLabel="Available Industries"
             targetCaptionLabel="Selected Industries" sourceListWidth="150" targetListWidth="150" rowClasses="list" id="rls295" converter="listShuttleConverter">
             <rich:column>
             <h:outputText value="#{items.label}" id="hot297"></h:outputText>
             </rich:column>
             <a4j:support event="onlistchanged" reRender="toolBar" />
             </rich:listShuttle>


            The Source value contained in bean is


            /**
             * Gets the free items.
             *
             * @return the free items
             */
             public List getFreeItems() {
             List tempList=(List) super.getApplicationScope().get("categoryXSubCategory");
             List<Map> result=new ArrayList<Map>();
             Map<String,String> tempMap;
             Iterator iterator=tempList.iterator();
            
             while(iterator.hasNext()){
             tempMap=new HashMap<String,String> ();
             Map tempMap2=(Map) iterator.next();
             String tempString=(String) tempMap2.keySet().iterator().next();
             tempMap.put("label",tempString);
             result.add(tempMap);
             }
            
             return result;
             }


            and the destination value is just a list


            public List getSelectedIndustry() {
             return this.selectedIndustry;
             }
            
             public void setSelectedIndustry(List selectedIndustry) {
             this.selectedIndustry = selectedIndustry;
             }