djValidationTextBox - Dojo Validation Text Box

Accepts a validated value.

Category

Dojo Form

Syntax

<xe:djValidationTextBox attributes>content</xe:djValidationTextBox>
Table 1. Essential properties
Property Description
id Defaults to djValidationTextBox1, djValidationTextBox2, and so on.
value Binds the control to a data element.
Table 2. All properties
Category Properties
accessibility alt, tabIndex, title, waiRole, waiState
basics binding, dir, disabled, id, immediate, lang, loaded, maxLength, multipleSeparator, multipleTrim, readOnly, rendered, rendererType, required, trim, type, validatorExt
data converter, defaultValue, disableClientSideValidation, disableModifiedFlag, disableValidators, invalidMessage, promptMessage, regExp, regExpGen, showReadOnlyAsDisabled, validator, validators, value, valueChangeListener, valueChangeListeners
dojo dojoAttributes, dojoType, dragRestriction, intermediateChanges, tooltip
events onBlur, onChange, onClick, onClose, onDblClick, onFocus, onHide, onKeyDown, onKeyPress, onKeyUp, onMouseDown, onMouseEnter, onMouseLeave, onMouseMove, onMouseOut, onMouseOver, onMouseUp, onShow
format displayMessageExt, lowercase, propercase, tooltipPosition, uppercase
styling disableTheme, style, styleClass, themeId

Usage

This is a Dojo control.

At run time, a text box appears on the page. On invalid input, a tooltip appears.

This control is not tested against the latest accessibility standards. The recommended accessible path is the Edit Box control.

Examples

This example consists of a Validation text box bound to a scoped variable, a button for submitting the page, and a computed field that displays the value of the scoped variable. The text box allows only the characters a through z and A through Z. The user is prevented from entering invalid input.
<xp:table>
	<xp:tr>
		<xp:td>Validation Text Box</xp:td>
		<xp:td>
			<xe:djValidationTextBox id="djValidationTextBox1"
				value="#{sessionScope.djValidationTextBox1}">
				<xe:this.regExp><![CDATA[[a-zA-Z]*]]></xe:this.regExp>
			</xe:djValidationTextBox>
		</xp:td>
	</xp:tr>
	<xp:tr>
		<xp:td>
			<xp:button value="submit" id="button1">
				<xp:eventHandler event="onclick" submit="true" refreshMode="complete" immediate="false" save="true">
			</xp:eventHandler></xp:button>
		</xp:td>
		<xp:td></xp:td>
	</xp:tr>
	<xp:tr>
		<xp:td>Value</xp:td>
		<xp:td><xp:text escape="true" id="computedField1" value="#{sessionScope.djValidationTextBox1}"></xp:text></xp:td>
	</xp:tr>
</xp:table>