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

@@ -73,7 +73,11 @@ public class CCCheckoutFileDialog extends CheckinCheckoutDialog
@Override
public String getContainerTitle()
{
return Application.getMessage(FacesContext.getCurrentInstance(), LBL_CHECKOUT) + " '" + property.getDocument().getName() + "'";
final Node document = property.getDocument();
if (document != null){
return Application.getMessage(FacesContext.getCurrentInstance(), LBL_CHECKOUT) + " '" + document.getName() + "'";
}
return null;
}
/**

View File

@@ -2,6 +2,8 @@ package org.alfresco.web.bean.coci;
import javax.faces.context.FacesContext;
import org.alfresco.web.bean.repository.Node;
import org.alfresco.web.app.Application;
public class CCUpdateFileDialog extends CheckinCheckoutDialog
@@ -19,7 +21,12 @@ public class CCUpdateFileDialog extends CheckinCheckoutDialog
@Override
public String getContainerTitle()
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPDATE) + " '" + property.getDocument().getName() + "'";
Node document = property.getDocument();
if(document != null)
{
return Application.getMessage(FacesContext.getCurrentInstance(), MSG_UPDATE) + " '" + document.getName() + "'";
}
return null;
}
@Override

View File

@@ -311,6 +311,8 @@ public class CheckinCheckoutDialog extends BaseDialogBean
UIActionLink link = (UIActionLink)event.getComponent();
Map<String, String> params = link.getParameterMap();
String id = params.get("id");
try
{
if (id != null && id.length() != 0)
{
boolean editingInline = false;
@@ -377,6 +379,12 @@ public class CheckinCheckoutDialog extends BaseDialogBean
}
}
}
catch (InvalidNodeRefException refErr)
{
Utils.addErrorMessage(MessageFormat.format(Application.getMessage(
FacesContext.getCurrentInstance(), Repository.ERROR_NODEREF), new Object[] {id}) );
}
}
/**
* Action handler called to set the content of a node from an inline editing page.

View File

@@ -46,6 +46,7 @@ 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 "Edit Content Properties" dialog.
@@ -72,6 +73,9 @@ public class EditContentPropertiesDialog extends BaseDialogBean
// setup the editable node
this.editableNode = initEditableNode();
if(editableNode != null)
{
// 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
@@ -82,13 +86,19 @@ public class EditContentPropertiesDialog extends BaseDialogBean
this.editableNode.getProperties().put(TEMP_PROP_ENCODING, content.getEncoding());
}
}
}
/**
* Init the editable Node
*/
protected Node initEditableNode()
{
return new Node(this.browseBean.getDocument().getNodeRef());
final Node document = this.browseBean.getDocument();
if (document != null)
{
return new Node(document.getNodeRef());
}
return null;
}
@Override

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,8 +59,13 @@ public class ViewContentPropertiesDialog extends BaseDialogBean
{
super.init(parameters);
Node document = this.browseBean.getDocument();
if(document != null)
{
// setup the editable node
this.viewingNode = new Node(this.browseBean.getDocument().getNodeRef());
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
@@ -72,6 +80,7 @@ public class ViewContentPropertiesDialog extends BaseDialogBean
// add the specially handled 'size' property
this.viewingNode.addPropertyResolver("size", this.browseBean.resolverSize);
}
}
@Override
protected String finishImpl(FacesContext context, String outcome)

View File

@@ -1163,12 +1163,12 @@ alfresco.xforms.AbstractSelectWidget = alfresco.xforms.Widget.extend({
alfresco.xforms.constants.XFORMS_NS,
alfresco.xforms.constants.XFORMS_PREFIX,
"label")[0];
label = label.firstChild.nodeValue;
label = label.firstChild === null ? "" : label.firstChild.nodeValue;
var value = _getElementsByTagNameNS(values[i],
alfresco.xforms.constants.XFORMS_NS,
alfresco.xforms.constants.XFORMS_PREFIX,
"value")[0];
var valueText = value.firstChild.nodeValue;
var valueText = value.firstChild === null ? "" : value.firstChild.nodeValue;
var itemId = value.getAttribute("id");
var valid = true;
if (binding.constraint)