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:
Kevin Roast
2007-06-28 16:37:47 +00:00
parent 5a7833ab6b
commit 7eaaf196cb
3 changed files with 8 additions and 6 deletions

View File

@@ -140,7 +140,6 @@ public class BrowseBean implements IContextListener
this.userPreferencesBean = userPreferencesBean; this.userPreferencesBean = userPreferencesBean;
} }
/** /**
* @param lockService The Lock Service to set. * @param lockService The Lock Service to set.
*/ */

View File

@@ -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() { private NodePropertyResolver resolverDeletedDate = new NodePropertyResolver() {
public Object get(Node node) { public Object get(Node node) {
return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE); return node.getProperties().get(ContentModel.PROP_ARCHIVED_DATE);
@@ -640,6 +647,7 @@ public class TrashcanBean implements IContextListener
node.addPropertyResolver("isFolder", resolverIsFolder); node.addPropertyResolver("isFolder", resolverIsFolder);
node.addPropertyResolver("mimetype", resolverMimetype); node.addPropertyResolver("mimetype", resolverMimetype);
node.addPropertyResolver("size", resolverSize); node.addPropertyResolver("size", resolverSize);
node.addPropertyResolver("encoding", resolverEncoding);
if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true && if (this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_FOLDER) == true &&
this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false) this.dictionaryService.isSubClass(node.getType(), ContentModel.TYPE_SYSTEM_FOLDER) == false)

View File

@@ -58,11 +58,6 @@ public class CharsetConverter implements Converter
*/ */
public String getAsString(FacesContext context, UIComponent component, Object value) public String getAsString(FacesContext context, UIComponent component, Object value)
{ {
if (value == null)
{
throw new IllegalArgumentException(I18NUtil.getMessage("error_charset_null"));
}
String result = null; String result = null;
if (value instanceof Charset) if (value instanceof Charset)