Question

I'm using omnifaces to handle ajax timeout exceptions.

After config it at faces-config:

<factory>
<exception-handler-factory>org.omnifaces.exceptionhandler.FullAjaxExceptionHandlerFactory</exception-handler-factory>
</factory>

it work's corretly redirecting to login page, configured at web.xml.

<error-page>
<exception-type>javax.faces.application.ViewExpiredException</exception-type>
<location>/public/index.jsf?expired=true</location>
</error-page>

But I found two bugs:

1. The redirecting ignore the existence of query string (?expired=true).

2. Using primefaces component p:dialog with modal="true", the page is redirected to defined one, But the page stay unusable because the redirect's done but thus preventing the workflow on the application main window.

Omnifaces 1.6.3 Primefaces 3.5

Do you have gone through such a situation?

Was it helpful?

Solution

1. The redirecting ignore the existence of query string (?expired=true).

You've already reported this as issue 287, which is fine.


2. Using primefaces component p:dialog with modal="true", the page is redirected to defined one, But the page stay unusable because the redirect's done but thus preventing the workflow on the application main window.

The PrimeFaces overlay widget is known to "hang" around when the oncomplete -which should hide the overlay- of the ajax request fails to be executed due to an exception during render. You'd need to add the following piece to the error page to fix that:

<h:outputScript target="body" rendered="#{facesContext.partialViewContext.ajaxRequest}">
    setTimeout(function() {
        $(".ui-widget-overlay").hide();
    }, 250);
</h:outputScript>
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top