org.jscience.sociology.forms
Class TextBox

java.lang.Object
  extended by org.jscience.sociology.forms.FormElement
      extended by org.jscience.sociology.forms.TextBox
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
PasswordBox

public class TextBox
extends FormElement

This class represents textfields and textareas, as well as serves as the superclass of PasswordBox class.

See Also:
FormElement, PasswordBox, FieldValidator, Serialized Form

Constructor Summary
TextBox()
           
 
Method Summary
 void addFieldValidator(FieldValidator fieldValidator)
          Adds a FieldValidator object to the list of validators already registered with this TextBox.
 
Methods inherited from class org.jscience.sociology.forms.FormElement
getErrorMessage, getName, getValue, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextBox

public TextBox()
Method Detail

addFieldValidator

public void addFieldValidator(FieldValidator fieldValidator)
Adds a FieldValidator object to the list of validators already registered with this TextBox. No adding will take place in case the coming fieldValidator is already registered.

In forms.xml you add a FieldValidator like this:

 <field name="field name"
   type="org.jscience.sociology.forms.TextBox">
   ...............
   ...............
   <field-validator>
      FieldValidator object name
   </field-validator>
 </field>
 

Parameters:
fieldValidator - FieldValidator object to be registered with this TextBox.