Change By: Christian Ringele (13/Aug/14 2:04 PM)
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 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
 calles  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: <dev-list-unsubscr...@magnolia-cms.com>
----------------------------------------------------------------

Reply via email to