Developing Web 2.0 applications
with JavaServerFaces
and Dreamweaver
>> Just Became Easier
Documentation
Search
  1. Introduction
  2. Getting Started
  3. Trinidad Concepts
  4. Code View Support
  5. Design View Support
  6. Tag Object Toolbars
  7. Trinidad Server Behaviors
  8. Trinidad Property Inspectors
  9. Trinidad Tag Reference
Trinidad Core Tag Library
  tr:attribute
  tr:breadCrumbs
  tr:chart
  tr:chooseColor
  tr:chooseDate
  tr:column
  tr:commandButton
  tr:commandLink
  tr:commandNavigationItem
  tr:componentDef
  tr:componentRef
  tr:convertColor
Selected tr:convertDateTime
  tr:convertNumber
  tr:document
  tr:facetRef
  tr:forEach
  tr:form
  tr:goButton
  tr:goLink
  tr:group
  tr:icon
  tr:image
  tr:importScript
  tr:inputColor
  tr:inputDate
  tr:inputFile
  tr:inputHidden
  tr:inputListOfValues
  tr:inputNumberSpinbox
  tr:inputText
  tr:iterator
  tr:legend
  tr:media
  tr:message
  tr:messages
  tr:navigationPane
  tr:navigationTree
  tr:outputDocument
  tr:outputFormatted
  tr:outputLabel
  tr:outputText
  tr:page
  tr:panelAccordion
  tr:panelBorderLayout
  tr:panelBox
  tr:panelButtonBar
  tr:panelChoice
  tr:panelFormLayout
  tr:panelGroupLayout
  tr:panelHeader
  tr:panelHorizontalLayout
  tr:panelLabelAndMessage
  tr:panelList
  tr:panelPage
  tr:panelPageHeader
  tr:panelPartialRoot
  tr:panelRadio
  tr:panelSideBar
  tr:panelTabbed
  tr:panelTip
  tr:poll
  tr:processChoiceBar
  tr:progressIndicator
  tr:resetActionListener
  tr:resetButton
  tr:returnActionListener
  tr:selectBooleanCheckbox
  tr:selectBooleanRadio
  tr:selectItem
  tr:selectManyCheckbox
  tr:selectManyListbox
  tr:selectManyShuttle
  tr:selectOneChoice
  tr:selectOneListbox
  tr:selectOneRadio
  tr:selectOrderShuttle
  tr:selectRangeChoiceBar
  tr:separator
  tr:setActionListener
  tr:showDetail
  tr:showDetailHeader
  tr:showDetailItem
  tr:singleStepButtonBar
  tr:spacer
  tr:subform
  tr:switcher
  tr:table
  tr:train
  tr:tree
  tr:treeTable
  tr:validateByteLength
  tr:validateDateRestriction
  tr:validateDateTimeRange
  tr:validateDoubleRange
  tr:validateLength
  tr:validateLongRange
  tr:validateRegExp
  tr:validator
If you like this documentation, please take a look at my book:

9. Trinidad Core Tag Reference

Documentation > Trinidad > Trinidad Tag Reference > Trinidad Core Tag Library > tr:convertDateTime

tr:convertDateTime

<p>The <tr:convertDateTime> tag is used to convert a string to java.util.Date object and back to a string based on pattern or date and time styles.</p>

Example

<tr:convertDateTime> </tr:convertDateTime> 

HTML Output

(No output.)

Tag Attributes

dateStyle Text
 
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". Valid values are "shortish", "short", "default", "medium", "long", and "full". Default value is "shortish".
id Text
 
the identifier for the component
locale Text
 
Locale whose predefined styles for dates and times are used during formatting or parsing. If not specified or if null, the Locale returned by FacesContext.getViewRoot().getLocale() will be used.
messageDetailConvertBoth Text
 
Custom error message to be used, for creating detail part of faces message, for date-time based value that cannot be converted to date when type is set to 'both' and pattern is not set or is null. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li><li> {2} an example of the format the converter is expecting </li></ul>
messageDetailConvertDate Text
 
Custom error message to be used, for creating detail part of faces message, for values that cannot be converted to date when the pattern / secondary pattern is set or when type is set to 'date' and pattern is not set or is null. </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li><li> {2} an example of the format the converter is expecting </li></ul>
messageDetailConvertTime Text
 
Custom error message to be used, for creating detail part of faces message, for time based value that cannot be converted to date when type is set to 'time', pattern is not set or is null </p> <p> Parameters:<ul><li> {0} the label that identifies the component </li><li> {1} value entered by the user </li><li> {2} an example of the format the converter is expecting </li></ul>
pattern Text
 
Custom formatting pattern which determines how the date/time string should be formatted and parsed.
secondaryPattern Text
 
Second pattern, which will be used as a second attempt to parse a string if the primary pattern or styles fail, but is never used for formatting strings.
timeStyle Text
 
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". Valid values are "default", "short", "medium", "long", and "full". Default value is "short".
timeZone Text
 
Time zone in which to interpret any time information in the date string. If not set here, picks this value from trinidad-config.xml configuration file. If not defined there, then it is defaulted to GMT.
type Text
 
Specifies what contents the string value will be formatted to include, or parsed. Valid values are "date", "time", and "both". Default value is "date".