org.apache.tapestry.contrib.valid
Class ValidatingTextField

java.lang.Object
  extended by org.apache.tapestry.spec.BaseLocatable
      extended by org.apache.tapestry.AbstractComponent
          extended by org.apache.tapestry.form.AbstractFormComponent
              extended by org.apache.tapestry.form.AbstractTextField
                  extended by org.apache.tapestry.valid.ValidField
                      extended by org.apache.tapestry.contrib.valid.ValidatingTextField
All Implemented Interfaces:
IFormComponent, IComponent, ILocatable, ILocationHolder, IRender

public abstract class ValidatingTextField
extends ValidField

Backwards compatible version of the 1.0.7 ValidatingTextField component.

Parameter Type Read / Write Required Default Description
text java.lang.String R / W yes   The text inside the text field.

When the form is submitted, the binding is only updated if the value is valid.

minimumLength int R no 0 The minimum length (number of characters read) for the field. The value provided in the request is trimmed of leading and trailing whitespace.

If a field is not required and no value is given, then minimumLength is ignored. Minimum length only applies if some non-null value is given.

required boolean R no false If true, then a non-null value must be provided. A value consisting only of whitespace is considered null.
displayName String R yes   A textual name for the field that is used when formulating error messages.

May not have a body. May have informal parameters.

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

Constructor Summary
ValidatingTextField()
           
 
Method Summary
 IBinding getMinimumLengthBinding()
           
 IBinding getRequiredBinding()
           
 IBinding getTextBinding()
          Returns the valueBinding.
 IValidator getValidator()
          Overrides ValidField.getValidator() to construct a validator on the fly.
 Object getValue()
           
 IBinding getValueBinding()
           
 void setMinimumLengthBinding(IBinding value)
           
 void setRequiredBinding(IBinding requiredBinding)
           
 void setTextBinding(IBinding value)
          Updates valueBinding.
 void setValue(Object value)
           
 void setValueBinding(IBinding binding)
           
 
Methods inherited from class org.apache.tapestry.valid.ValidField
addSelect, beforeCloseTag, getDisplayName, readValue, renderComponent, updateValue
 
Methods inherited from class org.apache.tapestry.form.AbstractTextField
isDisabled, isHidden
 
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent
getForm, getForm, getName, setForm, setName
 
Methods inherited from class org.apache.tapestry.AbstractComponent
addAsset, addBody, addComponent, cleanupAfterRender, finishLoad, finishLoad, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, fireObservedChange, format, format, format, format, formatString, formatString, formatString, formatString, generateAttributes, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getChangeObserver, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getListeners, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, pageEndRender, prepareForRender, render, renderBody, renderInformalParameters, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification, toString
 
Methods inherited from class org.apache.tapestry.spec.BaseLocatable
getLocation, setLocation
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.apache.tapestry.form.IFormComponent
getForm, getName, isDisabled, setName
 
Methods inherited from interface org.apache.tapestry.IComponent
addAsset, addBody, addComponent, finishLoad, getAsset, getAssets, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainer, getExtendedId, getId, getIdPath, getMessage, getMessages, getNamespace, getPage, getProperty, getSpecification, getString, renderBody, setBinding, setContainer, setId, setNamespace, setPage, setProperty, setSpecification
 
Methods inherited from interface org.apache.tapestry.IRender
render
 
Methods inherited from interface org.apache.tapestry.ILocationHolder
setLocation
 
Methods inherited from interface org.apache.tapestry.ILocatable
getLocation
 

Constructor Detail

ValidatingTextField

public ValidatingTextField()
Method Detail

getValue

public Object getValue()
Specified by:
getValue in class ValidField

setValue

public void setValue(Object value)
Specified by:
setValue in class ValidField

getValueBinding

public IBinding getValueBinding()

setValueBinding

public void setValueBinding(IBinding binding)

getTextBinding

public IBinding getTextBinding()
Returns the valueBinding.


setTextBinding

public void setTextBinding(IBinding value)
Updates valueBinding.


getMinimumLengthBinding

public IBinding getMinimumLengthBinding()

setMinimumLengthBinding

public void setMinimumLengthBinding(IBinding value)

getRequiredBinding

public IBinding getRequiredBinding()

setRequiredBinding

public void setRequiredBinding(IBinding requiredBinding)

getValidator

public IValidator getValidator()
Overrides ValidField.getValidator() to construct a validator on the fly.

Specified by:
getValidator in class ValidField