AnsweredAssumed Answered

Javascript API & CMIS for Atom Feeds

Question asked by nancygaillard on Oct 30, 2014
Latest reply on Oct 31, 2014 by nancygaillard

Alfresco 4.2.e on Windows 7 x64bits

I had recently post this => <a href="">Javascript API - variable "site" for dashlet</a>

I am progressing thanks to the community. It is really slow, because of my ignorance on Alfresco…
and I have some difficulties to find informations.

My problem now is to access properties of my datalists (title, path…)
Currently, I have a dashlet which works :) I can see my datalists but only by name and not by title and my links direct towards atom feeds and not towards the datalists :/

How to access to properties?

There is my code, my simplified atomFeed.XML and my list of atom functions :
var rep ="/cmis/p/Sites/gestion/dataLists/children");//?format=json cause an error
var lists = [];

if(rep.status == 200){
   var feed = atom.toFeed(rep);
   var size = feed.getEntries().size();
   for(var i=0; i < size ; i++){
      var entry = feed.getEntries().get(i);
      lists = entry;
model.lists = lists;


<@markup id="js">
   <#– Your JavaScript file. You actually only need the my-dashlet-min.js file (unless in development mode), but we usually keep the original source in my-dashlet.js there so we can change it later.–>
   <@script type="text/javascript" src="${url.context}/res/components/dashlets/datalists-list.js" group="dashlets"/>
<@markup id="html">
      <div class="dashlet">
         <div class="title">Lites d'appels et de courriers</div>
         <div class="body scrollableList">
            <#if lists?size != 0>
               <#list lists as l>
                  <div class="detail-list-item">
                     <div class="details">
                        <#assign links = l.getLinks()>
                        <#list links[1..1] as link><a href="${link.href}">${l.title} (${length})</a></#list>
               <div class="">
               Il n'y a pas de liste disponible