cancel
Showing results for 
Search instead for 
Did you mean: 

Is the search api available for share dashlets?

daja77
Champ in-the-making
Champ in-the-making
Hello,

i try to do a simple dashlet that does a lucene query to get all todo items from datalists.
When I try
var nodes = search.luceneSearch("TEXT:todoList");
I get this error
Exception: org.mozilla.javascript.EcmaError - ReferenceError: "search" is not defined.

Is the search api also available in share? Do I have to do some imports?
4 REPLIES 4

zaizi
Champ in-the-making
Champ in-the-making
Search is only available in Alfresco repo. Share web script will need to call Alfresco webscript to do the search. Or proxy directly back to Alfresco webscript.

Ainga

cmarguello
Champ in-the-making
Champ in-the-making
Im new in alfresco and i have the same problem.
Can anybody tell me how can call alfresco webscript from share webscript?

thanks
Cristian

cmarguello
Champ in-the-making
Champ in-the-making
Finnaly i could!!!!
In the js….

var scriptURL= "/cons/search?text="+searchText+"&site="+site;
var connector = remote.connect("alfresco");
var result = connector.call(scriptURL);
model.result = result;

thanks

andrewriver
Champ in-the-making
Champ in-the-making
cmarguello, Would you share how you show the list in the ftl dashlet? and the rest of the js…

Thanks for your help!