What is the difference between immediate and deferred attribute in JSF?

1 Answers
Answered by suresh

What is the difference between immediate and deferred attribute in JSF?

In JSF, the immediate attribute is used to determine whether the validation and conversion process should be executed during the Apply Request Values phase or during the Process Validations phase. If the immediate attribute is set to "true", the validation and conversion process will occur during the Apply Request Values phase. On the other hand, if the immediate attribute is set to "false" or not specified, the validation and conversion process will occur during the Process Validations phase after the Apply Request Values phase.

The deferred attribute, on the other hand, is used to delay the processing of the component until a later phase in the JSF lifecycle. When the deferred attribute is set to "true", the component processing will be deferred until the Render Response phase. This can be useful in scenarios where the component's values need to be set dynamically or based on the outcome of other components' processing.

In summary, the main difference between the immediate and deferred attributes in JSF is the timing of the component processing within the JSF lifecycle. The immediate attribute controls when the validation and conversion process occurs, while the deferred attribute controls when the component processing occurs.

Answer for Question: What is the difference between immediate and deferred attribute in JSF?