What action is taken when I declare
immediate="true" in command button? The documentation says
Boolean value that determines the phaseId of the action event, when true actions are processed at "Apply Request Values", when false at "Invoke Application" phase.
However, I don't understand it. Can someone please explain this?
JSF lifecycle contains 6 phases, which are:
If a command button has
immediate="true", then the phases 'Process validations' and 'Update model values' are skipped. Therefore, convertions and validations are not processed and attributes in managed bean are not updated.
However, if a UIInput in the form also has immediate="true", then its value will be converted, validated and updated in managed bean, because it will happen in 'Apply request values' phase.
One example of when you might use a button with immediate="true" is the case of a 'Cancel' button.