mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Fix for AWC-130. Encoding property resolver required on TrashcanBean for file details screen.
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6130 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -140,7 +140,6 @@ public class BrowseBean implements IContextListener
|
||||
this.userPreferencesBean = userPreferencesBean;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param lockService The Lock Service to set.
|
||||
*/
|
||||
|
@@ -562,6 +562,13 @@ public class TrashcanBean implements IContextListener
|
||||
}
|
||||
};
|
||||
|
||||
private NodePropertyResolver resolverEncoding = new NodePropertyResolver() {
|
||||
public Object get(Node node) {
|
||||
ContentData content = (ContentData)node.getProperties().get(ContentModel.PROP_CONTENT);
|
||||
return (content != null ? content.getEncoding() : null);
|
||||
}
|
||||
};
|
||||
|
||||
private NodePropertyResolver resolverDeletedDate = new NodePropertyResolver() {
|
||||
public Object get(Node node) {
|
||||
return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE);
|
||||
@@ -640,6 +647,7 @@ public class TrashcanBean implements IContextListener
|
||||
node.addPropertyResolver("isFolder", resolverIsFolder);
|
||||
node.addPropertyResolver("mimetype", resolverMimetype);
|
||||
node.addPropertyResolver("size", resolverSize);
|
||||
node.addPropertyResolver("encoding", resolverEncoding);
|
||||
|
||||
if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true &&
|
||||
this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false)
|
||||
|
@@ -58,11 +58,6 @@ public class CharsetConverter implements Converter
|
||||
*/
|
||||
public String getAsString(FacesContext context, UIComponent component, Object value)
|
||||
{
|
||||
if (value == null)
|
||||
{
|
||||
throw new IllegalArgumentException(I18NUtil.getMessage("error_charset_null"));
|
||||
}
|
||||
|
||||
String result = null;
|
||||
|
||||
if (value instanceof Charset)
|
||||
|
Reference in New Issue
Block a user