cancel
Showing results for 
Search instead for 
Did you mean: 

webscript Share

ahmedbnf
Champ in-the-making
Champ in-the-making
Hi,
i follow this tutorial(<a>http://niketa-alfresco3.blogspot.com/2009/12/how-to-access-alfresco-repository-in.html</a>)to create a dashlet which display a content of a specific folder .

the first webscript works in alfresco but when i call this webscript in the second share webscript it doesn't work it give me the next error in eval function:

Error Message: 04230058 Failed to execute script 'classpath*:alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/docproperty.get.js': 04230057 SyntaxError: il manque ')' dans des parenthèses (file:/C:/Alfresco/tomcat/shared/classes/alfresco/web-extension/site-webscripts/org/alfresco/components/dashlets/docproperty.get.js#5(eval)#1)
Server: Alfresco Spring WebScripts - v1.2.0 (Release 1207) schema 1 000

the result in alfresco :
"docprop" : [
{
    "name" : "Test" ,
 
    "creator" : "admin",

   "CreatedDate" : "23 mai 2013 10:58:28"
}

]
}




1 REPLY 1

zladuric
Champ on-the-rise
Champ on-the-rise
Your resulting data indicates a problem, and your error message indicates another Smiley Happy

The "result in alfresco" part is missing a starting
{
- did you omit it or is it missing from the webscript? If the later, then you should add it there as well, it would be in your
docprop.get.json.ftl
file.

The second potential issue:
 SyntaxError: il manque ')' dans des parenthèses 
. That problem indicates that you don't "eval" the result well.
Are you sure the syntax used is this:
var result = eval('(' + data + ')');
? So eval(). Inside, a '(' string + your data + another ')' string. Maybe put double quotation mark to make it more distinctive: <code> var result = eval( "(" + data + ")" + )?

Or post the code here, I am sure somebody can spot the error and help out Smiley Happy