Introduction
A WOTextField represents itself as a text input field. It corresponds to the HTML element <INPUT TYPE="TEXT"...>.
Usage
WOTextField { value=aValue; [formatter=formatterObj;] [dateformat=dateFormatString;] [numberformat=numberFormatString;] [name=fieldName;] [disabled=aBoolean;] ... }
Bindings
value |
During page generation, value sets the default value displayed in the single-line text field. During request handling, it holds the value the user entered into the field, or the default value if the user left the field untouched. |
formatter |
An instance of a java.text.Format subclass to be used to format object values for display as strings, and format user-entered strings back into object values. This attribute should specify a variable containing (or method returning) a preconfigured formatter object. |
If a user enters an "unformattable" value, WOTextField passes the invalid value through, allowing you to send back an error page that shows the invalid value. |
dateformat |
A format string that specifies how value should be formatted as a date. If a date format is used, value can be assigned an NSTimestamp object (if it is assigned a java.langString object, it will be stored as the string representation of an NSTimestamp object). If the element's value can't be interpreted according to the format you specify, it is set to null. See the NSTimestamp class specification for a description of the date format syntax. |
numberformat |
A format string that specifies how value should be formatted as a number. If the element's value can't be interpreted according to the format you specify, value is set to null. See the NSNumberFormatter class specification for a description of the number format syntax. |
name |
Name that uniquely identifies this element within the form. You may specify a name or let WebObjects automatically assign one at runtime. |
disabled |
If disabled evaluates to true, the element appears in the page but is not active. That is, value does not contain the user's input when the page is submitted. |