3 Replies Latest reply on Aug 5, 2008 3:52 PM by darmstadter

    list shuttle problems

    milankoko

      I am trying to make list shuttle work for me but I am having plenty of difficulties. It keeps giving me:


      "Component inputForm:j_id34:sellerPickList has invalid value expression net.brainsoft.va.server.dataaccess.model.VaSellerModel@1afc9b8" validation error.


      I have no idea what's causing it. VaSellerModel is my class where I hold my data. Here is how I defined list shuttle:

      <rich:listShuttle id="sellerPickList"
       sourceSelection="#{placeActionManager.sourceSellers}"
       targetSelection="#{placeActionManager.targetSellers}"
       sourceValue="#{placeActionManager.sourceSellersList}"
       targetValue="#{placeActionManager.targetSellersList}"
       var="seller"
       targetRequired="true"
       sourceCaptionLabel="Available Items"
       targetCaptionLabel="Currently Active Items"
       sourceListWidth="250px" targetListWidth="250px"
       orderControlsVisible="false"
       fastOrderControlsVisible="false"
       converter="sellerModelConverter"
       >
       <rich:column>
       <h:outputText value="#{seller.id}"></h:outputText>
       </rich:column>
      </rich:listShuttle>
      


      If I only set Selection Set nothing is displayed, but it causes no problem going through validation. So i put Value list in there as well, to view what is displayed on lists. First I made value lists of type List, but that gave me the above validation error, although it did display it correctly. So I changed to List and made a converter between VaSellerMOdel and String representation. That gives me same validation error, but displays items on the list well. Selection sets are of type Set. Does anyone know what my problem is?


      Actually I can't understand the logic for separate Source/Target Selection and Value collections. Why not just have a Selection Set for Source and Target?