mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
First cut of Facebook integration:
1) Web Script framework extensions for supporting the development of Alfresco based Facebook applications 2) Sample Document Library Facebook application 3) FormData enhancements for supporting request args retrieval for multipart/form-data encoding 4) Sort order added to Search Javascript API Note: Stuff needs commenting, tidy up, but at least it's in SVN. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7259 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -79,6 +79,7 @@ import org.apache.commons.logging.LogFactory;
|
||||
import org.mozilla.javascript.Context;
|
||||
import org.mozilla.javascript.Scriptable;
|
||||
import org.mozilla.javascript.ScriptableObject;
|
||||
import org.mozilla.javascript.UniqueTag;
|
||||
import org.mozilla.javascript.Wrapper;
|
||||
import org.springframework.util.FileCopyUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
@@ -1884,13 +1885,17 @@ public class ScriptNode implements Serializable, Scopeable
|
||||
|
||||
private String processTemplate(String template, NodeRef templateRef, ScriptableObject args)
|
||||
{
|
||||
Object person = (Object)scope.get("person", scope);
|
||||
Object companyhome = (Object)scope.get("companyhome", scope);
|
||||
Object userhome = (Object)scope.get("userhome", scope);
|
||||
|
||||
// build default model for the template processing
|
||||
Map<String, Object> model = this.services.getTemplateService().buildDefaultModel(
|
||||
((ScriptNode)((Wrapper)scope.get("person", scope)).unwrap()).getNodeRef(),
|
||||
((ScriptNode)((Wrapper)scope.get("companyhome", scope)).unwrap()).getNodeRef(),
|
||||
((ScriptNode)((Wrapper)scope.get("userhome", scope)).unwrap()).getNodeRef(),
|
||||
templateRef,
|
||||
null);
|
||||
(person.equals(UniqueTag.NOT_FOUND)) ? null : ((ScriptNode)((Wrapper)person).unwrap()).getNodeRef(),
|
||||
(companyhome.equals(UniqueTag.NOT_FOUND)) ? null : ((ScriptNode)((Wrapper)companyhome).unwrap()).getNodeRef(),
|
||||
(userhome.equals(UniqueTag.NOT_FOUND)) ? null : ((ScriptNode)((Wrapper)userhome).unwrap()).getNodeRef(),
|
||||
templateRef,
|
||||
null);
|
||||
|
||||
// add the current node as either the document/space as appropriate
|
||||
if (this.getIsDocument())
|
||||
|
Reference in New Issue
Block a user