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:
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.
<!DOCTYPE html> <ui:composition xmlns="http://www.w3.org/1999/xhtml" xmlns:h="http://java.sun.com/jsf/html" xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:a4j="http://richfaces.org/a4j" xmlns:rich="http://richfaces.org/rich"> <h:form id="form"> <h:inputText id="input"> <a4j:ajax render="out" /> </h:inputText> <h:outputText value="#{rich:findComponent('input').value}" id="out" /> </h:form> </ui:composition>