You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-user@incubator.apache.org by Renzo Tomaselli <re...@tecnotp.it> on 2007/04/19 10:39:40 UTC

[Trinidad[] tr:selectOrderShuttle does not preseve selected order

Hi, I noticed a bug in tr:selectOrderShuttle usage: when I provide a 
selected list value through the "value" attribute, the appearing order 
in the right container is the matching order within the selectable list, 
not the passed one. Order is lost.
If selectable items are "one", "two", "three", and selected list is 
"two", "one", the rendering is:

left: "three"
right: "one", "two"

That's because in method SimpleSelectManyRenderer.getSelectedIndices(), 
line #562, a loop on selectItems is performed, tracking indexes of items 
matching the value list. It should be the opposite way, since we must 
preserve ordering on the value list.

-- Renzo


Re: [Trinidad[] tr:selectOrderShuttle does not preseve selected order

Posted by Renzo Tomaselli <re...@tecnotp.it>.
Just upgraded to v 1.0 from a Dec. snapshot, the problem disappeared.

-- Renzo

Renzo Tomaselli wrote:
> Hi, I noticed a bug in tr:selectOrderShuttle usage: when I provide a 
> selected list value through the "value" attribute, the appearing order 
> in the right container is the matching order within the selectable 
> list, not the passed one. Order is lost.
> If selectable items are "one", "two", "three", and selected list is 
> "two", "one", the rendering is:
>
> left: "three"
> right: "one", "two"
>
> That's because in method 
> SimpleSelectManyRenderer.getSelectedIndices(), line #562, a loop on 
> selectItems is performed, tracking indexes of items matching the value 
> list. It should be the opposite way, since we must preserve ordering 
> on the value list.
>
> -- Renzo
>
>
>