mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
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
This commit is contained in:
@@ -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";
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@@ -96,7 +96,7 @@
|
|||||||
<h:panelGroup id="props-panel-facets">
|
<h:panelGroup id="props-panel-facets">
|
||||||
<f:facet name="title">
|
<f:facet name="title">
|
||||||
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write">
|
<r:permissionEvaluator value="#{DialogManager.bean.document}" allow="Write">
|
||||||
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/edit_properties.gif" action="dialog:editContentProperties" actionListener="#{DialogManager.bean.setupEditContext}" />
|
<a:actionLink id="titleLink1" value="#{msg.modify}" showLink="false" image="/images/icons/edit_properties.gif" action="#{DialogManager.bean.editContentProperties}" />
|
||||||
</r:permissionEvaluator>
|
</r:permissionEvaluator>
|
||||||
</f:facet>
|
</f:facet>
|
||||||
</h:panelGroup>
|
</h:panelGroup>
|
||||||
|
Reference in New Issue
Block a user