Alloy Showcase

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 3.0.1 + Liferay Faces Bridge Implementation 4.1.0 + Showcase Common 3.0.1 + Liferay Faces Util 3.1.0 + Mojarra 2.2.14