06-02-2011 04:37 PM
<#escape x as jsonUtils.encodeJSONString(x)>
{
children: [
<#list results as node>
{
author: "${node.properties.creator!""}",
id: "${node.id}",
name: "${node.name}",
created: "${xmldate(node.properties.created)}",
title: "${node.properties['cm:title']!""}",
updated: "${xmldate(node.properties.modified)}",
nodeDetails: "${node}",
eventLocation: "${node.properties['dl:eventLocation']!""}",
eventStartDate: "${xmldate(node.properties['dl:eventStartDate'])!""}",
description: "${node.properties['cm:description']!""}"
}
<#if node_has_next>,</#if>
</#list>
]
}
</#escape>
function getEventListName(title) {
var conn = remote.connect("alfresco-webscripts");
var uri = "/cmis/p/Sites/webcontent/dataLists/children?format=json";
var responseText=conn.get(uri).response;
var allLists=(eval('(' + responseText + ')')).children;
for (var i=0; i < allLists.length; i++) {
if (allLists[i].title==title) {
return allLists[i].name;
}
}
throw "No list with the ID: "+list+" could be found";
}
function getEventList(name) {
var conn = remote.connect("alfresco-webscripts");
var uri = "/cmis/p/Sites/webcontent/dataLists/"+name+"/children?format=json";
var events=(eval('(' + conn.get(uri).response + ')')).children;
return events;
}
model.events=getEventList(getEventListName(args.eventListTitle));
06-03-2011 06:24 AM
06-03-2011 06:56 AM
06-04-2011 07:22 PM
06-05-2011 06:38 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.