Web script using javascript
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-24-2011 02:48 PM
Hello,
i'm having some problems by creating my own web script.
i'm following the wiki tutorial for webscript ( http://wiki.alfresco.com/wiki/Web_Scripts ).
i've build this Controller(testando.get.js):
Anyone can help me here?
thank you very much.
i'm having some problems by creating my own web script.
i'm following the wiki tutorial for webscript ( http://wiki.alfresco.com/wiki/Web_Scripts ).
i've build this Controller(testando.get.js):
if(config.global.server!=null){ model.x = config.script.global.server.children.size;}else{ model.x = 1;}model.toWho = (args.to != null) ? args.to : person.properties.userName;var s = new XML(config.script["testando"]);model.fromWho = person.properties[s.fromproperty];
with this config file(testando.get.config.xml):if(config.global.server!=null){ model.x = config.script.global.server.children.size;}else{ model.x = 1;}model.toWho = (args.to != null) ? args.to : person.properties.userName;var s = new XML(config.script["testando"]);model.fromWho = person.properties[s.fromproperty];
and i'm getting this error:500 Description: An error inside the HTTP server which prevented it from fulfilling the request. Message: 09240029 Wrapped Exception (with status template): 09240254 Failed to execute script 'classpath*:alfresco/templates/webscripts/teste/testando.get.js': 09240253 str parameter is mandatory Exception: java.lang.IllegalArgumentException - str parameter is mandatory
Anyone can help me here?
thank you very much.
Labels:
- Labels:
-
Archive
3 REPLIES 3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2011 04:12 AM
Hi,
Take a look at Web Scripts Examples, it may help you.
You can also take a look in Alfresco repository in: Data Dictionary > Web Scripts > org > alfresco > sample
Cheers,
Jordi.
Take a look at Web Scripts Examples, it may help you.
You can also take a look in Alfresco repository in: Data Dictionary > Web Scripts > org > alfresco > sample
Cheers,
Jordi.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-25-2011 09:26 AM
thanks and regards.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-28-2011 10:19 AM
You pasted you .js twice instead of the .xml.
The error is probably in it… Do you have something like this:
The error is probably in it… Do you have something like this:
<url>/testando?str={something}</url>
