3 Replies Latest reply on Feb 24, 2009 5:27 PM by nbelaevski

    Sorted listShuttle

    mjdenham

      What is the easiest way to ensure a list shuttle's source list maintains it's order when adding and removing items.

      For example if the source list starts off containing A,B,C. Then I add B to the target. Then I remove B from the target. I end up with A,C,B in the source list, but I would like it to be ordered as A,B,C.

      Thanks

      Martin

        • 1. Re: Sorted listShuttle
          nimo22

          you can use a comparable-interface to order the list to your needs automatically.

          Or you can use the build in sort possibility of rich:listShuttle (first, up, down-buttons) for manually ordering. Look at the demo of rich:listShuttle.

          • 2. Re: Sorted listShuttle
            mjdenham

            The items in the list already implement Comparable and the lists start off sorted but if an item in the source list is moved to the target and then out again it is placed at the bottom of the source list.

            I don't want the user to have to manually order the source list by pressing the change-order buttons.

            • 3. Re: Sorted listShuttle
              nbelaevski

              Hello,

              Such feature is not available out of the box.