A TextFieldTag references a DataField in the Context hierarchy and creates either an HTML text or a password Input element, based on the isPassword attribute value.
Mandatory attributes:dataName
Attribute | Description | Default value |
---|---|---|
dataName | Name of the DataField in the context hierarchy. If the DataField is read only, in Internet Explorer the text field is also read only. If a form containing a text field is submitted, the context's element named dataName is set with the text field value. | |
isPassword | Whether the text field displays passwords | no |
isHidden | Whether the text field is a hidden field | no |
maxLength | Maximum number of characters in the text field | null |
size | Size of the text field | null |
error | Whether the text field shows any invalid value contained in the DataField | no |
errorStyle | Style for any invalid text | font-style:italic; color:orangered |
style | Style for the text field | null |
custom | Adds attributes to the input element. The following is the format of this attribute: custom="att1Name=\"att1Value\ "att2Name=\"att2Value\"..." | null |
<h1>Using the TextField Tag</h1> <dse:form name="f1" nextEventName="ok" errorPage="textFieldPage.jsp"> <dse:text dataName="normalField"/><br> <dse:text dataName="readOnlyField"/><br> <dse:text dataName="password" isPassword="yes"/><br> <dse:text dataName="sizedField10" size="15" maxLength="10"/><br> <dse:text dataName="inErrorField" size="15" error="yes"/><br> <dse:text dataName="inErrorField" size="15" error="yes" style="background:gold;color:teal;border-style:groove;border-color:azure"/><br> <dse:button type="submit"/><br> </dse:form>