Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.apache.tapestry.contrib.valid
Class ValidatingTextField  view ValidatingTextField download ValidatingTextField.java

java.lang.Object
  extended byorg.apache.hivemind.impl.BaseLocatable
      extended byorg.apache.tapestry.AbstractComponent
          extended byorg.apache.tapestry.form.AbstractFormComponent
              extended byorg.apache.tapestry.form.AbstractTextField
                  extended byorg.apache.tapestry.valid.ValidField
                      extended byorg.apache.tapestry.contrib.valid.ValidatingTextField
All Implemented Interfaces:
org.apache.tapestry.IComponent, org.apache.tapestry.form.IFormComponent, org.apache.tapestry.IRender, org.apache.hivemind.Locatable, org.apache.hivemind.LocationHolder

public abstract class ValidatingTextField
extends org.apache.tapestry.valid.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,v 1.5 2004/02/19 17:37:59 hlship Exp $

Field Summary
private  org.apache.tapestry.IBinding minimumLengthBinding
           
private  org.apache.tapestry.IBinding requiredBinding
           
private  org.apache.tapestry.IBinding valueBinding
           
 
Fields inherited from class org.apache.tapestry.valid.ValidField
__CLOVER_459_0
 
Fields inherited from class org.apache.tapestry.form.AbstractTextField
__CLOVER_125_0
 
Fields inherited from class org.apache.tapestry.form.AbstractFormComponent
__CLOVER_124_0
 
Fields inherited from class org.apache.tapestry.AbstractComponent
__CLOVER_0_0
 
Fields inherited from class org.apache.hivemind.impl.BaseLocatable
 
Constructor Summary
ValidatingTextField()
           
 
Method Summary
 org.apache.tapestry.IBinding getMinimumLengthBinding()
           
 org.apache.tapestry.IBinding getRequiredBinding()
           
 org.apache.tapestry.IBinding getTextBinding()
          Returns the valueBinding.
 org.apache.tapestry.valid.IValidator getValidator()
          Overrides ValidField.getValidator()>ValidField.getValidator() 55 to construct a validator on the fly.
 java.lang.Object getValue()
           
 org.apache.tapestry.IBinding getValueBinding()
           
 void setMinimumLengthBinding(org.apache.tapestry.IBinding value)
           
 void setRequiredBinding(org.apache.tapestry.IBinding requiredBinding)
           
 void setTextBinding(org.apache.tapestry.IBinding value)
          Updates valueBinding.
 void setValue(java.lang.Object value)
           
 void setValueBinding(org.apache.tapestry.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, format, format, format, format, formatString, formatString, formatString, formatString, 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.hivemind.impl.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.hivemind.LocationHolder
setLocation
 
Methods inherited from interface org.apache.hivemind.Locatable
getLocation
 

Field Detail

minimumLengthBinding

private org.apache.tapestry.IBinding minimumLengthBinding

requiredBinding

private org.apache.tapestry.IBinding requiredBinding

valueBinding

private org.apache.tapestry.IBinding valueBinding
Constructor Detail

ValidatingTextField

public ValidatingTextField()
Method Detail

getValue

public java.lang.Object getValue()

setValue

public void setValue(java.lang.Object value)

getValueBinding

public org.apache.tapestry.IBinding getValueBinding()

setValueBinding

public void setValueBinding(org.apache.tapestry.IBinding binding)

getTextBinding

public org.apache.tapestry.IBinding getTextBinding()
Returns the valueBinding.


setTextBinding

public void setTextBinding(org.apache.tapestry.IBinding value)
Updates valueBinding.


getMinimumLengthBinding

public org.apache.tapestry.IBinding getMinimumLengthBinding()

setMinimumLengthBinding

public void setMinimumLengthBinding(org.apache.tapestry.IBinding value)

getRequiredBinding

public org.apache.tapestry.IBinding getRequiredBinding()

setRequiredBinding

public void setRequiredBinding(org.apache.tapestry.IBinding requiredBinding)

getValidator

public org.apache.tapestry.valid.IValidator getValidator()
Overrides ValidField.getValidator()>ValidField.getValidator() 55 to construct a validator on the fly.