net.sf.springlayout.web.layout
Interface FieldDefinition

All Known Implementing Classes:
LayoutFieldDefinition

public interface FieldDefinition

Defines a field used in the UI that is mapped to a property of the command object.

Author:
Rob Monie, Adam Boas

Method Summary
 java.util.List getAlternateFieldKeysForError()
          Gets the alternateFieldKeysForError for this LayoutFieldDefinition.
 java.lang.String getFieldKey()
           
 Condition getMandatoryCondition()
          Retrieves all mandatory conditions which this Field definition contains.
 int getMaxLength()
          looks inside validation rules and returns maxLength if such a validation rule is defined
 java.util.List getValidationRules()
           
 boolean isMandatory()
           
 void setAlternateFieldKeysForError(java.util.List alternateFieldKeysForError)
          Retrieves the alternateFieldKeysForError for this LayoutFieldDefinition.
 void setFieldKey(java.lang.String fieldKey)
           
 void setMandatory(boolean mandatory)
           
 void setMandatoryCondition(Condition mandatoryCondition)
           
 void setValidationRules(java.util.List validationRules)
           
 void validate(javax.servlet.http.HttpServletRequest request, NestedPathResolver resolver, org.springframework.beans.BeanWrapper wrapper, org.springframework.validation.Errors errors)
          Calls validate on all validation rules associated with this fieldDefinition.
 

Method Detail

validate

void validate(javax.servlet.http.HttpServletRequest request,
              NestedPathResolver resolver,
              org.springframework.beans.BeanWrapper wrapper,
              org.springframework.validation.Errors errors)
Calls validate on all validation rules associated with this fieldDefinition.

Parameters:
request - the current request
resolver - nestedPath resolver for the current object
wrapper - a bean wrapper for the current object
errors - the current errors object

getFieldKey

java.lang.String getFieldKey()
Returns:
Returns the fieldKey.

setFieldKey

void setFieldKey(java.lang.String fieldKey)
Parameters:
fieldKey - The fieldKey to set.

isMandatory

boolean isMandatory()
Returns:
if the field is currently mandatory.

setMandatory

void setMandatory(boolean mandatory)
Parameters:
mandatory - The mandatory to set.

setMandatoryCondition

void setMandatoryCondition(Condition mandatoryCondition)
Parameters:
mandatoryCondition, - sets a single mandatory condition.

getMandatoryCondition

Condition getMandatoryCondition()
Retrieves all mandatory conditions which this Field definition contains.

Returns:
mandatory condition which this Field definition contains.

getValidationRules

java.util.List getValidationRules()
Returns:
Returns the validationRules.

setValidationRules

void setValidationRules(java.util.List validationRules)
Parameters:
validationRules - The validationRules to set.

setAlternateFieldKeysForError

void setAlternateFieldKeysForError(java.util.List alternateFieldKeysForError)
Retrieves the alternateFieldKeysForError for this LayoutFieldDefinition.


getAlternateFieldKeysForError

java.util.List getAlternateFieldKeysForError()
Gets the alternateFieldKeysForError for this LayoutFieldDefinition.

Parameters:
alternateFieldKeysForError -

getMaxLength

int getMaxLength()
looks inside validation rules and returns maxLength if such a validation rule is defined

Returns:


Copyright © 2005-2007 Spring Layout Team. All Rights Reserved.