I am confused about how OmniFaces's FullAjaxExceptionHandler
should work with a PrimeFaces <p:commandButton>
that is supplied with an actionListener
. With a regular <h:commandButton>
, the error page shows up correctly, however with a <p:commandButton>
, nothing happens and the exception is only logged to console.
My environment: PrimeFaces 4.0, GlassFish 3.1.2.2, OmniFaces 1.6.3.
View:
<h:form>
<p:commandButton actionListener="#{errorTester.throwRuntimeException}"
value="PrimeFaces" />
<h:commandButton value="JSF"
action="#{errorTester.throwRuntimeException}">
<f:ajax execute="@form" render="@form" />
</h:commandButton>
</h:form>
The bean method:
public void throwRuntimeException() {
throw new RuntimeException("peek-a-boo");
}
How do I have configure the <p:commandButton>
to get the exception handled by FullAjaxExceptionHandler
?