How to enforce loading of jQuery in RichFaces?

泪湿孤枕 提交于 2019-12-05 18:08:48
BalusC

RichFaces 4.x-bundled jQuery is available as follows:

<h:outputScript name="jquery.js" />

Yes, astonishingly without any library!

You only need to make sure that you use <h:head> instead of <head>. I also strongly recommend to load your own JS resources by <h:outputScript> as well.

LaurentG

You can force the load of JQuery by adding this (works with RichFaces 3.x):

<a4j:loadScript src="resource://jquery.js" />

For RichFaces 4.x, see this thread: RichFaces 4 replacement for <a4j:loadScript>

If your h:outputScript instruction is not inside of h:head, add target="head" parameter to make sure the library is included only once:

<h:outputScript name="jquery.js" target="head"/>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!