This content has been marked as final.
Show 7 replies
-
1. Re: What is the standard way to include Javascript resources
julien1 Jun 22, 2007 6:41 AM (in response to snicoll)Look at the documentation the jboss-portlet.xml declarative way to add your library to a portal page. The element name is header-content.
-
2. Re: What is the standard way to include Javascript resources
snicoll Jun 22, 2007 8:25 AM (in response to snicoll)"julien@jboss.com" wrote:
Look at the documentation the jboss-portlet.xml declarative way to add your library to a portal page. The element name is header-content.
I know that!
But If I have 4 portlets, I need this in all portlets and portlets can be set independently on the page. So what? I guess if I define this in the 4 portlets it will be loaded 4 times. The problem I have is that I should have only one declaration in the pagE. -
3. Re: What is the standard way to include Javascript resources
julien1 Jun 22, 2007 8:39 AM (in response to snicoll)So I think JBoss Portal at aggregation time should smartly aggregate the different headers in order to avoid to load the same resource several times.
-
4. Re: What is the standard way to include Javascript resources
snicoll Jun 22, 2007 8:58 AM (in response to snicoll)"julien@jboss.com" wrote:
So I think JBoss Portal at aggregation time should smartly aggregate the different headers in order to avoid to load the same resource several times.
Waouh, if it does that's kinda impressive :) -
5. Re: What is the standard way to include Javascript resources
snicoll Jun 22, 2007 9:24 AM (in response to snicoll)"julien@jboss.com" wrote:
So I think JBoss Portal at aggregation time should smartly aggregate the different headers in order to avoid to load the same resource several times.
Jboss 2.6-CR2 does not. I have this (excerpt):<portlet-app> <portlet> <portlet-name>DefaultMap</portlet-name> <remotable>false</remotable> <header-content> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=root"></script> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=tilapia&roottreatment=asroot"></script> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=portlets-full&roottreatment=asroot"></script> </header-content> </portlet> <portlet> <portlet-name>DefaultNavBar</portlet-name> <remotable>false</remotable> <header-content> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=root"></script> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=tilapia&roottreatment=asroot"></script> <script type="text/javascript" src="/tilapa-portlets-base/resource?name=portlets-full&roottreatment=asroot"></script> </header-content> </portlet> [...] </portlet-app>
And I have X times the script definitions (where X is the number of portlets on the screen).
Too bad! -
6. Re: What is the standard way to include Javascript resources
julien1 Jun 23, 2007 5:36 PM (in response to snicoll)I used the word "should", I'll try to get something done by GA.
-
7. Re: What is the standard way to include Javascript resources
snicoll Aug 7, 2007 6:28 AM (in response to snicoll)"julien@jboss.com" wrote:
I used the word "should", I'll try to get something done by GA.
Do I need to enter a Jira issue for this. I've tried GA and it's not implemented.
Thanks,
Stéphane