AnsweredAssumed Answered

WebScripts Refresh (no new???)

Question asked by matjazmuhic on Nov 5, 2010
Latest reply on Nov 8, 2010 by matjazmuhic
I've added webscript to Data dictionary/Web scripts/org/mycompany/countries and went to service/index page and refresh the webscripts, but no new scripts were detected. (Script works fine in alfresco explorer).

Descriptor:


<webscript>
   <shortname>Folder listing utility</shortname>
   <description>Sample demonstrating the listing of folder contents</description>
   <url>/countries?country={country}</url>
   <format default="json">extension</format>
   <authentication>user</authentication>
</webscript>

Controler:


var country = args.country;
if(country == null)
{
   var countries =  ["Japan","Slovenia", "Austria", "Thailand"];
   model.countries = countries
   model.country = "none";
}
else
{
   var cities = [];
   cities["Japan"] = ["Tokio", "Fukuoka"];
   cities["Slovenia"] = ["Maribor", "Ptuj", "Ljubljana", "Koper"];
   cities["Austria"] = ["Graz", "Vienna"];
   cities["Thailand"] = ["Bangkok"];

   model.country = country;
   model.cities = cities[country];
}

Template:


<#if country == "none">
[ <#list countries as country>"${country}", </#list> ]
<#else>
[ <#list cities as city>"${city}", </#list> ]
</#if>

Any ideas? There's no error in logs.

Outcomes