Web Application Framework Component Reference Guide
|
  
|
The Masked Text Field component is a single-line, free-form text input field. This component adds support for the validation of input against a specified mask expression.
A mask expression is specified as:
- a # character in the mask signifies a number (0-9)
- a A character in the mask signifies an upper case letter
- a a (small a) character in the mask signifies a lower case letter
- a B character in the mask signifies a letter (upper or lower case)
- a . character in the mask signifies any character
- a * character in the mask signifies any letter or number
- any other character (except the \) is required as is
- a \ character precedes any character that requires escaping (only a #, A, *, . and \)
For example, a mask expression of "###-##-####" could be used to validate a social security number input. A mask expression of "\##B#\#" describes input that begins and ends with "#" with a letter in between two numbers in the middle (ex. "#9k1#")
Note - The backslash character "\" used for escaping characters will require additional escaping to compensate for the Java and Javascript code used in this component. For example, an input mask of "\#aA\*" will require an input of "\\\\#aA\\\\*" in the component.
|
If you do not use an input mask expression, this component behaves much like a standard Text Field.
Property Name
|
Description
|
Notes
|
Initial Value
|
The value to which the visual component is initialized upon its instantiation. Note, this value will overwrite any value in the bound model field if one exists. If you want to set a value on a component without potentially overwriting the model field's value, avoid using this property and instead use the setValue(Object value,boolean overwrite) method with the overwrite parameter set to false. You may call this method from your code as needed (for example, from an event handler) or from the Post-initialization Code property of the component.
|
|
Model Field Binding
|
The model field to which the visual component is bound (where it stores/retrieves its value). The Model Reference property must be configured before this property can be configured.
|
Dependent on Model Reference
|
Model Reference
|
A reference to the model to which the visual component's bound model field belongs. This property must be configured before the Model Field Binding property can be configured.
|
|
Name
|
The name of the component instance.
|
Req
|
Visible
|
Controls whether the component will be displayed or not. Can also be set programmatically using the component's setVisible(boolean) method.
|
|
Mask Expression
|
Masked expression value in which input of this component is validated against.
|
|
Web Application Framework Component Reference Guide
|
819-0725-10
|
  
|
Copyright © 2004, Sun Microsystems, Inc. All Rights Reserved.