From 68fae4cd3474aefb716950f3db4f4e2d72ccb50b Mon Sep 17 00:00:00 2001 From: Alan Davis Date: Tue, 22 Oct 2013 22:16:57 +0000 Subject: [PATCH] Merged V4.1-BUG-FIX (4.1.7) to V4.2-BUG-FIX (4.2.1) 56837: MNT-9767: Merged DEV to V4.1-BUG-FIX 56823: MNT-9767 : Navigation arrows of the document details view do not work when a search result is displayed Was added the check for currentSortColumn when it is null. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/DEV/V4.2-BUG-FIX/root@56920 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../web/bean/content/DocumentDetailsDialog.java | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java b/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java index ea88e1cf5d..acfe57cf13 100644 --- a/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java +++ b/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java @@ -715,8 +715,11 @@ public class DocumentDetailsDialog extends BaseDetailsBean implements Navigatio if (nodes.size() > 1) { String currentSortColumn = this.browseBean.getContentRichList().getCurrentSortColumn(); - boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending(); - Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending)); + if (currentSortColumn != null) + { + boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending(); + Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending)); + } Node next = NodeListUtils.nextItem(nodes, id); getRecentNodeRefsStack().clear(); this.browseBean.setupContentAction(next.getId(), false); @@ -738,8 +741,11 @@ public class DocumentDetailsDialog extends BaseDetailsBean implements Navigatio if (nodes.size() > 1) { String currentSortColumn = this.browseBean.getContentRichList().getCurrentSortColumn(); - boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending(); - Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending)); + if (currentSortColumn != null) + { + boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending(); + Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending)); + } Node previous = NodeListUtils.previousItem(nodes, id); getRecentNodeRefsStack().clear(); this.browseBean.setupContentAction(previous.getId(), false);