primefaces-extensions / primefaces-extensions.github.com

Organization repo, only for homepage, wiki and issue tracker
https://primefaces-extensions.github.io/
70 stars 22 forks source link

AjaxExceptionHandler - java.lang.IllegalStateException: CDATA tags may not nest #185

Closed jherkel closed 9 years ago

jherkel commented 10 years ago

I have played with AjaxExceptionHandler and I manually threw NullPointerException from my service layer. Unfortunately I have got this exception :

java.lang.IllegalStateException: CDATA tags may not nest
    at com.sun.faces.renderkit.html_basic.HtmlResponseWriter.startCDATA(HtmlResponseWriter.java:681) ~[jsf-impl-2.2.4.jar:2.2.4]
    at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:179) ~[jsf-api-2.2.4.jar:2.2]
    at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:179) ~[jsf-api-2.2.4.jar:2.2]
    at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:179) ~[jsf-api-2.2.4.jar:2.2]
    at javax.faces.context.ResponseWriterWrapper.startCDATA(ResponseWriterWrapper.java:179) ~[jsf-api-2.2.4.jar:2.2]
    at org.primefaces.extensions.component.ajaxerrorhandler.AjaxExceptionHandler.handlePartialResponseError(AjaxExceptionHandler.java:155) ~[primefaces-extensions-1.0.0.jar:1.0.0]
    at org.primefaces.extensions.component.ajaxerrorhandler.AjaxExceptionHandler.handle(AjaxExceptionHandler.java:82) ~[primefaces-extensions-1.0.0.jar:1.0.0]

I guess this article http://stackoverflow.com/a/17946483 contains the reason for this exception. Is there a possibility to integrate something like OmniPartialViewContext to primefaces AjaxExceptionHandler?

ova2 commented 10 years ago

Pavol, can you do this? Thanks.

jherkel commented 10 years ago

I have tested OmniPartialViewContext with AjaxExceptionHandler (quick&dirty hack) and it works. Now I can see error dialog window.

ova2 commented 9 years ago

AjaxErrorHandler has been removed due to bugs and because PrimeFaces has a better functionality with PrimeFaces ExceptionHandler.