asked
2014-09-04 20:02:57 +0800
ansancle 327 ● 9 In my application, if there is ANY unhandled exception, we redirect to the home page via the error-page directive in zk.xml.
This has worked fine forever, suddenly the redirects are no longer happening properly.
The page that caused the exception remains on the screen in the browser, the page that the error-page directive specifies appears BELOW the page that caused the error.
Since all my .zul's use the same window id (no 2 are ever present at the same time) I also get a duplicate id error since the original window has not gone away when the new window (my home page) is supposed to be loaded. I changed the home page id to allow to show, but again, it appears below the original page instead of replacing it.
I can't figure out what changed to make this no longer work properly.
Here is my directive in zk.xml :
<error-page>
<device-type>ajax</device-type>
<exception-type>java.lang.Throwable</exception-type>
<location>/windows/DHzHomeWindow.zul</location>
</error-page>
and in web.xml
<error-page>
<exception-type>java.lang.IllegalStateException</exception-type>
<location>/windows/error/DHzIllegalStateExceptionErrorWindow.zul</location>
</error-page>
<error-page>
<exception-type>java.lang.Throwable</exception-type>
<location>/windows/DHzHomeWindow.zul</location>
</error-page>
As a temporary fix - I created a zul file and in the zscript it redirects to my desired error page (my home page). I updated the zk.xml to redirect to this temp page RedirectError.zul. Inside the zscript I put a Executions.sendRedirect("/windows/DHzHomeWindow.zul") - still not correct though
ansancle ( 2014-09-05 12:01:50 +0800 )edit