Joe
Joe

Reputation: 15359

Moving items from right to left causes the elements to go to the bottom of the rich:pickList

Moving items from right to left causes the elements to go to the bottom of the rich:pickList

Assuming I have 5 elements in my pick list and the left hand side shows up as (1,2,3,4,5) and I move to items from the top to the right side.

The list appears as follows left hand side (3,4,5) and right hand side (1,2).

If I move 2 back to the lef, the list appears as follows

left hand side (3,4,5,2) and right hand side appears as (1)

Is there a way to make the "2" item go back to its original position, so that the list appears as (2,3,4,5) instead?

Upvotes: 0

Views: 444

Answers (1)

Srinivasan Thoyyeti
Srinivasan Thoyyeti

Reputation: 11

you can use Sorting option.

  1. implicit call: instead of ArrayList() use TreeSet(comparator). client side you just need to reRender on listChanged

  2. explicit call: suppose you do not want to use TreeSet as mentioned above. then call an a4j action method on listChanged sort ArrayList

    like Collections.sort(list, compartor);

Hope this helps.

Upvotes: 1

Related Questions