TextAreaEntry

Table of Contents

Overview

Since 3.1

TextAreaEntry is a component for entering multi-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.

See the ICEfaces Showcase Live Demo of this component, complete with source code.

Getting Started

<ace:textAreaEntry id="firstNameInput" value="#{textAreaEntryBean.firstName}" label="First Name" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right"/>

Attributes

TagLib Documentation
This section covers attributes involved in the typical use-cases for this component. For reference, the complete taglib documentation for this component is available here.

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".

Depending on whether input is required, an optionalIndicator or requiredIndicator can be supplied. The position of the indicator is specified by indicatorPosition. Positions can be "left/right/top/bottom/labelLeft/labelRight/none". Default is "labelRight" if labelPosition is "inField", "right" otherwise.

rows and cols specify the visible number of lines and width of the text area.

Text areas can be resizable in browsers that support CSS3. Use the resizable attribute to control this. Default = "true".

Event Listeners

valueChangeListener Listener method that will be notified when a new value has been set for this input component.

Client Behavior Events

blur Fired when the text input field loses focus (default event).

JavaScript API

ICEfaces 3.x

The 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);
The ice.ace.instance function requires the full client id of the component to be specified, such as "j_idt77:componentId" instead of just "componentId". To reduce the complexity of working with complete IDs with this function it may be preferable in some cases to use prependId="false" in the enclosing form (e.g. <h:form prependId="false">).
This component doesn't have a client-side API made specifically to be used by application developers. However, the component's internal methods and variables can be accessed in this way, including the underlying jQuery object and objects from underlying Javascript libraries (if applicable), and can be used for whatever purpose a developer might have in mind.

Keyboard and ARIA Support

The following ARIA roles are supported: texbox.

Labels

This 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 Indicator

The 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 Styling

Then 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 Classes

The following markup represents the basic HTML structure of the component and the CSS classes it uses.

<span>
	<span class="ui-textareaentry-container">
		<textarea class="ui-inputfield ui-textareaentry ui-widget ui-state-default ui-corner-all [user defined classes]" style="[user defined styles]"></textarea>
	</span>
</span>

Known Issues

None.

Additional Resources

Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.

© Copyright 2018 ICEsoft Technologies Canada Corp.