|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ValidationAware classes can accept Action (class level) or field level error messages. Action level messages are kept in a Collection. Field level error messages are kept in a Map from String field name to a List of field error msgs.
Method Summary | |
void |
addActionError(String anErrorMessage)
Add an Action-level error message to this Action. |
void |
addActionMessage(String aMessage)
Add an Action-level message to this Action. |
void |
addFieldError(String fieldName,
String errorMessage)
Add an error message for a given field. |
Collection |
getActionErrors()
Get the Collection of Action-level error messages for this action. |
Collection |
getActionMessages()
Get the Collection of Action-level messages for this action. |
Map |
getFieldErrors()
Get the field specific errors associated with this action. |
boolean |
hasActionErrors()
Check whether there are any Action-level error messages. |
boolean |
hasActionMessages()
Checks whether there are any Action-level messages. |
boolean |
hasErrors()
Note that this does not have the same meaning as in WW 1.x. |
boolean |
hasFieldErrors()
Check whether there are any field errors associated with this action. |
void |
setActionErrors(Collection errorMessages)
Set the Collection of Action-level String error messages. |
void |
setActionMessages(Collection messages)
Set the Collection of Action-level String messages (not errors). |
void |
setFieldErrors(Map errorMap)
Set the field error map of fieldname (String) to Collection of String error messages. |
Method Detail |
public void setActionErrors(Collection errorMessages)
errorMessages
- public Collection getActionErrors()
public void setActionMessages(Collection messages)
public Collection getActionMessages()
public void setFieldErrors(Map errorMap)
errorMap
- public Map getFieldErrors()
public void addActionError(String anErrorMessage)
anErrorMessage
- public void addActionMessage(String aMessage)
public void addFieldError(String fieldName, String errorMessage)
fieldName
- name of fielderrorMessage
- the error messagepublic boolean hasActionErrors()
public boolean hasActionMessages()
public boolean hasErrors()
public boolean hasFieldErrors()
|
XWork Project Page | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |