2 Replies Latest reply on Feb 12, 2009 6:17 PM by ksinno

    Facing problem with rich:listShuttle

    ksinno

      Hi,

      I am trying to use rich:listShuttle task, as defined per the code below:

      <rich:listShuttle sourceValue="#{sourceList}"
       targetValue="#{targetList}" var="items" listHeight="300"
       listWidth="300" sourceCaptionLabel="Source items"
       targetCaptionLabel="Target Items" ">
       <rich:column>
       <h:outputText value="#{items}"/>
       </rich:column>
       </rich:listShuttle>


      and i have defined my source and target list beans as per the code below:

      <bean id="sourceList" class="java.util.LinkedList">
       <constructor-arg>
       <list>
       <value>123</value>
       <value>456</value>
       <value>789</value>
       </list>
       </constructor-arg>
       </bean>
      
       <bean id="targetList" class="java.util.LinkedList">
       <constructor-arg>
       <list>
       <value>000</value>
       </list>
       </constructor-arg>
       </bean>



      However, I am getting the following exception:
      Argument Error: Parameter targetClass is null

      java.lang.NullPointerException: Argument Error: Parameter targetClass is null
      at com.sun.faces.application.ApplicationImpl.createConverter(ApplicationImpl.java:753)
      at org.richfaces.component.UIOrderingBaseComponent.getConverterForType(UIOrderingBaseComponent.java:534)
      at org.richfaces.component.UIOrderingBaseComponent.getConverterForValue(UIOrderingBaseComponent.java:559)
      at org.richfaces.renderkit.OrderingComponentRendererBase.getConverter(OrderingComponentRendererBase.java:574)
      at org.richfaces.renderkit.ListShuttleRendererBase.encodeRows(ListShuttleRendererBase.java:116)
      at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:267)
      at org.richfaces.renderkit.html.ListShuttleRenderer.doEncodeChildren(ListShuttleRenderer.java:257)
      at org.richfaces.renderkit.ListShuttleRendererBase.encodeChildren(ListShuttleRendererBase.java:244)
      at javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:832)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:936)



      Any idea what's wrong with the implementation above ?
      Please note that when I tried emoving the sourceValue parameter, the task displayed, and the item(s) in the target list appeared.

      Many thanks in advance!