Javatpoint Logo
Javatpoint Logo

RichFaces <a4j:commandButton>

The <a4j:commandButton> component is similar to the JavaServer Faces ( JSF) <h:commandButton> component, but additionally includes Ajax support.

It requires only one value attribute to be used. We can use it to set text for the command button.

By default, the <a4j:commandButton> uses the click event instead of the submit event.

Note - The <a4j:commandButton> component has the execute="@form" setting by default. To limit rendering to a different scope, redefine the execute attribute.


Here, in the following example, we are implementing <a4j:commandButton> component. This example contains the following files.

JSF File

// commandButton.xhtml

Managed Bean



RichFaces A4j commandbutton 1

Youtube For Videos Join Our Youtube Channel: Join Now

Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA