java.lang.Exception handling Using or

Surface 5 <p: ajaxExceptionHandler / "> java.lang.Exception handling

Using

<p:ajaxExceptionHandler type="java.lang.Exception" >

or

<p:ajaxExceptionHandler type="java.lang.Throwable" >

Exception fixes that are handled with labels do not work !!

My question is, how can I use perffaces ajaxExceptionHandler to handle all thrown exceptions, no matter what it is exactly ( NullPointerException, OutOfBoundException.., etc.)?

I just have to mention that <p:ajaxExceptionHandler>works great when I use it with

javax.ejb.EJBException, java.lang.NullPointerExceptionor other custom exceptions.

+4
source share
1 answer

Delete the type declaration so that it <p:ajaxExceptionHandler />

Omnifaces , , , jar, PF , , . , , Omnifaces web.xml, / ajax non ajax .

PF5, .

. Jsf Ajax

PF5

, , WEB.XML java.lang.Exception - , .

: PF5UG

, , , .

+5

Source: https://habr.com/ru/post/1542813/


All Articles