This discussion is archived
0 Replies Latest reply: Jul 11, 2012 11:48 AM by 948854 RSS

Multiple component libraries that use jQuery

948854 Newbie
Currently Being Moderated
I'm using PrimeFaces in a JSF2 application and recently developed some of my own composite components. My components use jQuery, but I had to make them not output the jQuery script file because PrimeFaces has already loaded it. If my components were to be used elsewhere then I'd need to uncomment that.

Is there a proper way to have multiple component libraries load a JavaScript library only once, even if all of the component libraries have their own copy? Ideally this would be something automatic, not a customization like a loadJquery="false" attribute on every component.

FYI I'm using JSF RI on GlassFish 3.1.2.

Thanks,
Ryan

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points