-
Available since OmniFaces 1.0
Collection of utility methods for the Faces API with respect to working with system and phase events.
Usage
Here are some examples:
// Add a callback to the current view which should run during every after phase of the render response on same view.
Events.subscribeToViewAfterPhase(PhaseId.RENDER_RESPONSE, () -> {
// ...
});
// Add a callback to the current request which should run during before phase of the render response on current request.
Events.subscribeToRequestBeforePhase(PhaseId.RENDER_RESPONSE, () -> {
// ...
});
// Add a callback to the current view which should run during the pre render view event.
Events.subscribeToViewEvent(PreRenderViewEvent.class, () -> {
// ...
});
For a full list, check the method summary.
Feature request
If you know more useful methods/functions which you think should be added to this OmniFaces utility class so that everyone can benefit from a "standard" Faces utility library, feel free to post a feature request.
Documentation & Sources