org.apache.tapestry.valid
Class FieldTracking

java.lang.Object
  extended by org.apache.tapestry.valid.FieldTracking
All Implemented Interfaces:
IFieldTracking

public class FieldTracking
extends Object
implements IFieldTracking

Default implementation of IFieldTracking.

Since:
1.0.8
Version:
$Id: FieldTracking.java 243791 2004-02-19 17:38:13Z hlship $
Author:
Howard Lewis Ship

Method Summary
 IFormComponent getComponent()
          Returns the field component.
 ValidationConstraint getConstraint()
          Returns the validation constraint that was violated by the input.
 IRender getErrorRenderer()
          Returns an object that will render the error message.
 String getFieldName()
          Returns the name of the field, that is, the name assigned by the form (this will differ from the component's id when any kind of looping operation is in effect).
 String getInput()
          Returns the invalid input recorded for the field.
 boolean isInError()
          Returns true if the field is in error (that is, if it has an error message renderer.
 void setConstraint(ValidationConstraint constraint)
           
 void setErrorRenderer(IRender value)
           
 void setInput(String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getComponent

public IFormComponent getComponent()
Description copied from interface: IFieldTracking
Returns the field component. This may return null if the error is not associated with any particular field.

Specified by:
getComponent in interface IFieldTracking

getErrorRenderer

public IRender getErrorRenderer()
Description copied from interface: IFieldTracking
Returns an object that will render the error message. Alternately, the toString() of the renderer can be used as a simple error message.

Specified by:
getErrorRenderer in interface IFieldTracking

setErrorRenderer

public void setErrorRenderer(IRender value)

getInput

public String getInput()
Description copied from interface: IFieldTracking
Returns the invalid input recorded for the field. This is stored so that, on a subsequent render, the smae invalid input can be presented to the client to be corrected.

Specified by:
getInput in interface IFieldTracking

setInput

public void setInput(String value)

getFieldName

public String getFieldName()
Description copied from interface: IFieldTracking
Returns the name of the field, that is, the name assigned by the form (this will differ from the component's id when any kind of looping operation is in effect).

Specified by:
getFieldName in interface IFieldTracking

getConstraint

public ValidationConstraint getConstraint()
Description copied from interface: IFieldTracking
Returns the validation constraint that was violated by the input. This may be null if the constraint isn't known.

Specified by:
getConstraint in interface IFieldTracking

setConstraint

public void setConstraint(ValidationConstraint constraint)

isInError

public boolean isInError()
Description copied from interface: IFieldTracking
Returns true if the field is in error (that is, if it has an error message renderer.

Specified by:
isInError in interface IFieldTracking
Since:
3.0