-
1. Re: Portlet headers are not included just after adding a portlet to a page
vstorm83 Oct 14, 2012 11:42 PM (in response to infoni)What do you mean by "its javascript and css are not included" can you take a look at your browser's dev tool (firebug or whatever..) and see if the script or link tag for portlet is there on the header ?
The portlet's script tag has "src" attribute or just the content ? The issue about script tag the "src" attribute was known issue and has been fixed by GTNPORTAL-2582
Can you attach a simple test portlet ?
-
2. Re: Portlet headers are not included just after adding a portlet to a page
infoni Oct 15, 2012 8:52 AM (in response to vstorm83)Thank you for your response.
You are right, i did not correctly qualify this issue. Both portlet javascript and css are included in the page header. I believe this issue has something to do with inline javascript: it seems it is invoked before the portlet javascript headers.
I was able to reproduce this problem with a simple "helloworld" portlet. In its JSP edit page, an inline javascript makes use of a javascript function, located in a file included in the doHeaders method:
<b>
Hello world portlet javascript - EDIT MODE
<button type="button" onClick="HelloWorldTestJavascript()">Click me!</button>
</b>
<script type="text/javascript">
HelloWorldTestInlineJavascript();
</script>
When this helloworld portlet is added to a page, the Edit mode does not work: it says the function HelloWorldTestInlineJavascript() does not exist, and the page is broken: even the "Abort" gatein ajax function can't be used. Once the page is saved, and we come back in the page editor, all works correctly.
I join in the initial post the portlet .war and the small java code .
thanks
-
3. Re: Portlet headers are not included just after adding a portlet to a page
infoni Oct 17, 2012 2:55 AM (in response to infoni)The "helloWorld" portlet attached in the first post works in 3.3 GA1: we can access the edit mode just after adding it to a page, in the page editor. But it fails with 3.4 M01 and 3.4 final as described, to make it work we need to save the page first. Should we log a JIRA issue?
Thanks
-
4. Re: Portlet headers are not included just after adding a portlet to a page
vstorm83 Oct 17, 2012 3:11 AM (in response to infoni)1 of 1 people found this helpfulNo, I think it was fixed by GTNPORTAL-2582 (the fix version is 3.5.0.Beta01) Can you test it with the lastest gatein snapshot ?
-
5. Re: Portlet headers are not included just after adding a portlet to a page
infoni Oct 17, 2012 6:49 AM (in response to vstorm83)Thank you! In my first answer i missed it was fixed in 3.5beta01. I will try to build this version with tomcat 7 and post here the result of my test.