cancel
Showing results for 
Search instead for 
Did you mean: 

Using a webscript to display space content within web client

chrisb
Champ in-the-making
Champ in-the-making
We have been looking at some of the new for 2.1 webscript functionality.

I know its possible to use web scripts to generate a custom GUI for accessing the alfresco repository. Can webscript be used to render content for a space within the web client though?

For example can you use / call a webscript to display information in a space (similar to the way a freemarker template can currently be used to render space content in a custom format)?

If so how would you go about hooking using a webscript in a space for displaying content?

Thanks
12 REPLIES 12

kevinr
Star Contributor
Star Contributor
By a happy coincidence that is exactly the feature I am working on right now. It will be available in 2.1 shortly. Depending on how much time there is available the feature may be "programmatic only" in other words there may not be any UI to select which webscript to execute, but it will be an easy matter of executing a very simple javascript to perform the setup of the webscript on a space. It will then appear as the Custom View for a space view.

Thanks,

Kevin

chrisb
Champ in-the-making
Champ in-the-making
Excellent  Smiley Very Happy . Look forward to trying that out.

Thanks

garpinc
Champ in-the-making
Champ in-the-making
I have 2.1 installed on server but I guess I need a jumpstart on an actual example.

I see documentation in

http://wiki.alfresco.com/wiki/Web_Scripts

and I see the scripts mentioned in my installed version of alfresco..

What's missing is what example data and query would I need to enter in order to get back an actual result.

For instance when I execute /alfresco/service/sample/blog/category?c=web20&guest=true I get back
Failed to execute script 'workspace://SpacesStore//Company Home/Data Dictionary/Web Scripts/org/alfresco/sample/categorysearch.get.js': Node does not exist: workspace://SpacesStore//Company Home/Data Dictionary/Web Scripts/org/alfresco/sample/categorysearch.get.js 

davidc
Star Contributor
Star Contributor
That's a bug - thanks for spotting.

I have a fix which will be checked into HEAD tomorrow.

davidc
Star Contributor
Star Contributor
HEAD now contains the fix.

Also, http://wiki.alfresco.com/wiki/Web_Scripts_Examples has some examples.

garpinc
Champ in-the-making
Champ in-the-making
1) Still getting same error on latest nightly
2) I am also unable to browse AVM repository with MySpaces webscript

davidc
Star Contributor
Star Contributor
Nightly build 401 should have the fix.

I'm not sure if the MySpaces portlet supports AVM.

garpinc
Champ in-the-making
Champ in-the-making
I went to http://dev.alfresco.com/downloads/nightly/dist/ and downloaded

alfresco-community-war-2.1.0dev.zip  19-Jun-2007 04:45   50M

If this is not the latest nightly then how can I get build 401

Also I check svn and I didn't see any changes which would lead me to this this was checked into head.

davidc
Star Contributor
Star Contributor
Ok, let me check.