3 Replies Latest reply on Dec 30, 2007 4:52 PM by Marco Pancotti

    listShuttle questions

    Marco Pancotti Newbie

      I liked very much the new listShuttle control and I use it in my applications, but I have some problems:

      1) If I change listHeight and listWidth nothing happens in may layout. Looking inside the html code I found that the box containing the two lists are hard-coded (140px x 140px in the element style). Am I missing something?

      2) I put a Set in the targetValue and I got an Exception. The same code works correctly with a List. But in the documentation you talk about a Collection. Why a Set does not work?

      3) I red the debate about the fact that the source should be (or not) the whole potential source LESS the target. My opinion is that both the positions have their reasons. I suggest that in the next release there were a new attribute (collpasedSource is a good name?) that, if true, will show in the sourceList only the elements not already present in the targetLis. Having itas an option can save both the needs.

      Marco Pancotti

        • 1. Re: listShuttle questions
          Nick Belaevski Master


          1. Use sourceListWidth/targetListWidth attributes
          2. List or array should be used as data source because ordering matters
          3. Please vote for the feature here: http://labs.jboss.com/auth/wiki/RichFacesFuture

          • 3. Re: listShuttle questions
            Marco Pancotti Newbie

            Dear Nick

            Thanks for your fast response.
            1) It was my fault, the tag documentation is clear. I was misleaded by the example. When you will correct the doc about the Collection/List issue, probably it's better if you correct the example source as well, as it is not consistent with the tag documentation
            2)I agree, if you consider that you have done a "listShuttle" the order matters. Probably we (developers) would like to have even a "collectionShuttle", as the use case where you don't mind the order and you just need a control to move an item from a "source" collection to a "target" collection is quite frequent. I'll try to do it myself, if you appreciate it, and propose it to your evaluation. Of course, at the moment I solved my issues in the backing bean code, managing a List to support the control and moving the content of the list in the set on the commit. But it is not so elegant.
            3)I will vote immediately.

            Anycase, thanks a lot for your effort. RichFaces is becoming (if it is not already) the most interesting JSF tag collection even considering the commercial ones.

            Happy new year to all the RichFaces staff