diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties
index 978d4f2657..8d08fe73b7 100644
--- a/config/alfresco/messages/webclient.properties
+++ b/config/alfresco/messages/webclient.properties
@@ -850,6 +850,10 @@ update_avm_file_desc=Update a file in the website with content from your compute
file_details_desc=View details about the file.
title_folder_details=Folder Details
folder_details_desc=View details about the folder.
+edit_file_properties=Edit File Properties
+edit_file_description=Edit the properties of the file then click OK.
+edit_folder_properties=Edit Folder Properties
+edit_folder_description=Edit the properties of the folder then click OK.
# New User Wizard messages
new_user_title=New User Wizard
diff --git a/config/alfresco/web-client-config-dialogs.xml b/config/alfresco/web-client-config-dialogs.xml
index ba207124f4..6295360e14 100644
--- a/config/alfresco/web-client-config-dialogs.xml
+++ b/config/alfresco/web-client-config-dialogs.xml
@@ -129,6 +129,10 @@
+
+
diff --git a/config/alfresco/web-client-config-wcm-actions.xml b/config/alfresco/web-client-config-wcm-actions.xml
index 8b36df0101..ad7a97aab0 100644
--- a/config/alfresco/web-client-config-wcm-actions.xml
+++ b/config/alfresco/web-client-config-wcm-actions.xml
@@ -177,11 +177,15 @@
false
+
+
+
false
+
diff --git a/source/java/org/alfresco/web/bean/content/EditContentPropertiesDialog.java b/source/java/org/alfresco/web/bean/content/EditContentPropertiesDialog.java
index edaa8f7dea..da7980131c 100644
--- a/source/java/org/alfresco/web/bean/content/EditContentPropertiesDialog.java
+++ b/source/java/org/alfresco/web/bean/content/EditContentPropertiesDialog.java
@@ -42,7 +42,7 @@ public class EditContentPropertiesDialog extends BaseDialogBean
super.init(parameters);
// setup the editable node
- this.editableNode = new Node(this.browseBean.getDocument().getNodeRef());
+ this.editableNode = initEditableNode();
// special case for Mimetype - since this is a sub-property of the ContentData object
// we must extract it so it can be edited in the client, then we check for it later
@@ -54,11 +54,16 @@ public class EditContentPropertiesDialog extends BaseDialogBean
}
}
+ protected Node initEditableNode()
+ {
+ return new Node(this.browseBean.getDocument().getNodeRef());
+ }
+
@Override
protected String finishImpl(FacesContext context, String outcome)
throws Exception
{
- NodeRef nodeRef = this.browseBean.getDocument().getNodeRef();
+ NodeRef nodeRef = this.editableNode.getNodeRef();
Map editedProps = this.editableNode.getProperties();
// get the name and move the node as necessary
@@ -233,6 +238,7 @@ public class EditContentPropertiesDialog extends BaseDialogBean
return false;
}
+
// ------------------------------------------------------------------------------
// Bean getters and setters
diff --git a/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java b/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java
new file mode 100644
index 0000000000..bf834f2614
--- /dev/null
+++ b/source/java/org/alfresco/web/bean/wcm/EditFilePropertiesDialog.java
@@ -0,0 +1,94 @@
+/*
+ * Copyright (C) 2005 Alfresco, Inc.
+ *
+ * Licensed under the Mozilla Public License version 1.1
+ * with a permitted attribution clause. You may obtain a
+ * copy of the License at
+ *
+ * http://www.alfresco.org/legal/license.txt
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific
+ * language governing permissions and limitations under the
+ * License.
+ */
+package org.alfresco.web.bean.wcm;
+
+import java.text.MessageFormat;
+
+import javax.faces.context.FacesContext;
+
+import org.alfresco.service.cmr.model.FileExistsException;
+import org.alfresco.service.cmr.repository.InvalidNodeRefException;
+import org.alfresco.web.app.Application;
+import org.alfresco.web.bean.content.EditContentPropertiesDialog;
+import org.alfresco.web.bean.repository.Node;
+import org.alfresco.web.bean.repository.Repository;
+
+/**
+ * @author Kevin Roast
+ */
+public class EditFilePropertiesDialog extends EditContentPropertiesDialog
+{
+ protected AVMBrowseBean avmBrowseBean;
+
+
+ // ------------------------------------------------------------------------------
+ // Bean property getters and setters
+
+ /**
+ * @param avmBrowseBean The AVMBrowseBean to set.
+ */
+ public void setAvmBrowseBean(AVMBrowseBean avmBrowseBean)
+ {
+ this.avmBrowseBean = avmBrowseBean;
+ }
+
+
+ // ------------------------------------------------------------------------------
+ // Dialog implementation
+
+ /**
+ * @see org.alfresco.web.bean.content.EditContentPropertiesDialog#initEditableNode()
+ */
+ @Override
+ protected Node initEditableNode()
+ {
+ return new Node(this.avmBrowseBean.getAvmNode().getNodeRef());
+ }
+
+ @Override
+ protected String doPostCommitProcessing(FacesContext context, String outcome)
+ {
+ return outcome;
+ }
+
+ /**
+ * Formats the error message to display if an error occurs during finish processing
+ *
+ * @param The exception
+ * @return The formatted message
+ */
+ @Override
+ protected String formatErrorMessage(Throwable exception)
+ {
+ if (exception instanceof FileExistsException)
+ {
+ return MessageFormat.format(Application.getMessage(
+ FacesContext.getCurrentInstance(), Repository.ERROR_EXISTS),
+ ((FileExistsException)exception).getName());
+ }
+ else if (exception instanceof InvalidNodeRefException)
+ {
+ return MessageFormat.format(Application.getMessage(
+ FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF),
+ new Object[] {this.avmBrowseBean.getAvmNode().getPath()});
+ }
+ else
+ {
+ return super.formatErrorMessage(exception);
+ }
+ }
+}
diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml
index bbfeca94b7..39b0a9e9eb 100644
--- a/source/web/WEB-INF/faces-config-beans.xml
+++ b/source/web/WEB-INF/faces-config-beans.xml
@@ -854,6 +854,31 @@
+
+
+ The bean that backs up the Edit AVM File Properties Dialog
+
+ EditFilePropertiesDialog
+ org.alfresco.web.bean.wcm.EditFilePropertiesDialog
+ session
+
+ nodeService
+ #{NodeService}
+
+
+ fileFolderService
+ #{FileFolderService}
+
+
+ dictionaryService
+ #{DictionaryService}
+
+
+ avmBrowseBean
+ #{AVMBrowseBean}
+
+
+
The bean that backs up the Set Content Properties Dialog
diff --git a/source/web/jsp/wcm/file-details.jsp b/source/web/jsp/wcm/file-details.jsp
index 6164be857f..29b59318ad 100644
--- a/source/web/jsp/wcm/file-details.jsp
+++ b/source/web/jsp/wcm/file-details.jsp
@@ -133,7 +133,7 @@
<%----%>
-
+
<%----%>