Spring Boot 内的 Primefaces PrimeExceptionHandlerELResolver
Primefaces PrimeExceptionHandlerELResolver within Spring Boot
我有一个 Web 应用程序 Spring Boot 1.2.4(web,security,data-jpa), Primefaces 5.2, JSF 2.2 (Mojarra 2.2.11) 没有任何 xml 配置文件.
spring bean el resolver 仅 faces-config.xml :
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<!--el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver-->
</application>
<!--factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory-->
</faces-config>
一切正常。
现在,我想用 primefaces 异常处理程序处理 ViewExpiredException:
http://www.primefaces.org/docs/api/5.2/org/primefaces/application/exceptionhandler/PrimeExceptionHandlerELResolver.html
我的问题是:我可以在 faces-config.xml 中注册另一个 el-resolver 吗?如果没有,我该如何解决这个问题?
提前致谢。
编辑:
我决定使用另一个方法。非常感谢 Session Timeout handling for Ajax calls
您可以在应用程序节点中定义多个 el-resolver,如下所示:
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver>
</application>
我有一个 Web 应用程序 Spring Boot 1.2.4(web,security,data-jpa), Primefaces 5.2, JSF 2.2 (Mojarra 2.2.11) 没有任何 xml 配置文件. spring bean el resolver 仅 faces-config.xml :
<?xml version='1.0' encoding='UTF-8'?>
<faces-config version="2.2"
xmlns="http://xmlns.jcp.org/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/javaee http://xmlns.jcp.org/xml/ns/javaee/web-facesconfig_2_2.xsd">
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<!--el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver-->
</application>
<!--factory>
<exception-handler-factory>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerFactory
</exception-handler-factory>
</factory-->
</faces-config>
一切正常。 现在,我想用 primefaces 异常处理程序处理 ViewExpiredException: http://www.primefaces.org/docs/api/5.2/org/primefaces/application/exceptionhandler/PrimeExceptionHandlerELResolver.html
我的问题是:我可以在 faces-config.xml 中注册另一个 el-resolver 吗?如果没有,我该如何解决这个问题?
提前致谢。
编辑:
我决定使用另一个方法。非常感谢 Session Timeout handling for Ajax calls
您可以在应用程序节点中定义多个 el-resolver,如下所示:
<application>
<el-resolver>
org.springframework.web.jsf.el.SpringBeanFacesELResolver
</el-resolver>
<el-resolver>
org.primefaces.application.exceptionhandler.PrimeExceptionHandlerELResolver
</el-resolver>
</application>