【发布时间】:2013-11-28 18:56:45
【问题描述】:
我对 OmniFaces 的 FullAjaxExceptionHandler 应该如何与 actionListener 提供的 PrimeFaces <p:commandButton> 一起工作感到困惑。使用常规的<h:commandButton>,错误页面会正确显示,但是使用<p:commandButton>,什么都不会发生,异常只会记录到控制台。
我的环境:PrimeFaces 4.0、GlassFish 3.1.2.2、OmniFaces 1.6.3。
查看:
<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>
bean方法:
public void throwRuntimeException() {
throw new RuntimeException("peek-a-boo");
}
如何配置<p:commandButton> 以获取FullAjaxExceptionHandler 处理的异常?
【问题讨论】:
标签: jsf-2 primefaces exception-handling omnifaces