RichFaces provides a set of JavaScript functions to make working with the DOM tree and client side component API easier.

Here is the current list:

- rich:clientId(id) - returns client Id for component by it's short id.
- rich:element(id) - returns DOM element for the passed short id
- rich:component(id) - returns richfaces client component instance to call some API method.
- rich:isUserInRole(role) - returns if the user has specified role.
- rich:findComponent(id) - returns component instance for given short id
- rich:jQuery(id) - returns a jQuery object with an element for given short id

As an example, the result of # {rich:element('input')} expression would be the same as calling: document.getElementById('formId:input').

Below is another example that shows how to pull a value directly from a component using the rich:findComponent call.