mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Bug fixes to rename action for non-AVM objects
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/BRANCHES/WCM-DEV2/root@4016 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -69,17 +69,16 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
NodeRef nodeRef = this.editableNode.getNodeRef();
|
||||
Map<String, Object> editedProps = this.editableNode.getProperties();
|
||||
|
||||
// we deal with 'name' as a rename/move operation later
|
||||
String name = (String)editedProps.get(ContentModel.PROP_NAME);
|
||||
// get the name and move the node as necessary
|
||||
String name = (String) editedProps.get(ContentModel.PROP_NAME);
|
||||
if (name != null)
|
||||
{
|
||||
editedProps.remove(ContentModel.PROP_NAME);
|
||||
fileFolderService.rename(nodeRef, name);
|
||||
}
|
||||
|
||||
// we need to put all the properties from the editable bag back into
|
||||
// the format expected by the repository
|
||||
Map<QName, Serializable> repoProps = this.nodeService.getProperties(nodeRef);
|
||||
repoProps.remove(ContentModel.PROP_NAME);
|
||||
|
||||
// but first extract and deal with the special mimetype property for ContentData
|
||||
String mimetype = (String)editedProps.get(TEMP_PROP_MIMETYPE);
|
||||
@@ -182,13 +181,6 @@ public class EditContentPropertiesDialog extends BaseDialogBean
|
||||
}
|
||||
}
|
||||
|
||||
// get the name and move the node as necessary
|
||||
if (name != null)
|
||||
{
|
||||
this.fileFolderService.rename(nodeRef, name);
|
||||
this.editableNode.getProperties().put(ContentModel.PROP_NAME.toString(), name);
|
||||
}
|
||||
|
||||
return outcome;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user