Modifying JSF Component Tree in PhaseListener
- by jamiebarrow
Hi all,
I'm having an issue.
I've implemented a PhaseListener, which is meant to add a style class to any UIInput components in the tree that have messages attached to them, and removes the style class if it doesn't have any messages attached to them.
The PhaseListener runs in the RENDER_RESPONSE phase, and does it's work in both the beforePhase and afterPhase methods while debugging. While debugging, I found that beforePhase doesn't have access to the full component tree, but afterPhase does. Any changes done in afterPhase aren't rendered though.
How do I go about this? I want this to be completely server side.
Thanks,
James