cancel
Showing results for 
Search instead for 
Did you mean: 

WebScripts Refresh (no new???)

matjazmuhic
Champ on-the-rise
Champ on-the-rise
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.
2 REPLIES 2

mikeh
Star Contributor
Star Contributor
You've posted this in the Share forums, so I'm going to assume you expect this new webscript to be available to Share?

Share doesn't access the Repository for webscripts, as it's a remote Spring Surf application. Webscripts have to be added via the web-extension mechanism or a jar file in shared/lib.

Thanks,
Mike

matjazmuhic
Champ on-the-rise
Champ on-the-rise
Thank you. I figured that out after a while. I must have skipped a page in the book obviously…

My bad.. Smiley Happy