View Source

h2. Overview

_TextEntry_ is a component for entering single line text. It has additional styling and functional feature.


h2. Getting Started
{panel}
{code:xml|borderStyle=dashed}<ace:textEntry id="firstNameInput" value="#{textEntryBean.firstName}" label="First Name" labelPosition="left" required="true" requiredIndicator="(*)" indicatorPosition="right"/>
{code}
{panel}

h2. Attributes

{tip:title=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|http://www.icefaces.org/docs/v3_latest/ace/tld/ace/TextEntry.html].{tip}{panel}
*value* is value of the component as a java.util.Date object. Default is current date and time.
{panel}
{panel}
*renderAsPopup* determines whether the calendar is displayed inline or as a popup. Default is false, i.e. inline.
{panel}
{panel}
The *pattern* attribute&nbsp; is used to specify the date/time format of the text input field. It also affects whether the time entry sliders appear in the calendar. The pattern characters are as detailed in the [java.text.SimpleDateFormat javadoc|http://download.oracle.com/javase/1.5.0/docs/api/java/text/SimpleDateFormat.html]. (Some uncommon pattern characters may not be translatable to pattern characters for the client side date/time object.) When an hour field is present in the pattern, the time entry sliders will appear.
{panel}
{panel}
*timeZone* is used to set the date's time zone. It can be a string or java.util.TimeZone object.
{panel}
{panel}
Month/year navigation is by left and right arrow images, one month at a time. To also navigate by month/year drop down lists, set *navigator* to true.
{panel}
{panel}
To enter time only, set *timeOnly* to true.
{panel}
{panel}
Multiple months can be displayed by specifying the no. of months in *pages*.
{panel}

h2. Event Listeners

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

h2. Client Behavior Events

| dateSelect | Fired when a date is selected from the calendar (default event). |

h2. JavaScript API

The client side date/time object is exposed through the global variable named by the *widgetVar* attribute, but currently there is no API useful to the user.

h2. Keyboard Support

These keyboard shortcuts work only in a popup calendar without the time component. Some of them may conflict with browser keyboard shortcuts.
|| Keypress || Result ||
| page up/down | previous/next month |
| ctrl+page up/down | previous/next year |
| ctrl+home | current month or open when closed |
| ctrl+left/right | previous/next day |
| ctrl+up/down | previous/next week |
| enter | select the focused day |
| ctrl+end | close and erase the date |
| escape | close the calendar without selection |

h2. Known Issues

h2. Additional Resources