cancel
Showing results for 
Search instead for 
Did you mean: 

roothome undefined in javascript controller for dashlet

ashokharnal
Champ in-the-making
Champ in-the-making
I have the following two-lines simple code in JavaScript Controller while creating a dashlet in Alfresco Share:

var folder = roothome.childByNamePath("Sites/myoffice/documentLibrary/AURC Space/DEO/Drafts") ;
model.folderlength = folder.children.length ;

However, an error that 'roothome' is not defined  appears in the  dashlet in Alfresco Share as:

"Exception: org.mozilla.javascript.EcmaError - ReferenceError: "roothome" is not defined. (file:/home/Alfresco/Alfresco/tomcat/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/knowledgebase.get.js#1)"

My objective is to count the number of documents in a folder and publish them in the dashlet.

What is the problem? I will be grateful for help.
1 REPLY 1

ashokharnal
Champ in-the-making
Champ in-the-making
To those who may be interested, I found a simple solution. The following two links may be seen:


http://www.ixxus.com/blog/2009/04/dashlet-todo-list/
http://niketa-alfresco3.blogspot.com/2009/12/how-to-access-alfresco-repository-in.html