Merge of all UI clustering changes originally applied to 2.2

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@8292 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Gavin Cornwell
2008-02-15 14:59:11 +00:00
parent d20d8a7007
commit a450598ecb
281 changed files with 17771 additions and 15322 deletions

View File

@@ -25,6 +25,8 @@
package org.alfresco.web.bean.ajax;
import java.io.IOException;
import java.io.ObjectInputStream;
import java.io.Serializable;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@@ -50,9 +52,11 @@ import org.apache.commons.logging.LogFactory;
*
* @author gavinc
*/
public class NodeInfoBean
public class NodeInfoBean implements Serializable
{
private NodeService nodeService;
private static final long serialVersionUID = 137294178658919187L;
transient private NodeService nodeService;
private static final Log logger = LogFactory.getLog(NodeInfoBean.class);
@@ -80,7 +84,7 @@ public class NodeInfoBean
if (strNodeRef != null && strNodeRef.length() != 0)
{
nodeRef = new NodeRef(strNodeRef);
if (this.nodeService.exists(nodeRef) == false)
if (this.getNodeService().exists(nodeRef) == false)
{
out.write("<span class='errorMessage'>Node could not be found in the repository!</span>");
return;
@@ -102,6 +106,15 @@ public class NodeInfoBean
this.nodeService = nodeService;
}
private NodeService getNodeService()
{
if (nodeService == null)
{
nodeService = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getNodeService();
}
return nodeService;
}
// ------------------------------------------------------------------------------
// Helper methods
@@ -143,4 +156,5 @@ public class NodeInfoBean
return Utils.getFileTypeImage(FacesContext.getCurrentInstance(), filename, size);
}
};
}