org.ow2.opensuit.core.validation
Class ValidationErrors
java.lang.Object
java.lang.Throwable
java.lang.Exception
org.ow2.opensuit.core.validation.ValidationErrors
- All Implemented Interfaces:
- java.io.Serializable
public class ValidationErrors
- extends java.lang.Exception
This is the main container for validation errors.
It is use by open SUIT control code to handle form validation programmatically.
It is an Exception, and contains a list of errors, each being related to a single field item,
or global to the form.
- Author:
- psmeyers
- See Also:
- Serialized Form
Methods inherited from class java.lang.Throwable |
fillInStackTrace, getCause, getLocalizedMessage, getMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
ValidationErrors
public ValidationErrors()
addErrors
public void addErrors(ValidationErrors iErrors)
- Allows to add all validation errors from the given container.
- Parameters:
iErrors
-
addGlobalError
public void addGlobalError(ValidationError iError)
- Adds a global error (for the form).
- Parameters:
iError
-
addItemError
public void addItemError(java.lang.String id,
ValidationError iError)
- Adds a validation error related to a single form field.
- Parameters:
id
- The field id (basically this is the binding expression).iError
- The error message.
getGlobalErrors
public java.util.List<ValidationError> getGlobalErrors()
getItemErrors
public java.util.List<ValidationError> getItemErrors(java.lang.String id)
hasErrors
public boolean hasErrors()
hasGlobalErrors
public boolean hasGlobalErrors()
hasItemErrors
public boolean hasItemErrors(java.lang.String iID)
Copyright © 2008-2012 OW2 Consortium. All Rights Reserved.