cancel
Showing results for 
Search instead for 
Did you mean: 

How to access the companyhome node from a dashlet?

max12
Champ in-the-making
Champ in-the-making
Hi,

I need to access the companyhome node in the .get.js file of a dashlet to show some of its content (files & folders) in the dashlet.
How can I do that? The companyhome root object doesn't seem to be available on the client side.
4 REPLIES 4

mikeh
Star Contributor
Star Contributor
Share has no direct concept of "companyhome" or nodes or aspects, etc. You must access these via a remote webscript call using JSON, XML, whatever between the servers.

Look at Share's source to see how this is accomplished.

Thanks,
Mike

max12
Champ in-the-making
Champ in-the-making
Could you give me a more specific hint where to look? Or is there an example somewhere?

Thanks

mikeh
Star Contributor
Star Contributor
Look at pretty much any of the existing dashlets - specifically the .get.js scripts. Look for the remote API calls:
var json = remote.call(…)

Thanks,
Mike

max12
Champ in-the-making
Champ in-the-making
Just a general question:
Is there a web script shipped with alfresco from which I could get the companyhome node into my dashlet or do i have to write my own?
If there is one already: which one?

Thanks