Convert Date/Time sub tag (ICU4J)
The <hx:convertDateTime> tag extends the <f:convertDateTime> tag by adding a calendar attribute that provides support for calendars other than the Gregorian calendar.
<hx:convertDateTime> uses the ICU4J internationalization library implementation. ICU4J is a set of Java™ libraries that supports unicode, software globalization, and internationalization.
Parent tags
This tag is used as a child of the following tags:
- <h:inputText>
- <h:inputMiniCalendar>
- <h:outputText>
Rendering
This component has no visual rendering. No HTML is rendered.
Properties and All Attributes views
The Properties view for a component shows the most common set of attributes you can set on a component, and, depending on the component, you might also see options for adding controls, actions, or other components. To open the Properties view, click
Window | Show View | Properties.
These common attributes for the Convert Date/Time sub tag:
The All Attributes view shows a table of all the attributes you can set on a component, which includes those attributes you can access from the Properties view. To switch to the All Attributes view, click the
All Attributes icon in the upper right corner of the Properties view.
Table 1. Convert Date/Time attributes Attribute name
Description
calendar
The calendrical system to be used for the date/time. Gregorian is the default. Calendars available include:
- gregorian
- japanese
- buddhist
- hebrew
- islamic
Important: If the calendar attribute is set to Japanese <hx:convertDateTime> implements only one
"y" as its format string when used in conjunction with the
"G" era designation. For example
<hx:convertDateTime calendar="japanese" pattern="Gy/MM/dd" />dateStyle
Predefined formatting style which determines how the date component of a date string is to be formatted and parsed. Applied only if type is "date" or "both".
locale
Locale whose predefined styles for dates and times are used during formatting or parsing. If not specified, the locale returned by FacesContext.getViewRoot().getLocale() is used.
pattern
Becomes active if you select a custom type number field. Custom formatting pattern which determines how the string should be parsed.
timeStyle
Predefined formatting style which determines how the time component of a date string is to be formatted and parsed. Applied only if type is "time" or "both".
timeZone
Time zone in which to interpret any time information in the date String. Value must be either a VB expression that evaluates to a java.util.TimeZone instance, or a String that is a timezone ID as described in the javadocs for java.util.TimeZone.getTimeZone().
type
The type of the dialog box. A modal dialog box blocks input (keyboard or mouse) to the window under the dialog ( fill out the dialog and press OK or CANCEL before you may do anything else in the page). A modeless dialog box does not block input to the window "under" the dialog.
Note: More than one modeless dialog box may be displayed at a time. If more than one modal dialog box is displayed at a time, the boxes stack on top of each other and only the top dialog is active.