[jboss-user] [JBoss Portal] - Re: What is the standard way to include Javascript resources

snicoll do-not-reply at jboss.com
Fri Jun 22 09:24:03 EDT 2007


"julien at 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&amp;roottreatment=asroot"></script>
  |             <script type="text/javascript"
  |                     src="/tilapa-portlets-base/resource?name=portlets-full&amp;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&amp;roottreatment=asroot"></script>
  |             <script type="text/javascript"
  |                     src="/tilapa-portlets-base/resource?name=portlets-full&amp;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!

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4056867#4056867

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4056867



More information about the jboss-user mailing list