org.apache.tapestry.contrib.valid
Class ValidatingTextField
java.lang.Object
org.apache.tapestry.spec.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.form.AbstractTextField
org.apache.tapestry.valid.ValidField
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
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 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 |
ValidatingTextField
public ValidatingTextField()
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