Developing Web 2.0 applications
with JavaServerFaces
and Dreamweaver
>> Just Became Easier
Documentation
Search
  1. Introduction
  2. Getting Started
  3. Seam Concepts
  4. Seam Component Types
  5. Design View Support
  6. Code View Support
  7. Tag Object Toolbars
  8. Property Inspectors
  9. Seam Tag Reference
Seam Tag Library
  s:button
  s:cache
  s:conversationId
  s:conversationName
  s:conversationPropagation
  s:convertAtomicBoolean
  s:convertAtomicInteger
  s:convertAtomicLong
Selected s:convertDateTime
  s:convertEntity
  s:convertEnum
  s:decorate
  s:defaultAction
  s:div
  s:download
  s:enumItem
  s:fileUpload
  s:formattedText
  s:fragment
  s:graphicImage
  s:label
  s:link
  s:message
  s:remote
  s:resource
  s:selectItems
  s:selection
  s:span
  s:taskId
  s:token
  s:transformImageBlur
  s:transformImageSize
  s:transformImageType
  s:validate
  s:validateAll
  s:validateEquality
  s:validateFormattedText
If you like this documentation, please take a look at my book:

9. Seam Tag Reference

Documentation > Seam > Seam Tag Reference > Seam Tag Library > s:convertDateTime

s:convertDateTime

<p>The <s:convertDateTime> tag is useful for converting a date into a human-readable format and supports a range of formatting options. You can use this tag to control the style and appearance of a date on your JSF page. The ConvertDateTime tag applies to the date value of the component associated with the enclosing tag.</p>

Example

<h:outputText value="#{dateBean.today}">
  <s:convertDateTime dateStyle="full" type="both" />
</h:outputText>

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 "default", "short", "medium", "long", and "full". Default value is "default".
locale Text
 
The locale attribute sets the language, country, and variant for formatting locale-sensitive data such as numbers and dates. If not specified, the Locale returned by FacesContext.getViewRoot().getLocale() will be used. Valid expressions must evaluate to a java.util.Locale.
pattern Text
 
Custom formatting pattern which determines how the date/time string should be formatted and parsed.
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 "default".
timeZone Text
 
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 Text
 
Specifies what contents the string value will be formatted to include, or parsed expecting. Valid values are "date", "time", and "both". Default value is "date".