JBoss.orgCommunity Documentation

Chapter 12. Layout and appearance

12.1. <rich:jQuery>
12.1.1. Basic usage
12.1.2. Calling a <richjQuery> as a JavaScript function
12.1.3. Dynamic rendering
12.1.4. Using the jQuery JavaScript framework
12.1.5. Reference data

Documentation in development

Some concepts covered in this chapter may refer to the previous version of Richfaces, version 3.3.3. This chapter is scheduled for review to ensure all information is up to date.

Read this chapter to alter the layout and appearance of web applications using special components.

The <rich:jQuery> component applies styles and custom behavior to both JSF (JavaServer Faces) objects and regular DOM (Document Object Model) objects. It uses the jQuery JavaScript framework to add functionality without conflicting with the prototype.js library.

The query triggered by the <rich:jQuery> component is specified using the query attribute.

The query can be triggered in three different ways. Use the timing attribute to specify the point at which the query is triggered:


Any objects or lists of objects used in the query are specified using the selector attribute. The selector attribute references objects using the following method:

Because the selector attribute can be either an id identifier attribute or CSS selector syntax, conflicting values could arise. Example 12.3, “Avoiding syntax confusion” demonstrates how to use double backslashes to escape colon characters in id identifier values.