In my JSF2 application, I have a phaseelist that must be executed before RENDER_RESPONSE, but after JSF built the viewroot.
First, I registered my PhaseListener in faces-config. Then the listener is called, but when I execute beforePhase, getViewRoot().getChildren() is still empty.
Secondly, I found how to do this by adding the following to my xhtml pages:
<f:phaseListener type="be.application.PolicyController" />
This works great, but adding this to each of my pages would be very tedious. Therefore, I am looking for the opportunity to do this once for my application.
Any ideas how to do this?
source share