org.apache.tapestry.contrib.valid
Class ValidatingTextField
java.lang.Object
org.apache.hivemind.impl.BaseLocatable
org.apache.tapestry.AbstractComponent
org.apache.tapestry.form.AbstractFormComponent
org.apache.tapestry.valid.ValidField
org.apache.tapestry.contrib.valid.ValidatingTextField
- All Implemented Interfaces:
- org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder, IFormComponent, IComponent, IDirectEvent, Component, 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
- Author:
- Howard Lewis Ship
- See Also:
ValidField
Methods inherited from class org.apache.tapestry.form.AbstractFormComponent |
generateClientId, getCanTakeFocus, getForm, getIdParameter, getName, getRenderBodyOnRewind, peekClientId, renderComponent, renderDelegateAttributes, renderDelegatePrefix, renderDelegateSuffix, setForm, setName, setName |
Methods inherited from class org.apache.tapestry.AbstractComponent |
addAsset, addBody, addComponent, checkActiveLock, cleanupAfterRender, enterActiveState, equals, finishLoad, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getBody, getBodyCount, getBoundId, getClientId, getComponent, getComponents, getContainedComponent, getContainedRenderers, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getInnerRenderers, getListeners, getMessages, getNamespace, getPage, getRenderWorker, getSpecification, getSpecifiedId, getTemplateTagName, hasEvents, hashCode, isInActiveState, isParameterBound, isRendering, isStateful, pageEndRender, prepareForRender, render, renderBody, renderIdAttribute, renderInformalParameters, setBinding, setClientId, setContainedComponent, setContainer, setHasEvents, setId, setNamespace, setPage, setTemplateTagName, toString, triggerEvent |
Methods inherited from class org.apache.hivemind.impl.BaseLocatable |
getLocation, setLocation |
Methods inherited from interface org.apache.tapestry.IComponent |
addAsset, addBody, addComponent, enterActiveState, finishLoad, getAsset, getAssets, getBeans, getBinding, getBindingNames, getBindings, getComponent, getComponents, getContainedComponent, getContainer, getEventInvoker, getExtendedId, getId, getIdPath, getListeners, getMessages, getNamespace, getPage, getSpecification, getSpecifiedId, getTemplateTagName, isRendering, renderBody, setBinding, setClientId, setContainedComponent, setContainer, setId, setNamespace, setPage, setTemplateTagName |
Methods inherited from interface org.apache.tapestry.IRender |
render |
Methods inherited from interface org.apache.hivemind.LocationHolder |
setLocation |
Methods inherited from interface org.apache.hivemind.Locatable |
getLocation |
ValidatingTextField
public ValidatingTextField()
getMinimumLength
public abstract int getMinimumLength()
isRequired
public abstract boolean isRequired()
- Description copied from class:
AbstractFormComponent
- Returns false. Subclasses that might be required must override this method. Typically, this
involves checking against the component's validators.
- Specified by:
isRequired
in interface IFormComponent
- Overrides:
isRequired
in class AbstractFormComponent
getText
public abstract String getText()
setText
public abstract void setText(String value)
getValue
public Object getValue()
- Specified by:
getValue
in class ValidField
setValue
public void setValue(Object value)
- Specified by:
setValue
in class ValidField
getValidator
public IValidator getValidator()
- Overrides
ValidField.getValidator()
to construct a validator on
the fly.
- Specified by:
getValidator
in class ValidField
Copyright © 2006-2008 Apache Software Foundation. All Rights Reserved.