Hi everybody,
In a very simple helloworld portlet i use this liferay-portlet.xml in Liferay 6.1. CE GA2 Tomcat 7 :
1<!DOCTYPE liferay-portlet-app PUBLIC "-//Liferay//DTD Portlet Application 6.1.0//EN" "http://www.liferay.com/dtd/liferay-portlet-app_6_1_0.dtd">
2<liferay-portlet-app>
3 <portlet>
4 <portlet-name>myHelloWorld</portlet-name>
5 <instanceable>true</instanceable>
6 <remoteable>true</remoteable>
7 <header-portlet-javascript>/js/myscript.js</header-portlet-javascript>
8 </portlet>
9</liferay-portlet-app>
This portlet displays HelloWorld, and a button wich invokes a javascript function from /js/myscript.js. The javascript function only displays an alert. It works when it is used as a standard portlet, but i have an issue with the javascript code if i use it as a remote portlet:
As described in the WSRP wiki, i created a WSRP producer and a consumer based on this portlet. My remote portlet is correctly displayed by the consumer but the javascript is not included. It seems a <header-portlet-javascript> file is not correctly processed in a WSRP context.
I join the .war file, please could anyone tell me if i missed someting?
Is there a working example of a WSRP portlet using the "<header-portlet-javascript> " tag?
Any help will be much appreciated.
Thanks
Please sign in to flag this as inappropriate.