com.ibm.as400.util.html
Class TextFormInput
java.lang.Object
|
+--com.ibm.as400.util.html.HTMLTagAttributes
|
+--com.ibm.as400.util.html.FormInput
|
+--com.ibm.as400.util.html.TextFormInput
- All Implemented Interfaces:
- HTMLTagElement, java.io.Serializable
- Direct Known Subclasses:
- PasswordFormInput
- public class TextFormInput
- extends FormInput
The TextFormInput class represents a single line text input type in
an HTML form. The trailing slash "/" on the TextFormInput tag
allows it to conform to the XHTML specification.
Here is an example of a TextFormInput tag:
<input type="text" name="userID" size="40" />
TextFormInput objects generate the following events:
- PropertyChangeEvent
- VetoableChangeEvent
- See Also:
- Serialized Form
Constructor Summary |
TextFormInput()
Constructs a default TextFormInput object. |
TextFormInput(java.lang.String name)
Constructs a TextFormInput object with the specified control name. |
TextFormInput(java.lang.String name,
java.lang.String value)
Constructs a TextFormInput object with the specified control name and
initial input value. |
Method Summary |
int |
getMaxLength()
Returns the maximum number of characters permitted in the text field. |
java.lang.String |
getTag()
Returns the tag for the text form input type. |
void |
setMaxLength(int length)
Sets the maximum number of characters permitted in the text field. |
Methods inherited from class com.ibm.as400.util.html.FormInput |
addVetoableChangeListener, getDirection, getLanguage, getName, getSize, getValue, removeVetoableChangeListener, setDirection, setLanguage, setName, setSize, setValue, toString |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
TextFormInput
public TextFormInput()
- Constructs a default TextFormInput object. There is no initial
limit on the maximum number of characters permitted in the text
field.
TextFormInput
public TextFormInput(java.lang.String name)
- Constructs a TextFormInput object with the specified control name.
There is no initial limit on the maximum number of characters
permitted in the text field.
- Parameters:
name
- The control name of the input field.
TextFormInput
public TextFormInput(java.lang.String name,
java.lang.String value)
- Constructs a TextFormInput object with the specified control name and
initial input value. There is no initial limit on the maximum number of
characters permitted in the text field.
- Parameters:
name
- The control name of the input field.value
- The initial value of the input field.
getMaxLength
public int getMaxLength()
- Returns the maximum number of characters permitted in the text field.
A value of -1 indicates that there is no limit.
- Returns:
- The maximum length.
getTag
public java.lang.String getTag()
- Returns the tag for the text form input type.
- Returns:
- The tag.
setMaxLength
public void setMaxLength(int length)
throws java.beans.PropertyVetoException
- Sets the maximum number of characters permitted in the text field.
- Parameters:
length
- The maximum length.- Throws:
java.beans.PropertyVetoException
- If a change is vetoed.