You are viewing a plain text version of this content. The canonical link for it is here.
Posted to adffaces-issues@incubator.apache.org by "Adam Winer (JIRA)" <ad...@incubator.apache.org> on 2007/01/16 01:02:27 UTC

[jira] Commented: (ADFFACES-353) selectOrderShuttle problems

    [ https://issues.apache.org/jira/browse/ADFFACES-353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12465023 ] 

Adam Winer commented on ADFFACES-353:
-------------------------------------

Another update from Martin:

1)  SimpleSelectManyRenderer.getSelectedIndices does not respect order
of selected items.
I think:

indices[lastEntry] = i;
       lastEntry++;

should be:

indices[index] = i;


and some other modifications



2) Then we should modify SelectManyShuttleRenderer.encodeElementContent
from:
 for (int i = selectedIndices.length - 1; i >=0; i--)
   {
     trailingSelectItems.add(0,

leadingSelectItems.remove(selectedIndices[i]));
   }


to:

for (int i = 0; i < selectedIndices.length; i++)
   {
     int j = selectedIndices[i];
     trailingSelectItems.add(selectItems.get(j));
   }

   for (int i = 0; i < selectedIndices.length; i++)
   {
     int j = selectedIndices[i];
     leadingSelectItems.remove(j);
   }


Can you review that code? This patch is working for me, but can break
something else.

> selectOrderShuttle problems
> ---------------------------
>
>                 Key: ADFFACES-353
>                 URL: https://issues.apache.org/jira/browse/ADFFACES-353
>             Project: MyFaces ADF-Faces
>          Issue Type: Bug
>            Reporter: Adam Winer
>         Assigned To: Adam Winer
>
> From Martin Koci:
> Bug can be reproduced with trinidad-demo.war. Go to to
> selectOrderShuttle component demo  and select value "Third" as first and
> value "Second" as second.
> After sumbit is "Third" moved to second position and "Second" to first -
> simply component doesn't hold order ...
> Problem is in render response phase, because  submitted values are ok,
> update model phase sets right values, but component display values in
> unexpected order.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira