What RichFaces a4j:ajax adds on top JSF 2 f:ajax tag

JSF 2 now has basic Ajax support via f:ajax tag. RichFaces 3 has a very popular a4j:support tag (in fact, f:ajax was inspired by a4j:support). RichFaces 4 comes with a4j:ajax which is based on f:ajax but upgrades the tag with more features and advanced functionality. The table below show the attributes available in both tags and how RichFaces upgrades the core Ajax functionality in JSF 2 (I’ll cover a4j:ajax extra attributes in the future).

In addition to a4j:ajax, RichFaces upgrades JSF 2 with tags such as a4j:commandButton, a4j:commandLink, a4j:poll, a4j:jsFunction, a4j:outputPanel and more (covered in future posts).

Attribute f:ajax a4j:ajax
event Works the same Works the same
execute @all
@this
@form
@none
Id’s
EL
@all
@this
@form
@none
Id’s
EL (different behavior, id’s are resolved in current request)
@region (when a4j:region is used)
render @all
@this
@form
@none
Id’s
EL
@all
@this
@form
@none
Id’s
EL (different behavior, id’s are resolved in current request)
listener Works the same Works the same
onevent Works the same Works the same
onerror Works the same Works the same
immediate Works the same Works the same
disabled Works the same Works the same
onbegin n/a JavaScript to execute before Ajax request
onbeforedomupdate n/a JavaScript to execute after response comes back but before DOM update
oncomplete n/a JavaScript to execute after DOM update
bypassUpdates n/a Skips Update Model and Invoke Application phases, useful for form validation
limitRender n/a Skips all a4j:outputPanel ajaxRender=”true” areas. Only renders what is set in current render
status n/a Status to display during Ajax request
focus n/a Sets focus on component after Ajax request (not yet implemented)

Published by

4 responses to “What RichFaces a4j:ajax adds on top JSF 2 f:ajax tag”

  1. […] What RichFaces a4j:ajax adds on top JSF 2 f:ajax tag […]

  2. Great, now to simple requests using Ajax does not need additional components.

  3. Spot JSF2 migration…

    Links to helpful blogs / pages…

  4. Nice blog Max, really helped me lot to differentiate , i was just googling for whats special in RichFaces’s

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.