ADF framework allows you to plug in your custom phase listener implementations for each phase in a page lifecycle. This feature is useful if you want to perform some resource cleanup activities or to enable some security check during the page lifecycle. The custom phase listeners can be registered either for an application or for individual pages.
To register an application level phase listener, create a class that implements the
oracle.adf.controller.v2.lifecycle.PagePhaseListener
interface. Then register the custom phase listener inadf-settings.xml
, located under theMETA-INF
folder. Create a new file if it is not there by default.If you want to register the custom
PagePhaseListener
for a page, specify the customPagePhaseListener
implementation asControllerClass
in the page definition file.If you want more ADF-flavored phase listeners for a page that provides more granular control over ADF phase events, build a class extending
oracle.adf.controller.v2.lifecycle...