Implementing a Phase Listener
Recall that Phase Events are fired
during the JSF life cycle.
We need a phase listener that:
- Checks to see if this is an Ajax request
- If so, gets a reference to the zip code component and validates it
- Generates the response
- Short-circuits the rest of the life cycle.
Here is a
truncated listing of the phase listener.
Here is the
complete phase listener.