OverviewSince 3.0 The MaskedEntry component allows a user to more easily enter fixed width input where you would like them to enter the data in a certain format.
Getting Started<ace:maskedEntry id="workPhoneInput" value="#{maskedEntryBean.workPhone}" mask="(999) 999-9999? x99999"/>
Attributes
A mask is defined by a format made up of mask definitions: "a" represents an alpha character (A-Z,a-z); "9" represents a numeric character (0-9); "*" represents an alphanumeric character (A-Z,a-z,0-9). All input is optional. Any character not in the definitions list will be automatically entered for the user as they type. By default the mask function uses underscore to denote input points in text box. If you want to use a different character, set it with the placeHolder attribute. Event Listeners
Client Behavior Events
JavaScript APIICEfaces 3.xThe client side component object is exposed through the global variable name specified in the widgetVar attribute. ICEfaces 4+The "widgetVar" attribute on the ACE components has been removed in ICEfaces 4 and in its place a new "ice.ace.instance()" client JavaScript object lookup API has been introduced. The reason for this change is to enable lazy-initialization of the ACE component JavaScript objects to improve runtime performance and reduce browser memory use. var widget = ice.ace.instance('frm:componentId);
Keyboard and ARIA SupportThe following ARIA roles are supported: textbox LabelsThis component supports built-in labels. The text specified in the label attribute will be rendered next to the main input field of this component. The position specified by labelPosition will determine where this label is going to be rendered; the possible values are left, right, top, bottom, none and inField (to render the label in the field itself). Required IndicatorThe requiredIndicator attribute specifies the text to be displayed next to the main input field when this component is marked as required. When, this component is not marked as required, then the text specified in the optionalIndicator is going to be rendered. The indicatorPosition attribute determines where this indicator text is going to the rendered; the possible values are left, right, top, bottom, labelLeft, labelRight, and none. Required StylingThen this component is marked as required, the main input field receives the CSS class ui-state-required, otherwise, it receives the CSS class ui-state-optional. When this component is marked as invalid by the app, it will be rendered with the CSS class ui-state-error. These CSS classes can be used to add custom styling to this component, in order indicate its current state in a more visual way. CSS ClassesThe following markup represents the basic HTML structure of the component and the CSS classes it uses. <span id="form:dobInput"> <input class="ui-inputfield ui-inputmask ui-widget ui-state-default ui-corner-all ui-state-optional [user defined classes]" style="[user defined styles]" /> </span> Known Issues
Additional Resources |
MaskedEntry
© Copyright 2021 ICEsoft Technologies Canada Corp.