diff --git a/config/alfresco/web-client-config-properties.xml b/config/alfresco/web-client-config-properties.xml
index dbce2fc370..dd621fd1cc 100644
--- a/config/alfresco/web-client-config-properties.xml
+++ b/config/alfresco/web-client-config-properties.xml
@@ -5,6 +5,9 @@
+
@@ -41,6 +44,8 @@
+
repoProps = this.nodeService.getProperties(nodeRef);
- // but first extract and deal with the special mimetype property for ContentData
- String mimetype = (String)editedProps.get(TEMP_PROP_MIMETYPE);
+ // Extract and deal with the special mimetype property for ContentData
+ String mimetype = (String) editedProps.get(TEMP_PROP_MIMETYPE);
if (mimetype != null)
{
// remove temporary prop from list so it isn't saved with the others
@@ -117,6 +119,19 @@ public class EditContentPropertiesDialog extends BaseDialogBean
editedProps.put(ContentModel.PROP_CONTENT.toString(), contentData);
}
}
+ // Extract and deal with the special encoding property for ContentData
+ String encoding = (String) editedProps.get(TEMP_PROP_ENCODING);
+ if (encoding != null)
+ {
+ // remove temporary prop from list so it isn't saved with the others
+ editedProps.remove(TEMP_PROP_ENCODING);
+ ContentData contentData = (ContentData) editedProps.get(ContentModel.PROP_CONTENT);
+ if (contentData != null)
+ {
+ contentData = ContentData.setEncoding(contentData, encoding);
+ editedProps.put(ContentModel.PROP_CONTENT.toString(), contentData);
+ }
+ }
// add the "author" aspect if required, properties will get set below
if (this.nodeService.hasAspect(nodeRef, ContentModel.ASPECT_AUTHOR) == false)
diff --git a/source/java/org/alfresco/web/bean/content/ViewContentPropertiesDialog.java b/source/java/org/alfresco/web/bean/content/ViewContentPropertiesDialog.java
index b7e4acec4b..8a1e50b3b1 100644
--- a/source/java/org/alfresco/web/bean/content/ViewContentPropertiesDialog.java
+++ b/source/java/org/alfresco/web/bean/content/ViewContentPropertiesDialog.java
@@ -42,6 +42,7 @@ import org.alfresco.web.bean.repository.Node;
public class ViewContentPropertiesDialog extends BaseDialogBean
{
protected static final String TEMP_PROP_MIMETYPE = "mimetype";
+ protected static final String TEMP_PROP_ENCODING = "encoding";
protected Node viewingNode;
@@ -63,6 +64,7 @@ public class ViewContentPropertiesDialog extends BaseDialogBean
if (content != null)
{
this.viewingNode.getProperties().put(TEMP_PROP_MIMETYPE, content.getMimetype());
+ this.viewingNode.getProperties().put(TEMP_PROP_ENCODING, content.getEncoding());
}
// add the specially handled 'size' property
diff --git a/source/web/WEB-INF/faces-config-beans.xml b/source/web/WEB-INF/faces-config-beans.xml
index 324371f367..7eae634fcf 100644
--- a/source/web/WEB-INF/faces-config-beans.xml
+++ b/source/web/WEB-INF/faces-config-beans.xml
@@ -3684,6 +3684,15 @@
request
+
+
+ Bean that generates a charset selector component
+
+ CharsetSelectorGenerator
+ org.alfresco.web.bean.generator.CharsetSelectorGenerator
+ request
+
+
Bean that generates a languages selector component
diff --git a/source/web/WEB-INF/faces-config-repo.xml b/source/web/WEB-INF/faces-config-repo.xml
index 6532567c0a..7ec143260e 100644
--- a/source/web/WEB-INF/faces-config-repo.xml
+++ b/source/web/WEB-INF/faces-config-repo.xml
@@ -215,6 +215,11 @@
org.alfresco.web.ui.repo.converter.MimeTypeConverter
+
+ org.alfresco.faces.CharsetConverter
+ org.alfresco.web.ui.repo.converter.CharsetConverter
+
+
org.alfresco.faces.LanguageConverter
org.alfresco.web.ui.repo.converter.LanguageConverter