HTML and CSS Reference
In-Depth Information
Figure 4-6. The execution time of both action and value change events
As shown in the figure, action events and value change events are executed at the end of the following three phases:
Apply Request Values.
Process Validations.
Invoke Application.
These are four execution scenarios of both events:
When the
immediate attribute of the EditableValueHolder (or ValueHolder) component is set
to true , then ValueChangeEvent is executed at the end of the “Apply Request Values” phase.
When the
immediate attribute of the ActionSource2 component is set to true , then
ActionEvent is executed at the end of the “Apply Request Values” phase.
When the
immediate attribute of the EditableValueHolder (or ValueHolder ) component is
set to false , then ValueChangeEvent is executed at the end of the “Process Validations” phase.
When the
immediate attribute of the ActionSource2 component is set to false , then
ActionEvent is executed at the end of the “Invoke Application” phase.
In the next two sections, we will see different examples on how to create listeners for both action and value
change events.
From the explanation of the execution scenarios, it is important to note that by default (when immediate
attribute is set to false) both action events and value change events are queued, which means that these events will not
be fired once the user (for example) performs an action on a ActionSource2 component or makes a change in a value
of an EditableValueHolder component. Both events will be queued until they are fired in the suitable time in the JSF
request processing life cycle, as shown in the previous figure.
Note
 
 
Search WWH ::




Custom Search