<textInput> Element
Namespace: http://xmlns.oracle.com/uix/ui
Derived from: <ui:formElement> element
Group: UIX Components
Type of Element: UINode

The textinput control creates a browser input text widget.

Syntax
<textInput
    [ columns="unsignedInt" ]
    [ maximumLength="unsignedInt" ]
    [ onChange="string" ]
    [ onSelect="string" ]
    [ required="ui:requiredType" ]
    [ rows="unsignedInt" ]
    [ secret="boolean" ]
    [ text="string" ]
    [ wrap="ui:wrap" ]
    [ data:onBlurValidater ="data binding to oracle.cabo.ui.validate.ClientValidater" ]
    [ data:onSubmitValidater ="data binding to oracle.cabo.ui.validate.ClientValidater" ]
>
   <onBlurValidater></onBlurValidater>
   <onSubmitValidater></onSubmitValidater>
</textInput>

Syntax Notes:
  • This element can also have all the attributes and child elements of the element from which it is derived.
  • Attributes starting with "data:" are really elements for which there is an attribute syntax available. The "data:" indicates that the attribute syntax cannot be used without databinding.

  • Description

    The textinput control creates a browser input text widget. Depending on the numer of rows, this control either maps to a textfield (for single row controls) or textarea (for multiple row text controls). If the input should be hidden from the user while displayed, such as for passwords, the secret property should be used.

    Text will be entered in numeric format (right aligned for most locales) if a DecimalValidater is attached.


    Example

    Simple text input box with the some default text.

       <form name="myform" method="GET">
        <contents>
         <textInput text="Some text " name="textbtn1"/>
        </contents>
       </form>

    A slightly more interesting example showing a text box twenty five characters in length with hidden input text.

       <form name="myform" method="GET">
        <contents>
         <textInput name="SecretTextVar"
                    columns="25"
                    required="no"
                    secret="true"
                    text="secret text:"/>
        </contents>
       </form>

    A text input box which will display three rows of wrapped input text, with a vertical scrollbar. If the text is changed, an alert will say so.

       <form name="myform" method="GET">
        <contents>
         <textInput name="ChangeNotifiedTextBox"
                    rows="3"
                    wrap="soft"
                    onChange="alert('ChangeNotifiedTextBox has changed.')"
                    text="Alert on change."/>
        </contents>
       </form>

    A text input, the contents of which will be in numeric format (right aligned for most locales). The validater ensures the contents is a number as user leaves box.

       <form name="myform" method="GET">
         <contents>
           <textInput name="numeric format" required="yes">
               <onBlurValidater>
                   <decimal/>
               </onBlurValidater>
               <contents/>
           </textInput>
         </contents>
       </form>

    Attributes

    Description Type
    columns the number of columns to display in the text control. If no value is specified, a default of 30 columns is used. One column is approximately one character in the browser's current display font.
    unsignedInt
    maximumLength the maximum number of characters per line that can be entered into the text control. Note that this value is independent of the "cols" displayed.
    unsignedInt
    onChange event handler for when the value is changed.
    string
    onSelect event handler for when text becomes selected.
    string
    required whether the associated control requires user input. Three values are allowed:
    • "yes"

      User input in this field is required and any attached validater must succeed.

    • "no"

      Either this field is empty or any attached validater must succeed.

    • "validaterOnly"

      Any attached validater must succeed. Thus validation success is only dependent on the validater and not whether any text has been entered into this field.

    These interact with any ClientValidaters attached to the TextInputBean to determine whether field validation succeeds or fails.

    The default of this attribute is "no".


    ui:requiredType
    rows the number of rows to display in the text control. The default is one. Setting to more than one row precludes the use of some attributes, such as "secret".
    unsignedInt
    secret a boolean value that only applies to single line text controls. When set to "true", it hides the actual value of the text from the user.
    boolean
    text the text value of the input field.
    string
    wrap the type of text wrapping to be used in a multi-row text control. This attribute is ignored for single row controls. By default, multirow text does not wrap at the column edge, but instead scrolls horizontally. Setting the value for this attribute to "soft" indicates that the text should wrap visually, but not include carriage returns in the value. Setting it to "hard" specifies that the value of the text should include any carriage returns needed to wrap the lines.
    ui:wrap

    Child Elements

    Description Required? Maximum
    <onBlurValidater> ClientValidater to fire on the client whenever the TextInputBean loses keyboard focus.
    No 1
    <onSubmitValidater> ClientValidater to fire on the client whenever the form containing the TextInputBean is submitted.
    No 1