[jboss-user] [JBoss Portal] - Re: How can I to include JavaScript files in Portlets to JBo

swisst do-not-reply at jboss.com
Thu Feb 28 11:36:29 EST 2008

Yeah, linking to a specific theme sounds like a bad idea as well!  

I guess my point is that I have always treated each portlet as a unique entity, so the thought of one portlet being in charge of loading all of the JS for other portlets just feels really wrong.  

For example, we use some JS libraries in our application, almost every portlet uses them, and they include the files in their jsp.  We have taken the position that each portlet should be able to stand on its own, and we don't want to write a bunch of framework code to handle duplicate js files.  

I guess that is an interesting question though, we better be sure that the JS namespace is not polluted with multiple functions of the same name.  Additionally, different versions of the same library could cause issues as well.  Even though our portlets stand on their own, the end javascript is all mingled together and processed by the browser.  Maybe that's the reason for the JBoss javascript injection code!

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

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

More information about the jboss-user mailing list