Since RichFaces 3.1.3, you can manage how the RichFaces script and style files will be loaded in your application.

Before, the version 3.1.3, RichFaces loaded styles and script on demand. I.e. the files are loaded only they are required on the particular page. This approach has benefits and drawbacks.For example: If you have a small number of components on the page, loading only the required ones allows to save the traffic and total time of files loading. This is a benefit.However, if you use a lot of components of the same page, browser sends separate requests for each of the file and, then, after each file is received, spends time for interpretation of it . Even all script and styles files are cached, it might be a resource-consuming operation (Especially, for Internet Explorer).

org.richfaces.LoadScriptStrategy

The following declaration in your web.xml allows to load the integrated script files.

You can see that the head section of the page contains references to only two script files: framework.pack.js.jsf and ui.pack.js.jsf. Those are the scripts for framework and components (ui).

Unless user turn off the cache manually or you turn it off in the web.xml, those two files will be cached and used along the whole application.

Both files are compressed and have size about 270Kb each.

Note:Make sure you do not have the script compression on. Otherwise, the double compressing causes the incorrect javascript as a result. The compression is turned on by default. So, if you use LoadScriptStrategy ALL, turn the compression off like it shown in the code snippet above

If you do not declare the org.richfaces.LoadScriptStrategy in the web.xml, it equals to:

The integrated style sheet contains style for all shipped components. The skinability feature still works.

The DEFAULT value is a classical on-demand variant.

The NONE stops loading the styles at all. This is a special gift for people who still afraids the skinability feature of RichFaces.

The earlier introduced plain skin resets all color and font parameters to null. The NONE value for org.richfaces.LoadStyleStrategy does even more - No predefined styles for RichFaces at all. The look-n-feel is in your hands on 100%.

I have project where I am using Prototype 1.6.0, Scriptaculous 1.8.0 and other javascript files. During build process, all javascripts are merged and minified to one file all.js (same for css - all.css).

Now if I add some RF component which uses Prototype and Scriptaculous, than your framework add those two libraries to the head of the page right?So now on my page, there are loaded these libraries twice. Is there any solution or workaround to say RF: Do not load Prototype and Scriptaculous?

RichFaces components use Prototype very hard. In particular, we removed some patches that are already included into 1.6.0. Adding feature with exclusion makes it possible to use Prototype with version less than 1.6.0. This will break some of the components.

You can use a component id as well as a DOM element id in the rich:jQuery selector. So, the problem author of the article tries to rise was solving already. We just took care about it from the very beginning.

P.S. in general, I can see the room for fighting between JSF and jQuery. JSF is a server-side library. jQuery takes care about the client side part.