com.elasticpath.sfweb.ajax.validation
Class DwrValidationException
java.lang.Object
java.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
com.elasticpath.sfweb.ajax.validation.DwrValidationException
- All Implemented Interfaces:
- java.io.Serializable
public class DwrValidationException
- extends java.lang.RuntimeException
A wrapper for sending validation errors back to client-side js through dwr.
- 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 |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
DwrValidationException
public DwrValidationException(java.util.Map validationErrors)
- Parameters:
validationErrors
- the map of field names to error messages
DwrValidationException
public DwrValidationException(java.util.Map validationErrors,
java.lang.Object dataObject)
- Parameters:
validationErrors
- the map of field names to error messagesdataObject
- any data object that you wish to return besides the errors
getDataObject
public java.lang.Object getDataObject()
- Returns:
- the dataObject
getValidationErrors
public java.util.Map getValidationErrors()
- Returns:
- a map of field names to error messages
setDataObject
public void setDataObject(java.lang.Object dataObject)
- Parameters:
dataObject
- the dataObject to set
setValidationErrors
public void setValidationErrors(java.util.Map validationErrors)
- Parameters:
validationErrors
- a map of field names to error messages