Purpose
The immediate attribute can be used to achieve the following effects:
- Allow a commandLink or commandButton to navigate the user to another page without processing any data currently in input fields of the current screen. In particular, this allows navigation to occur even when there are currently validation errors. A "cancel" button typically falls into this category.
- Allow a commandLink or commandButton to trigger back-end logic while ignoring validation for some of the fields on the screen. This is a more general version of the item above.
- Make one or more input components "high priority" for validation, so that if any of these are invalid then validation is not performed for any "low-priority" input components in the same page. This can reduce the number of error messages shown.
摘自:https://cwiki.apache.org/confluence/display/MYFACES/How+the+immediate+attribute+works