The error-page Element"
From Documentation
m |
|||
Line 4: | Line 4: | ||
<source lang="xml" > | <source lang="xml" > | ||
<error-page> | <error-page> | ||
− | <device-type> | + | <device-type>''a_device_type|'''ajax'''</device-type> |
− | <exception-type> | + | <exception-type>''a_class_name''</exception-type> |
− | <location> | + | <location>''a_uri''</location> |
</error-page> | </error-page> | ||
</source> | </source> | ||
Line 12: | Line 12: | ||
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 shows, by default, an alert message at the client. | 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 shows, by default, an alert message at the client. | ||
− | The <tt>device-type</tt> element is optional. If omitted, <tt>ajax</tt> is assumed. | + | The <tt>device-type</tt> element is optional. If omitted, <tt>ajax</tt> is assumed. |
+ | |||
+ | For example, | ||
+ | |||
+ | <source lang="xml" > | ||
+ | <error-page> | ||
+ | <exception-type>java.lang.Throwable</exception-type> | ||
+ | <location>/WEB-INF/sys/error.zul</location> | ||
+ | </error-page> | ||
+ | </source> | ||
==Version History== | ==Version History== |
Revision as of 02:14, 7 December 2010
<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 shows, by default, an alert message at the client.
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>
Version History
Version | Date | Content |
---|---|---|