The error-page Element"

From Documentation
m (correct highlight (via JWB))
Line 10: Line 10:
 
  </error-page>
 
  </error-page>
  
It specifies an error page used when an un-caught exception is thrown in updating a ZUML page (e.g., in an event listener). Each page is associated with an exception type, aka, a class deriving from <tt>java.lang.Throwable</tt>. You can specify multiple error pages, each with a different exception type. When an error occurs, ZK searches the proper error page by examing the exception type one-by-one. If none is found, it will show an alert message at the client by default.
+
It specifies an error page used when an un-caught exception is thrown in updating a ZUML page (e.g., in an event listener). Each page is associated with an exception type, aka, a class deriving from <code>java.lang.Throwable</code>. You can specify multiple error pages, each with a different exception type. When an error occurs, ZK searches the proper error page by examing the exception type one-by-one. If none is found, it will show an alert message at the client by default.
  
The <tt>device-type</tt> element is optional. If omitted, <tt>ajax</tt> is assumed.
+
The <code>device-type</code> element is optional. If omitted, <code>ajax</code> is assumed.
  
 
For example,
 
For example,

Revision as of 10:19, 19 January 2022


The error-page Element



Syntax:

<error-page>
    <device-type>a_device_type|ajax</device-type>
    <exception-type>a_class_name</exception-type>
    <location>a_uri</location>
</error-page>

It specifies an error page used when an un-caught exception is thrown in updating a ZUML page (e.g., in an event listener). Each page is associated with an exception type, aka, a class deriving from java.lang.Throwable. You can specify multiple error pages, each with a different exception type. When an error occurs, ZK searches the proper error page by examing the exception type one-by-one. If none is found, it will show an alert message at the client by default.

The device-type element is optional. If omitted, ajax is assumed.

For example,

	<error-page>
		<exception-type>java.lang.Throwable</exception-type>
		<location>/WEB-INF/sys/error.zul</location>
	</error-page>

For more information, please refer to ZK Developer's Reference: Error Handling.

Version History

Version Date Content
     



Last Update : 2022/01/19

Copyright © Potix Corporation. This article is licensed under GNU Free Documentation License.