f:phaseListener

f:phaseListener enables the possibility of adding a PhaseListener as part of the UIViewRoot. Notice that this method differs from the faces-config.xml method as the latter applies from the beginning, and this only applies when the tag is being rendered.

General Usage

Use type for setting the class name that implements PhaseListener, or use binding to use an EL expression that evaluates to a PhaseListener. In the example below, you can see that more phases apply from PhaseListener when doing the postback, as at that moment the tag was applied and PhaseListener ready.

PhaseListenerBean in beforePhase of RENDER_RESPONSE 6

Source Code

Liferay Faces Alloy 4.1.1 + Liferay Faces Bridge Implementation 5.0.0 + Showcase Common 4.0.0 + Liferay Faces Util 3.4.1 + Mojarra 2.2.20