81
RichFaces <a4j:param>
It combines the functionalities of the JavaServer Faces ( JSF) components <f:param> and <f:actionListener>. It can be used with non-Ajax components in addition to Ajax components. It includes components such as the <h:link> and <h:button> components.
The <a4j:param> requires the following attributes.
- The value attribute is the initial value of the parameter.
- The assignTo attribute defines the bean property. The property is updated if the parent command component performs an action event during the Process Request phase.
Example
Here, in the following example, we are implementing <a4j:param> component. This example contains the following files.
JSF File
// ajax-param.xhtml
Managed Bean
// User.java
Output:
A new parameter is set after clicking the button.
Next TopicRichfaces <a4j:commandbutton>