Change By: Aleksandr Pchelintcev (19/Aug/14 9:59 AM)
Description: Summary:
When moving a selection of Nodes with the "Move After" operation, their order is reversed.
The reason is that for each Node the moveAfter() is called, which reverses
 implicit  its  original  order:
The last Node is placed as last element directly after the target node -> its then the first Node and not the last anymore.

Cause:
Super class of MoveNodeAction abstract class is
{code}
info.magnolia.ui.framework.action.AbstractMultiItemAction
{code}
It calls in the execute() for every item operating on the abstract method .executeOnItem(JcrItemAdapter).
The MoveNodeAction implementing the method executeOnItem is calling {code}
info.magnolia.ui.workbench.tree.MoveHandler.moveItem(Item, Item, MoveLocation)
{code} which in the end calls {code}info.magnolia.jcr.util.NodeUtil.moveNodeAfter(Node, Node){code}


Solution general:
Override the method {code}info.magnolia.ui.contentapp.movedialog.action.MoveNodeAction.getSortedItems(Comparator<JcrItemAdapter>){code} of the super class and revert the list on the MoveLoction.after operation.


Solution patches:
As the code changed form 5.2 to 5.3 of this class, I needed to create two different patches basically containing the same code. Just the line numbers won't match.


This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to