|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.webflow.validation.ValidationHelper
public class ValidationHelper
A helper class the encapsulates conventions to invoke validation logic.
Constructor Summary | |
---|---|
ValidationHelper(java.lang.Object model,
RequestContext requestContext,
java.lang.String eventId,
java.lang.String modelName,
ExpressionParser expressionParser,
org.springframework.validation.MessageCodesResolver messageCodesResolver,
MappingResults mappingResults)
Create a throwaway validation helper object. |
Method Summary | |
---|---|
void |
setValidationHints(java.lang.Object[] validationHints)
Provide validation hints such as validation groups to use against a JSR-303 provider. |
void |
setValidator(org.springframework.validation.Validator validator)
Configure a Validator to apply to the model. |
void |
validate()
Invoke the validators available by convention. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidationHelper(java.lang.Object model, RequestContext requestContext, java.lang.String eventId, java.lang.String modelName, ExpressionParser expressionParser, org.springframework.validation.MessageCodesResolver messageCodesResolver, MappingResults mappingResults)
validate()
method.
Validation methods invoked include a validation method on the model object or a validator bean. The method name on either object is in the form of validate[viewStateId]. A ValidationContext is passed in the method signature along with the model object for validator beans. A MessageContext can be substituted for the ValidationContext.
For example: model.validateEnterBookingDetails(VaticationContext)
or
context.getBean("modelValidator").validateEnterBookingDetails(model, VaticationContext)
model
- the object to validaterequestContext
- the context for the requesteventId
- the event triggering validationmodelName
- the name of the model objectexpressionParser
- the expression parsermappingResults
- object mapping resultsMethod Detail |
---|
public void setValidator(org.springframework.validation.Validator validator)
Validator
to apply to the model.
public void setValidationHints(java.lang.Object[] validationHints)
public void validate()
|
Spring Web Flow | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |