cancel
Showing results for 
Search instead for 
Did you mean: 

Webscripts in Share vs Explorer

kriton
Champ in-the-making
Champ in-the-making
I face the following difficulties when I run my webscripts in share, which generally I do not when I run them in alfresco.
- When my webscripts run through share, the javascript debugger does not seem to take any notice of them. Similarly logger.log(x) does not actually log. Is there any way to fix this issue ?
- Some root objects (people or groups for example) are not visible when I run the script in share. There are ways to get around this as I can get some data by using functions defined in AlfrescoUtils.js or by creating a webscript in explorer calling it with my share script. But is there anywhere documented what directly works in share webscripts and what does not ?
4 REPLIES 4

fufler
Champ in-the-making
Champ in-the-making
1) As far as I know there are two JavaScript debuggers: repo-tier and web-tier. Thus to debug a Share  JS you have to enable the debugger for web-tier webscripts.

2) I think it's ok that some root scope objects are not accessible, because Share is just an interface to repository using REST API to communicate with it. So you should use the same API to interoperate with repository.

kriton
Champ in-the-making
Champ in-the-making
1) oh thats nice. thx for that Smiley Happy I thought there was just one.

2) Yeah I dont disagree with you. But I would like some documentation of what is available.

fufler
Champ in-the-making
Champ in-the-making
2) I'm not sure if there's a place where Share JS root scope objects are documented. I think, that you should consider that all repository related objects are not accesible directly from js. Since Share is an interface only you shoult use remote object to communicate with actual repository via RESTful APIs.

mikeh
Star Contributor
Star Contributor
Repository JS API is here: http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/concepts/API-JS-intro.html

Surf JS API is here: http://docs.alfresco.com/4.0/topic/com.alfresco.enterprise.doc/references/APISurfPlatform-intro.html

Note: the 4.0 documentation is currently "beta" and hence subject to change. If you spot any problems, please let us know via JIRA.

Thanks,
Mike