Merged V3.1 to HEAD

13218: Partial fix for ETHREEOH-1259 - the null pointer exceptions are gone to be replaced by sensible error messages.
   13220: Merged V3.0 to V3.1
      13219: Build Fix for error in hand merge of r13141 from V2.2 to V3.0
   13226: Clearer debugging of exceptions during NodeService cleanup
   13228: ETHREEOH-1250
   13229: Fix for ETHREEOH-1184: Share webscript configuration does not support international chars as values
   13235: Add support to exclude admin and guest from person permission fix ups. Tidy up for ETHREEOH-1239
   13239: Build Fix
   13243: ETHREEOH-1308: Update AMPs to indicate unsupported status
   13247: Build fix - do not delete admin :-)
   13248: Fix build
   13254: Fix for ETHREEOH-1351: Schemas containing an enumeration with an empty string ...
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.0:r13219
      Merged /alfresco/BRANCHES/V3.1:r13218-13220,13224,13226-13229,13231-13232,13234-13237,13239,13241,13243-13248,13250,13252-13254


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13612 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-12 20:51:43 +00:00
parent 63f3fe9fb0
commit f608dc00e6
6 changed files with 118 additions and 80 deletions

View File

@@ -24,6 +24,7 @@
*/
package org.alfresco.web.bean.content;
import java.text.MessageFormat;
import java.util.Map;
import javax.faces.context.FacesContext;
@@ -33,6 +34,8 @@ import org.alfresco.service.cmr.repository.ContentData;
import org.alfresco.web.app.Application;
import org.alfresco.web.bean.dialog.BaseDialogBean;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.bean.repository.Repository;
import org.alfresco.web.ui.common.Utils;
/**
* Bean implementation of the "View Content Properties" dialog.
@@ -56,21 +59,27 @@ public class ViewContentPropertiesDialog extends BaseDialogBean
{
super.init(parameters);
// setup the editable node
this.viewingNode = new Node(this.browseBean.getDocument().getNodeRef());
// 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
// and create a new ContentData object to wrap it and it's associated URL
ContentData content = (ContentData)this.viewingNode.getProperties().get(ContentModel.PROP_CONTENT);
if (content != null)
Node document = this.browseBean.getDocument();
if(document != 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
this.viewingNode.addPropertyResolver("size", this.browseBean.resolverSize);
// setup the editable node
this.viewingNode = new Node(document.getNodeRef());
// 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
// and create a new ContentData object to wrap it and it's associated URL
ContentData content = (ContentData)this.viewingNode.getProperties().get(ContentModel.PROP_CONTENT);
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
this.viewingNode.addPropertyResolver("size", this.browseBean.resolverSize);
}
}
@Override