OverviewSince 3.1 TextEntry is a component for entering single line text. It has additional styling and functional features. Styling is controlled via the theme style sheet using predefined style classes. Additional attributes add functional features.
Getting Started<ace:textEntry id="firstNameInput" value="#{textEntryBean.firstName}" label="First Name" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right"/>
Attributes
value is the input text. label and labelPosition specify the label text and its position relative to the input field. Positions can be "left/right/top/bottom/inField/none". Default is "none". required indicates whether the user is required to provide a non-empty submitted value for this component. Default = "false". The secret boolean attribute can be set to "true" to display asterisks in place of the actual entered text, such as when capturing a password, etc. Default = 'false'. The type attribute for the input element. Currently supports text, phone, url, email, number, date, time, datetime. Depending on device capability, a type-specific keyboard may be displayed. The autotab attribute (when true) causes the component to automatically tab to the next component once the maxLength number of characters have been entered. 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);
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> <span> <input class="ui-inputfield ui-textentry ui-widget ui-state-default ui-corner-all [user defined classes]" style="[user defined styles]" /> <span class="ui-required-indicator ui-required-indicator-right">*</span> </span> </span> Keyboard and ARIA SupportThe following ARIA roles are supported: textbox. Known Issues
Additional Resources |
TextEntry
© Copyright 2021 ICEsoft Technologies Canada Corp.