- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- - Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
- cdi
- components
- contexts
- converters
- el
- eventlisteners
- exceptionhandlers
- facesviews
- filters
- functions
- managedbeans
- push
- resourcehandlers
- search
- servlets
- taghandlers
- utils
- validators
- viewhandlers
- Ajax
- Beans
- BeansLocal
- Components
- Events
- Exceptions
- Faces
- FacesConfigXml
- FacesLocal
- JNDI
- JNDIObjectLocator
- Messages
- Servlets
- WebXml
Collection of utility methods for the JSF API with respect to working with system and phase events.
Usage
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, () -> {
// ...
});
Note that you can specify any phase ID or system event to your choice.
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" JSF utility library, feel free to post a feature request.
Documentation & Sources