public boolean isFacesRequest() {
        return getFacesContext() != null;
    }
Checks if the current request is a Faces request.

@return <code>true</code> if the current request is a Faces request.
primefaces/src/main/java/org/primefaces/PrimeFaces.java