JadeEditMask Class

The JadeEditMask class is a subclass of the Control class and inherits all of the properties and methods defined in the Control and Window classes. The JadeEditMask class provides a number of features that improve the types of validation that can be performed as data is entered and the presentation of those data entry fields. (The TextBox control provides basic numeric data types for controlling the characters that can be entered as input.)

The JadeEditMask class provides the following functionality.

As edit mask facilities are not provided by the Web browser, Web-enabled applications treat the control as another text box.

If a JadeEditMask is a cell control, the JadeEditMask uses its own mask definition if the cell on which it is activated does not have a mask defined. (Note, however, that if the cell control is activated on a cell that has a defined mask, its pre-defined mask is replaced by the cell's mask and the original JadeEditMask mask is lost.)

Examples of the use of the JadeEditMask control are listed in the following table.

Example Description
Empty date field with prompts and date slashes
Same field with the date entered
Date split into three separate fields
Date split into three separate fields with slash characters displayed as labels

By default, the control functions as a normal text box when you have not specified an edit mask (by using the mask property).

You can define an edit mask:

When running in JADE thin client mode and the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file is set to true, the JadeEditMask class validates the setting and entry of text based on the mask property, using the current locale of the client with regional overrides on both the presentation client and the application server.

When the EnhancedLocaleSupport parameter is not defined or it is set to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are regional overrides, as all overrides on the application server are suppressed.

An edit mask is simply a concatenated series of symbols that can define the following.

When a user presses a key, the control determines the validity of the keyboard action and updates the contents of the control accordingly.

As the JadeEditMask control is numeric-aware, you cannot place the cursor into an invalid empty position before or after numeric data. The cursor automatically positions itself appropriately when the focus is gained (if the entire text is not selected). The Home key also positions the cursor at the beginning of the numeric text, while the End key positions the cursor at the end of the numeric value. In addition, pressing the Delete key when the cursor is positioned directly before a thousands separator deletes the character after the separator.

Pressing the Backspace key when the cursor is positioned directly after a thousands separator deletes the character before the separator.

For a summary of the constants, properties, methods, and events defined in the JadeEditMask class, see "JadeEditMask Class Constants", "JadeEditMask Properties", "JadeEditMask Methods", and "JadeEditMask Events", later in this document. See also "Right-Aligned or Left-Aligned Text Boxes", in the following subsection.