Immediate properties and page life cycles for JSF controls

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.