Available since OmniFaces 1.6
There are as of now also five special methods related to JSF without needing a
getFacesLifecycle(ServletContext)which returns the JSF lifecycle, allowing you a.o. to programmatically register JSF application's phase listeners.
isFacesAjaxRequest(HttpServletRequest)which is capable of checking if the current request is a JSF ajax request.
isFacesResourceRequest(HttpServletRequest)which is capable of checking if the current request is a JSF resource request.
facesRedirect(HttpServletRequest, HttpServletResponse, String, String...)which is capable of distinguishing JSF ajax requests from regular requests and altering the redirect logic on it, exactly like as
ExternalContext.redirect(String)does. In other words, this method behaves exactly the same as
isFacesDevelopment(ServletContext)which is capable of checking if the current JSF application configuration is set to development project stage.
Those methods can be used in for example a servlet filter.
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.