5 Replies Latest reply on Jul 21, 2015 6:41 AM by michpetrov

    picklist attribute keepSourceOrder

    klaus55

      In Richfaces 4.X tag documentation for picklist the attribute keepSourceOrder is mentioned.

      Have somebody an example for that, cause in my application it seems not to work.

      Further proposal: is there an attribute keepTargetOrder, which means to keep the target list in the same order as the source list.

      This would help the user to recognize, that he added the correct items to the target list.

        • 1. Re: picklist attribute keepSourceOrder
          michpetrov

          If you set keepSourceOrder to true the items that you put back to the source will return to their original position, as opposed at the end of the list. Target list can already be made orderable.

          • 2. Re: picklist attribute keepSourceOrder
            klaus55


            Hello,

            I create an simple example an attach it.

            It is realy not keeping the original order, when clicking the add, remove buttons.

            Please can someone tell me, what I configured wrong

            Best regards

            Klaus

            • 3. Re: picklist attribute keepSourceOrder
              michpetrov

              I see no problem with it. You didn't say if you're submitting the list, if you do it gets reordered, so it doesn't work the same way after that.

              • 4. Re: picklist attribute keepSourceOrder
                klaus55


                Well it was my fault. I used version 4.5.4Final. After reading the release note, I  see that the attribute still exists sine 4.5.7Final.

                Well I switched to this version and at the first glance it nearly seems to work.

                So this are my test:

                I started with a sorted collection of labels ( label0 to label9).

                I select label1 and click the add button, then select label0 and click the add button, then click the removeall button.

                Now the list is sorted as label1, label0, label2 to label9 and not as the original list.

                when I  do this in that way:

                I select label1 and click the add button, then select label0 and click the add button, select label0 click the remove button , select label1 click the remove button, the list is well sorted.

                also this works fine:

                I select label1 and click the add button, then select label0 and click the add button, select label1 click the remove button , select label0 click the remove button, the list is well sorted.

                • 5. Re: picklist attribute keepSourceOrder
                  michpetrov

                  Ok, that looks like a bug, I'll take a look on it.