use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class DocumentPreviewBean method previousItem.
public void previousItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
List<Node> nodes = this.browseBean.getContent();
if (nodes.size() > 1) {
String currentSortColumn = this.browseBean.getContentRichList().getCurrentSortColumn();
boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending();
Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending));
Node previous = NodeListUtils.previousItem(nodes, id);
this.browseBean.setupContentAction(previous.getId(), false);
}
}
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class DocumentPreviewBean method nextItem.
public void nextItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
List<Node> nodes = this.browseBean.getContent();
if (nodes.size() > 1) {
String currentSortColumn = this.browseBean.getContentRichList().getCurrentSortColumn();
boolean currentSortDescending = this.browseBean.getContentRichList().isCurrentSortDescending();
Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending));
Node next = NodeListUtils.nextItem(nodes, id);
this.browseBean.setupContentAction(next.getId(), false);
}
}
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class SpacePreviewBean method nextItem.
public void nextItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id);
List<Node> nodes = this.browseBean.getParentNodes(currNodeRef);
Node next = null;
if (nodes.size() > 1) {
String currentSortColumn = this.browseBean.getSpacesRichList().getCurrentSortColumn();
boolean currentSortDescending = this.browseBean.getSpacesRichList().isCurrentSortDescending();
Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending));
next = NodeListUtils.nextItem(nodes, id);
this.browseBean.setupSpaceAction(next.getId(), false);
}
if (next == null) {
Node currNode = new Node(currNodeRef);
this.navigator.setupDispatchContext(currNode);
}
}
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class ForumsDetailsDialog method previousItem.
public void previousItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id);
List<Node> nodes = this.browseBean.getParentNodes(currNodeRef);
Node previous = null;
if (nodes.size() > 1) {
String currentSortColumn = this.browseBean.getSpacesRichList().getCurrentSortColumn();
boolean currentSortDescending = this.browseBean.getSpacesRichList().isCurrentSortDescending();
Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending));
previous = NodeListUtils.previousItem(nodes, id);
this.browseBean.setupSpaceAction(previous.getId(), false);
}
if (previous == null) {
Node currNode = new Node(currNodeRef);
this.navigator.setupDispatchContext(currNode);
}
}
}
use of org.alfresco.web.ui.common.component.UIActionLink in project acs-community-packaging by Alfresco.
the class TopicDetailsDialog method previousItem.
public void previousItem(ActionEvent event) {
UIActionLink link = (UIActionLink) event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
if (id != null && id.length() != 0) {
NodeRef currNodeRef = new NodeRef(Repository.getStoreRef(), id);
List<Node> nodes = this.browseBean.getParentNodes(currNodeRef);
Node previous = null;
if (nodes.size() > 1) {
String currentSortColumn = this.browseBean.getSpacesRichList().getCurrentSortColumn();
boolean currentSortDescending = this.browseBean.getSpacesRichList().isCurrentSortDescending();
Collections.sort(nodes, new NodePropertyComparator(currentSortColumn, !currentSortDescending));
previous = NodeListUtils.previousItem(nodes, id);
this.browseBean.setupSpaceAction(previous.getId(), false);
}
if (previous == null) {
Node currNode = new Node(currNodeRef);
this.navigator.setupDispatchContext(currNode);
}
}
}
Aggregations