|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.mentawai.filter.ValidationFilter
public abstract class ValidationFilter
| Field Summary | |
|---|---|
static String |
DEFAULT_DIR
|
| Constructor Summary | |
|---|---|
ValidationFilter()
|
|
| Method Summary | |
|---|---|
void |
destroy()
Gives a chance to the filter to deallocalte any resources before it is destroyed. |
String |
filter(InvocationChain chain)
Executes the filter. |
static boolean |
isPost(Action action)
|
abstract void |
prepareValidator(Validator validator,
Action action,
String innerAction)
Implement this abstract method to add rules to the fields you want to validate. |
void |
setDir(String dir)
Sets the directory where to look for error messages. |
void |
setMessageContext(MessageContext msgContext)
Sets the MessageContext from where you want to get the error messsages. |
void |
setResultForError(String resultForError)
By default, the filter returns the BaseAction.ERROR when a validation failure happens. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DEFAULT_DIR
| Constructor Detail |
|---|
public ValidationFilter()
| Method Detail |
|---|
public abstract void prepareValidator(Validator validator,
Action action,
String innerAction)
public void setResultForError(String resultForError)
resultForError - The result to return in case of a validation failure.public void setMessageContext(MessageContext msgContext)
msgContext - The MessageContext to use instead of the default one.public static boolean isPost(Action action)
public void setDir(String dir)
dir - The directory where to look for error messages.
public String filter(InvocationChain chain)
throws Exception
Filter
filter in interface Filterchain - The InvocationChain for the action this filter is being applied to.
Exceptionpublic void destroy()
Filter
destroy in interface Filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||