Disclaimer

The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.

Saturday, December 15, 2007

Phases in ADF Lifecycle

ADF Lifecycle has 9 phases as follows:
  1. Initialize Context: In this phase value of associated request, binding container and lifecycle are set.
  2. Prepare Model: In this phase model is prepared and initialized. In this phase page parameters are set and methods in the executable section of the page definition of the ADF page are executed.
  3. Apply Input Values: This phase handles the request parameters. These may come by adding the request parameters in the URL or as a result of HTML form post action. A list of events is build using these request parameters. These are actually mapped to the bindings in the pageDef. This phase resolves the list of request parameters bind to attributes in the page def. This results into a list of updatedValues which is used in Update Model phase.
  4. Validate Input Values: This phase validates the list of values built in the Apply input values field with model.
  5. Update Model: After validation of input values data model is updated with the list of values created in apply input values phase.
  6. Validate Model Updates: Updates in the previous phase are then validated by calling the associated lifecycle's binding container .
  7. Process Component Updates: This phase handles any events in the list built during the apply input values phase. Named events as well as all the events tied to the databindings created in the pagdef are handled in this phase.
  8. Metadata Commit: This phase commits the runtime metadata changes to the model. This phase is always executed before prepare render phase.
  9. Prepare Render: This is the final phase where page is sent for rendering. prepareRender event is sent to all the registered listeners. This notification signals bindings to prepare or process the data for rendering. Binding container is also refreshed. This helps in updating any changes that happened during validation phases.

7 comments:

Anonymous said...

Hi
Can you explain what could be the reasons for PREPARE MODEL phase in a ADF page to slow down heavily .
Also what tools/APIs are available to instrument performance of ADF pages?
thx in adv

Anonymous said...

Hi,
In Validate Model Updates phase can we give pop up error window to the user, something similar to jsf validations.

Anonymous said...

Can we create Faces Messages in 'Validate Model Updates' phase and show them to the user, much like what we can do in 'process validation' phase ?

Crazy Engineer said...

Very informative blog.

Unknown said...

thanks Crazy Engineer...

Soni Anand said...

Hi vik,
In any page rendered to the browser, Framework insert meta tag in header according to browser version and produced a style sheet according to that. could you please tell in which phase of life cycle this decision is made and which class framework make that decision.

Unknown said...

its the renderRespone or prepareRender phase. The UIComponent af:document handles all this decision of which css to use etc