Class Events

java.lang.Object
org.omnifaces.util.Events

public final class Events extends Object

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.

Author:
Arjan Tijms, Bauke Scholtz
See Also: