Hi, I'm trying to create a modal popup in jQuery in JSF 2.0 / Richfaces 4 Application. jQuery works fine as is, say $('#myDiv').css. But jQuery plugins fail like $.blockUI(); I get the error message, the object does not support his property or value.

jQuery Version : 1.4.4

How do I resolve this ? How do I use jQuery Plugins in Richfaces 4 Application.

actually you have to use jQuery plugin compatible with jQuery shipped with RichFaces. And do not loaded your own version of jQuery but use built-in one. In other case unpredictable conflicts could appear.

The problem is that, the h:outputScript tag happens BEFORE the inclusion of the jquery that comes inside the richfaces distribution. Because of that, the jquery plugin fails miserably

Furthermore, if i try to do this

<h:outputScript name="util.js" library="js" />

And in the util.js i try to use jQuery stuff, it also fails

I think that it would be a better solution to bring back the a4j:loadScript component and add a priority variable that should state if the script being loaded should be loaded after the richfaces stuff, or before. I don't really like the solution of including scripts outside the head section