The controls in JSF basically have the immediate property, and the use of this property is summarized below, and more details can be found in Oracle's official documentation.
1, in order to better understand the immediate attribute, first look at the JSF page life cycle:
There are six life cycles for JSF pages, and the ADF page is based on the JSF page, which includes the six life cycles of the JSF page, including the Init Context and Prepare model, the Validate model Updates, Metadata Commit, and prepare render several stages. Whether the Jspx page has a JSF page life cycle or has an ADF page life cycle, depends on whether the page is managed in Faces-config.xml or Adfc-config.xml. For details of the lifecycle, refer to the Oracle's official ADF development manual.
2, the immediate property of the control is closely related to the conversion check logic of the control (component). Typically, the values in the page control are converted in the process validations phase (refer to the <af:inputListOfValues> API), and when you set the immediate property of a control to true, The value in the control will be converted in advance in the Apply Request values phase.
1) for input controls, when immediate is true, the check of the control's input value is earlier than immediate, and can be interpreted as an immediate checksum. When the validation on the control fails, the life cycle of the page on which the control is located jumps directly to the render response stage, and all controls with false immediate do not perform a checksum operation, and if the validation on the control succeeds, And the newvalue of the control differs from the oldvalue, it triggers a valuechangeevent in the Apply Request values phase instead of the process validations stage in the regular mode. And the execution of this valuechangeevent is earlier than the other actionlistener on this control.
2) for the command control, if immediate is true, the life cycle of the page jumps directly to the render response stage, ignoring the validation and model update phases. The Cancel button is often used.
Reference:
Oracle Fusion middleware 11g:build applications with ADF I (Volume I Student Guide) (D53979GC11)
Http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e12419/tagdoc/af_inputListOfValues.html
Fusion Developer ' s Guide for Oracle application development
Reprinted from: http://blog.csdn.net/luyushuang/article/details/6254889