nl.openedge.baritus.validation
Interface FieldValidator

All Known Implementing Classes:
AbstractFieldValidator

public interface FieldValidator

Use this for custom validation

Author:
Eelco Hillenius

Method Summary
 java.lang.Object getOverrideValue(java.lang.Object value)
          if value is not valid, get the custom value to set as the field override in the form.
 boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx, FormBeanContext formBeanContext, java.lang.String fieldName, java.lang.Object value)
          Checks if value is valid.
 

Method Detail

isValid

public boolean isValid(org.infohazard.maverick.flow.ControllerContext cctx,
                       FormBeanContext formBeanContext,
                       java.lang.String fieldName,
                       java.lang.Object value)
Checks if value is valid. This method should return true if validation succeeded or false otherwise. For error handling you have two options:

Parameters:
cctx - maverick context
formBeanContext - context with bean for this currentRequest
fieldName - field name of parameter
value - the value of this parameter
Returns:
true if valid, false if not.

getOverrideValue

public java.lang.Object getOverrideValue(java.lang.Object value)
if value is not valid, get the custom value to set as the field override in the form.

Parameters:
value - the original input value
Returns:
the value that should be used as override value


Copyright © 2003-2004 Open Edge. All Rights Reserved.