3 Replies Latest reply on Jan 2, 2008 1:31 PM by Justin Cobb

    ListShuttle Question

    Justin Cobb Newbie

      I have a question that I hope someone can answer easily. I am trying to use the list shuttle component. I have used the bean code from the site to get everything working. I have this list shuttle inside a modalPanel.

      I have on problem displaying the listshuttle and moving items between them. The problem I have is that I can't get the results from what is in the target source. I have tried numerous things and am going no where. I am using the aj4 support tag for list change event with no luck. And I am just trying to use a simple form submit. But if I do the submit with a form I get validation errors.

      I have tried a targetSelection param also, but still no luck. What am I doing wrong here? I assume my bean code is correct since the items are displayed fine.

       <h:form>
       <rich:modalPanel id="fieldListModalShuttle" height="270" >
       <f:facet name="header">
       <h:outputText value="Select Field Names"/>
       </f:facet>
      
       <a4j:form ajaxSubmit="true">
       <rich:listShuttle id="modListShuttle" sourceValue="#{ReportingBean.reportMod.freeItems}"
       targetSelection="#{ReportingBean.reportMod.selectedItems}"
      
       targetValue="#{ReportingBean.reportMod.items}" var="items" listsHeight="150"
      
       sourceCaptionLabel="Available Fields"
      
       targetCaptionLabel="Fields For Display"
      
       converter="ToolConverter">
      
      
       <rich:column>
      
       <h:outputText value="#{items.label}"></h:outputText>
      
       </rich:column>
      
       <a4j:support event="onlistchanged" reRender="fieldsDisplay"/>
      
       </rich:listShuttle><br>
      
       <a4j:commandButton style="float:right;" reRender="fieldsDisplay" onclick="hideModal()" value="Close" />
       </a4j:form>
       ]
       </rich:modalPanel>
       </h:form>