08-27-2014 08:32 AM
08-27-2014 09:00 AM
08-28-2014 05:37 AM
function main()
{ 
   var results = [];
   
   if(args["nodeRef"] != null) {
   
   var objNodeRef = search.findNode(args["nodeRef"]);
   var nodeChilds = [];
   
   if(objNodeRef != null) {
      nodeChilds = objNodeRef.children;
      
      for each (var result in nodeChilds)
      {
          
             var resultObj = 
             { 
                 item: result
             };
             resultObj.selectable = "true";
             results.push(resultObj);
          
      }
   }
   }
   model.results = results;   
}
main();
{
   "data":
         {
           "items":
                  [
                     <#list results as row>
                        {
                           "name": "${row.item.properties.name!""}",
               
                           "type": "${row.item.typeShort}",
                           "isContainer": ${row.item.isContainer?string},
                        
                           <#if row.item.properties.title?exists>
                              "title": "<#escape x as jsonUtils.encodeJSONString(x)>${row.item.properties.title!""}</#escape>",
                           </#if>
                           
                           <#if row.item.properties.description?exists>
                              "description": "<#escape x as jsonUtils.encodeJSONString(x)>${row.item.properties.description!""}</#escape>",
                           </#if>
                           
                           <#if row.item.properties.modified??>"modified": "${xmldate(row.item.properties.modified)}",</#if>
                           <#if row.item.properties.modifier??>"modifier": "${row.item.properties.modifier}",</#if>
                           <#if row.item.siteShortName??>"site": "${row.item.siteShortName}",</#if>
                           "displayPath": "${row.item.displayPath!""}",
                           "nodeRef": "${row.item.nodeRef}"<#if row.selectable?exists>,
                           "selectable" : ${row.selectable?string}</#if>
                        }<#if row_has_next>,</#if>
                     </#list>
                  ]
         }
}
08-28-2014 05:40 AM
<webscript>
  <shortname>Get children</shortname>
  <description>Get children details</description>
  <url>/api/folder/getchildren</url>
  <format default="json"/>
  <authentication>user</authentication>
  <transaction allow="readonly">required</transaction>
</webscript>
08-28-2014 08:37 AM
08-28-2014 09:16 AM
<#list>http://localhost:8080/alfresco/service/sample/folder/path?yourArg=yourArgargs.yourArg.desc.xml<webscript>
  <shortname>Get children</shortname>
  <description>Get children details</description>
  <url>sample/folder/path?yourArg={yourArg}</url>
  <format default="json"/>
</webscript>
yourNodeRef.displayPath.replace("Company Home/", "")'<a href="repository#filter=path|' + pathFromWebscript + '">'09-01-2014 08:25 AM
09-02-2014 12:43 PM
 
					
				
				
			
		
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.