cancel
Showing results for 
Search instead for 
Did you mean: 

Questions about web script portlet

unknown-user
Champ on-the-rise
Champ on-the-rise
I have several questions about webscriptportlet:

does the webscript myspaces take into consideration the user athenticated ie does ut only display the spaces taht the user has the right to see?

Does the webscript portlet can be deployed in lifreay as a standalone portlet ? If yes does someone have indications about how to do it?

Does the portletauthenticator that is on the svn supports cas sso?

thanks in advance
12 REPLIES 12

sdavis
Champ in-the-making
Champ in-the-making
I have several questions about webscriptportlet:

does the webscript myspaces take into consideration the user athenticated ie does ut only display the spaces taht the user has the right to see?

ANSWER:  Yes.  Any access point into Alfresco (UI, FTP, CIFS, API) always respects security settings.

Does the webscript portlet can be deployed in lifreay as a standalone portlet ? If yes does someone have indications about how to do it?

ANSWER:  Not sure of that one specifically, but remember that WebScripts are URL-based access points into Alfresco.  There's no specialised portlet that's required to integrate them.

Does the portletauthenticator that is on the svn supports cas sso?

thanks in advance

kevinr
Star Contributor
Star Contributor
Does the webscript portlet can be deployed in lifreay as a standalone portlet ? If yes does someone have indications about how to do it?

Yes the webscript portlets will be available for Liferay as individual standalone portlets. Note that due to the JavaScript libraries we use, only Liferay 4.3 will be supported. We will provide wiki instructions on deploying the alfresco.war to liferay for 2.1 final release (as we have recently made some fixes to get them working).

Thanks,

Kevin

unknown-user
Champ on-the-rise
Champ on-the-rise
Thanks for your reply
When the 2.1 final release will be avalaible ?

thanks

santigt
Champ in-the-making
Champ in-the-making
Hi everybody,

I using liferay 4.3.1 and Alfresco 2.1, I create a JSR 168 Alfresco portlet with Webscript. In this webscript, I have a link to other webscript. When I click on this link, I have a horrible error:

aught exception & redirecting to status template: Failed to execute script '/storage/tomcat-6.0_liferay-4.3.1/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/test.post.js': Failed to execute script '/storage/tomcat-6.0_liferay-4.3.1/webapps/alfresco/WEB-INF/classes/alfresco/templates/webscripts/org/alfresco/test.post.js': Wrapped org.alfresco.service.namespace.NamespaceException: Namespace prefix alfresco is not mapped to a namespace URI (AlfrescoScript#9)

Anyone knows why I have this error???

Thanks a lot!!

Regards,


Santigt

davidc
Star Contributor
Star Contributor
What's in your test.post.js script?

santigt
Champ in-the-making
Champ in-the-making
I have two webscripts: test.get and test.post.

The first one takes a parameter (GET), the Alfresco directory or space we want to access. So, if you have permission you can choose several options in a menu. If you click on one of these options, you access to test.post webscript.

The second one only present (using Freemarker) contents of space you have chosen.

If you try to execute the webscripts whitout portlets (simple web), its are running correctly. If you try with JSR 168 portlets, you have this error.

I see at webscript debug log that the first access (test.get) execute WebScriptPortlet class. The second access (test.post) execute WebScriptServlet class. That's normal, no?

Any idea? Thanks a lot! Regards,


Santigt

davidc
Star Contributor
Star Contributor
When generating references to webscript urls in your response template you can make use of the following template methods…

scripturl
clienturlfunction

as described here… http://wiki.alfresco.com/wiki/Web_Scripts#.22Response.22_Templates

These ensure your webscript urls are correctly rendered regardless of which environment the web script is executed in (e.g. JSR-168).

santigt
Champ in-the-making
Champ in-the-making
Thanks for your quick answer!!

However, I don't understand who can I use "clienturlfunction" in Freemarker and what can i obtain with it. Please, can anyone put an example using this function?

Thanks a lot!! Regards,



Santigt

davidc
Star Contributor
Star Contributor
clienturlfunction is only required if you you wish to issue urls directly from the browser (e.g. in an AJAX context).

An example can be found in myspaces.get.html.ftl.