A Web application must identify and gracefully handle errors that might occur on form submission. For example, a user enters an alphabetic character in a field where an integer is required. If the property set by this field is of type int, on form submission an exception is thrown when the application tries to set this property from the field value.

If the form uses a form handler of class GenericFormHandler or one of its subclasses, exceptions that occur during form processing are saved to one of these form handler component properties:

Property

Purpose

formError

Boolean that is set to true if any errors occur during form processing.

formExceptions

A vector of the exceptions that occur during form processing.

propertyExceptions

A read-only property that returns a Dictionary of subproperties, one for each property set by the form. For each property that generates an exception, a corresponding subproperty in the propertyExceptions Dictionary contains that exception. For each property that does not generate an exception, the corresponding subproperty in the propertyExceptions Dictionary is unset.


Copyright © 1997, 2012 Oracle and/or its affiliates. All rights reserved.

Legal Notices