RichFaces Migration Guide. 3.3.x - 4.x Migration - Common components changes

IMPORTANTThat document is under continous development. It's published in order you to have the fastest access to all the new info posted there even considering that document itself will be extended more in the same time. So please be patient, and do not forget leave your feedback and requests for additional information at RichFaces Space Forum. We could do it really great together!

Core components standartized attributes

Actually the tables below also affects all rich components which provides Ajax functionality out-of-the-box.


Table 1: Names Changes


RichFaces 3.3.3.FinalRichFaces 4.x

Defines id's of components to be processed in case of Ajax request.


  • EL(list of Id's)
  • comma or space separated String
  • JSF shortcuts: @all @none @this @form
  • RichFaces shortcuts @region. (TBD?)
reRenderrenderDefines id's of components to be updated on client side after Ajax responce returned. Accepts the same values as execute does. And additionally accepts so called meta-components definitions. Every component could procide list in documentation and them could be used in JSF shortcuts notation to define parts of that component to be updated. like render="table@body"
ajaxSinglen/anow just execute="@this" used.
limitToListlimitRenderexcludes automatically updateable zones(outputPanel, messages, and so on) from rendering.
oncompleteoncompleteJavaScript called after Ajax request complete
onbeforedomupdateonbeforedomupdateJavaScript called prior to performing DOM updates
onsubmitonsubmitJavaScript called before sending the request. Allow to cancel the request by using return statement.
action / actionListeneraction / actionListener

Works the same as for standard action components.

Important!: For now exists only for components(like a4j:commandButton or a4j:commandLink) and not for behaviors. So a4j:ajax and similar do not have such attributes. Them provides listener attribute (according to JSF standard) or some other custom event listeners attributes.

statusstatusAllows to point the component to status component (by id) which will be activated in case of Ajax request.
focusfocusnot implemented.
datadataallow to serialize objects from server side to be used at JavaScript functions. e.g. oncomplete="alert(".


Table 2: removed attributes:


Attribute NameDescription
ignoreDupResponsemoved to attachQueue behavior
requestDelaymoved to attachQueue behavior
timeoutmoved to attachQueue behavior


Table 3: new ones

Header 1Header 2
listenerstandard JSF attribute for behavior. Alows to define listener on BehaviorEvent when the behavior activated.


Rich components standartized attributes


Client side API usage


The same as for 3.3.x in order to call client API on some component you should use #{rich:component('id')} function or <rich:componentControl/> behavior.


For all who used just document.getElementById(id).component or $('jQuerySelector').component - in 4.x it's not valid anymore. To call without function or component control you could use RichFaces.$('clientId'). But such usage really not recommended. If we will make some refactoring again - you will have to correct all such calls. And in case of function or tag usage - we will care about that transparently for you.