From ee55f90a070d8d2d09c0bec5580be871fc9a1a27 Mon Sep 17 00:00:00 2001 From: Gavin Cornwell Date: Tue, 23 Sep 2008 09:50:47 +0000 Subject: [PATCH] Manual merge of V2.1 to HEAD: ETWOONE-92: If two users update the same contents at the same time, you get an unfriendly InvalidNodeRefException git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@10981 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261 --- .../bean/content/DocumentDetailsDialog.java | 20 ++++++++++++++++--- source/web/jsp/content/document-details.jsp | 2 +- 2 files changed, 18 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 afb26c8624..27aee39385 100644 --- a/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java +++ b/source/java/org/alfresco/web/bean/content/DocumentDetailsDialog.java @@ -234,11 +234,25 @@ public class DocumentDetailsDialog extends BaseDetailsBean implements Navigatio } /** - * Adds the node to the dispatch context so that overridden dialogs can be picked up + * Fixes an issue reported in https://issues.alfresco.com/jira/browse/ETWOONE-92 + * + * @return Returns action */ - public void setupEditContext(ActionEvent event) + public String editContentProperties() { - this.navigator.setupDispatchContext(getDocument()); + NodeRef nodeRef = getDocument().getNodeRef(); + if (this.getNodeService().exists(nodeRef)) + { + navigator.setupDispatchContext(getDocument()); + return "dialog:editContentProperties"; + } + else + { + Utils.addErrorMessage(MessageFormat.format(Application.getMessage( + FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {nodeRef}) ); + return "browse"; + } + } /** diff --git a/source/web/jsp/content/document-details.jsp b/source/web/jsp/content/document-details.jsp index da5ef3a11a..52940f9efb 100644 --- a/source/web/jsp/content/document-details.jsp +++ b/source/web/jsp/content/document-details.jsp @@ -96,7 +96,7 @@ - +