If a form submission generates exceptions, you might want to display error messages that ask the user to correct those errors and resubmit the form. Form submission exceptions are of class atg.droplet.DropletException, or its subclass atg.droplet.DropletFormException. Both classes support the errorCode property, which indicates the type of error that occurred. The DropletFormException class has a propertyName property that indicates the form handler property associated with the exception.

To capture errors and display them to users, pass the value of the form handler component’s formExceptions property to the ATG servlet bean ErrorMessageForEach. This servlet bean displays messages that are keyed to the errorCode and propertyName properties.

 
loading table of contents...