05-02-2012 10:06 AM
{http://www.alfresco.org/model/content/1.0}auditable,{http://www.alfresco.org/model/system/1.0}refere...
05-03-2012 11:15 AM
05-07-2012 06:34 AM
document.addAspect("fm:discussable");
var c = document.childAssocs["fm:discussion"];
for each(var n in c){
//if(n.typeShort == "fm:forum"){
n.createNode("Comments"+Math.random(),"fm:topic");
var child = n.children;
for each(var e in child){
if (e.typeShort == "fm:topic"){
logger.log("SONO NELLA IF");
var props = new Array(1);
props["cm:content"] = "";
e.createNode("Comments"+Math.random(),"fm:post",props);
}
}
}
404 Description: Requested resource is not available.
Message: 04070011 Unable to locate content for node ref workspace://SpacesStore/2e1c7117-459b-48f8-8498-f0f0dacb832b (property: {http://www.alfresco.org/model/content/1.0}content)
05-07-2012 08:59 AM
document.addAspect("fm:discussable");
var c = document.childAssocs["fm:discussion"];
for each(var n in c){
//if(n.typeShort == "fm:forum"){
n.createNode("Comments"+Math.random(),"fm:topic");
var child = n.children;
for each(var e in child){
if (e.typeShort == "fm:topic"){
logger.log("SONO NELL'IF");
var props = new Array(1);
props["cm:content"] = document.properties.content;
e.createNode("Comments"+Math.random(),"fm:post",props);
//e.save();
}
}
}
05-08-2012 10:43 AM
11-01-2012 11:49 AM
var node = search.findNode("workspace://SpacesStore/c66d546f-6c90-4583-8e76-30763848dd8a") ;
logger.log(node);
if(!node.hasAspect("fm:discussable")) { node.addAspect("fm:discussable"); }
if(!node.hasAspect("fm:commentsRollup")) { node.addAspect("fm:commentsRollup"); }
var forums = node.childAssocs["fm:discussion"];
var forum;
if(forums.length === 0) {
forum = node.createNode(node.properties.name+" discussion", "fm:forum", "fm:discussion");
}
else {
forum = forums[0];
}
logger.log(forum);
var topics = forum.childAssocs["cm:contains"];
var topic;
if(topics.length === 0) {
topic = forum.createNode("Comments", "fm:topic", [], "cm:contains", "cm:Comments");
}
else {
topic = topics[0];
}
logger.log(topic);
var now = new Date();
var name = "comment-"+now.getTime();
var mypost = topic.createNode(name, "fm:post", [], "cm:contains", name);
mypost.content = "<p>Hello World!<p>";
12-18-2012 07:03 AM
Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.