pattern

The pattern property specifies the pattern for input and output formatting if the field content is a text type. Specify pattern only if the ConsoleField accepts text. The property uses the symbols in the following table.

Table 1. Text formatting symbols
Symbol Meaning
A Placeholder for letters (the subset of characters that are considered to be letters depends on the locale)
# Placeholder for numeric digits
X Placeholder for a required character of any kind
Characters other than those in the table are included in the input or output; but for output, any overlaid characters are lost. Consider the following example:
customerPhoneNumber STRING { pattern = "(###) ###-####" } = 6219655561212;
On output, characters that occupy the same place as the special characters in the pattern (parentheses, space, and hyphen) are overlaid. This example has a 6 in each of those positions. The output is the following string:
(219) 555-1212
On input, EGL replaces the placeholder characters only. If the user types 2195551212, the field and the associated variable hold the following string:
(219) 555-1212

The property is a STRING type. You cannot update the property at run time.

There is no default value for this property. If you do not specify a format, EGL will not filter the input or output for the field.

Compatibility

Table 2. Support for the pattern property
Data item JSF handler VGUI record Console UI Text Form Java™ Text Form COBOL Print Form Java Print Form COBOL
Yes No No Yes No No No No

Feedback