cancel
Showing results for 
Search instead for 
Did you mean: 

How to access alfresco webscript's json response in Share webscript.

satheeshkumar
Champ in-the-making
Champ in-the-making
Hi All,

I have a webscript URL as shown below,

http://host:8080/alfresco/service/retrieve-library-list?retrieve=Product%20Library

the above URL will return JSON response, the sample JSON response output is,

{"libraryList":["Banner Small","Buiness Vertical","Banner Medium","Business Accessories","Banner Large"]}


I am generating this JSON response directly from a Java backed webscript, not I want access this URL in Share webscript and show it in the response, can someone tell me how to access this URL in share properly and show the JSON response in shre UI.

I have made plenty of search in the forums but no luck.
It was mentioned like we can use
eval
function, or
Alfresco.util.Ajax.request
.
But none of them seems to be working for me, can someone post how to access Alfresco webscript's JSON response from Share webscript.

Thanks in Advance,
Satheesh
2 REPLIES 2

kajan
Champ in-the-making
Champ in-the-making
Normally Alfresco Share is using ftl for view, in this ftl you can import client side javascript widgets, which is using YUI. So you can call Alfresco.util.Ajax.request from that client side Javascript widget.

muralidharand
Star Contributor
Star Contributor
Hi Satheesh,
It would be great, if you share the code to get helped faster.