text

The text tag is used to create a text input control.

The text tag generates an XDIME <xftextinput> element, which is used to create a text input control. The <xftextinput> element supports both single and multi line text inputs. A style rule can be used to control the number of rows and columns that the text input field occupies. The class and id attributes determine which style rule, if any, is applied to the control.

This element maps to the text tag in the struts-html tag library and generates HTML for an input element with the type parameter equal to text (<input type="text">). It can also map to the textarea tag when used with a styleClass that supports multiple rows. In the HTML struts tag library, the textarea tag generates HTML for a <textarea> element.

The text tag is valid only when nested inside a form tag.

<xdime:form action="/search" xfname="searchForm">
Search Query: <xdime:text property="query"/><br>
<xdime:submit/>
</xdime:form>

Supported attributes

Struts-XDIME Attribute Name XDIME Struts-HTML HTML Required Description
caption caption n/a n/a No The caption for this control
captionPane captionPane n/a n/a No The pane in which the caption will be displayed
disabled active disabled disabled No Set to true if this field should be disabled
indexed n/a indexed n/a No Accepts "true" to denote that the value assigned to the corresponding XDIME tag's name attribute will have an index (for example, "property[x]"). Applies only when this tag is nested inside the Logic Tag Library's iterate tag.
entryPane entryPane n/a n/a No The pane in which the input element of the control will be displayed
expr expr n/a n/a No MCS expression
inputMode inputMode n/a n/a No Sets the default character input mode for iMode and MML devices
maxLength maxlength maxLength maxlength No The maximum number of characters that can be accepted for the field
name name name name No The name of an object (in any scope) whose field, specified by the property attribute, will be used to populate this control with data
property n/a property n/a Yes The value to set the corresponding XDIME tag's name attribute to. This attribute is also used to specify the field of the object specified by the name attribute whose getter method will be called to return an object whose value will be used to populate this control
styleClass class styleClass class No Style class
styleId id styleId id No Style ID
tabindex tabindex tabindex tabindex No Tab Index
title title Title title No Title of this element
titleKey n/a titleKey n/a No Message resource key for the title of this element
validate validate n/a n/a No Rules for validating the content
value initial value value No Specifies a constant value with which the control will be populated

Unsupported attributes

Struts-HTML attribute HTML Reason Not Supported
accesskey accesskey No equivalent XDIME function
alt Alt No equivalent XDIME function
altKey n/a No equivalent XDIME function
style style No equivalent XDIME function
onblur onblur No support for JavaScript
onclick onclick No support for JavaScript
ondblclick ondblclick No support for JavaScript
onfocus onfocus No support for JavaScript
onkeydown onkeydown No support for JavaScript
onkeypress onkeypress No support for JavaScript
onkeyup onkeyup No support for JavaScript
onkeydown onkeydown No support for JavaScript
onmousedown onmousedown No support for JavaScript
onmousemove onmousemove No support for JavaScript
onmouseout onmouseout No support for JavaScript
onmouseover onmouseover No support for JavaScript
onmouseup onmouseup No support for JavaScript
readonly readonly No equivalent XDIME function
size size No equivalent XDIME function



Terms of use
(C) Copyright IBM Corporation 2012. All Rights Reserved.