-
1. Re: partial-response xml displayed in browser
lightguard Feb 29, 2012 5:04 AM (in response to predrag)Have you ruled out this being a Mojarra bug and it's actually a Seam, AS7, RichFaces, or PrimeFaces issue? That would be my first idea. Take things out and start adding them back in a little bit at a time and see where you see this break.
-
2. Re: partial-response xml displayed in browser
zeeman Feb 29, 2012 5:56 PM (in response to lightguard)I have heard horror stories about mixing JSF libs like RF and PF. I use seam catch and below works well for catching view expired exception.
public void onExpiredView(@Handles final CaughtException<javax.faces.application.ViewExpiredException> event) {
event.unmute();
event.handled();
try {
externalContext.redirect(HOME_PAGE);
} catch (final IOException e) {
logger.error(e);
}
}
-
3. Re: partial-response xml displayed in browser
predrag Mar 2, 2012 2:12 AM (in response to lightguard)Thanks for your answers.
I took Jason's advice and tried to determine where the problem is coming from. So I tested view expired exception handler on the project that does not use PrimeFaces, but it uses everything else (RichFaces 4.2, Seam 3.1 and it runs on JBoss AS 7.1). And there everything works just fine (even better than I was hoping for).
So this actually seems to be a problem with PrimeFaces and redirecting after partial (ajax) request has been received. I will post a question on their forum and share the link here if anyone manages to solve this problem.
Thanks again.
-
4. Re: partial-response xml displayed in browser
zeeman Mar 6, 2012 1:19 PM (in response to predrag)I use Primefaces with code shown above without issues. Seems like you have some configuration issues.