com.cc.framework.taglib.convert
Class ConvertDateTimeTag

java.lang.Object
  extended byjavax.servlet.jsp.tagext.TagSupport
      extended bycom.cc.framework.taglib.convert.ConverterTag
          extended bycom.cc.framework.taglib.convert.ConvertDateTimeTag
All Implemented Interfaces:
InnerTag, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class ConvertDateTimeTag
extends ConverterTag
implements InnerTag

Complex DateTime Converter as used in the JSF Specification

Version:
$Revision$
Author:
Harald Schulz
See Also:
Serialized Form

Field Summary
private  java.lang.String dateStyle
           
private  java.lang.String locale
           
private  java.lang.String pattern
           
private static long serialVersionUID
          Serial Version UID
private  java.lang.String timeStyle
           
private  java.lang.String timeZone
           
private  java.lang.String type
           
 
Fields inherited from class com.cc.framework.taglib.convert.ConverterTag
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAIN
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
ConvertDateTimeTag()
          Constructor
 
Method Summary
 Converter doCreateConverter()
          Template method is called to create the concrete Converter instance
private  void init()
          Initializes all internal members
 void release()
           
 void setDateStyle(java.lang.String dateStyle)
          Predefined formatting style which determines how the date component of a date string is to be formatted and parsed.
 void setLocale(java.lang.String locale)
          Locale whose predefined styles for dates and times are used during formatting or parsing.
 void setPattern(java.lang.String pattern)
          Custom formatting pattern which determines how the date/time string should be formatted and parsed.
 void setTimeStyle(java.lang.String timeStyle)
          Predefined formatting style which determines how the time component of a date string is to be formatted and parsed.
 void setTimeZone(java.lang.String timeZone)
          Time zone in which to interpret any time information in the date String.
 void setType(java.lang.String type)
          Specifies what contents the string value will be formatted to include, or parsed expecting.
 
Methods inherited from class com.cc.framework.taglib.convert.ConverterTag
doStartTag, setConverterId
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doEndTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

serialVersionUID

private static final long serialVersionUID
Serial Version UID

See Also:
Constant Field Values

dateStyle

private java.lang.String dateStyle

locale

private java.lang.String locale

pattern

private java.lang.String pattern

timeStyle

private java.lang.String timeStyle

timeZone

private java.lang.String timeZone

type

private java.lang.String type
Constructor Detail

ConvertDateTimeTag

public ConvertDateTimeTag()
Constructor

Method Detail

release

public void release()
Specified by:
release in interface javax.servlet.jsp.tagext.Tag
Overrides:
release in class ConverterTag
See Also:
Tag.release()

init

private void init()
Initializes all internal members


doCreateConverter

public Converter doCreateConverter()
                            throws ConverterException
Description copied from class: ConverterTag
Template method is called to create the concrete Converter instance

Overrides:
doCreateConverter in class ConverterTag
Returns:
Converter instance
Throws:
ConverterException - If an error occurred while creating the Converter
See Also:
ConverterTag.doCreateConverter()

setDateStyle

public void setDateStyle(java.lang.String 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". Valid values are "default", "short", "medium", "long", and "full". Default value is "default".

Parameters:
dateStyle - the Date Style

setLocale

public void setLocale(java.lang.String 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() will be used. Value must be either a VB expression that evaluates to a java.util.Locale instance, or a String that is valid to pass as the first argument to the constructor java.util.Locale(String language, String country). The empty string is passed as the second argument.

Parameters:
locale - the locale id

setPattern

public void setPattern(java.lang.String pattern)
Custom formatting pattern which determines how the date/time string should be formatted and parsed.

Parameters:
pattern -

setTimeStyle

public void setTimeStyle(java.lang.String 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". Valid values are "default", "short", "medium", "long", and "full". Default value is "default".

Parameters:
timeStyle - the time style

setTimeZone

public void setTimeZone(java.lang.String 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.TimeVone instance, or a String that is a timezone ID as described in the javadocs for java.util.TimeZone.getTimeZone().

Parameters:
timeZone - the time zone

setType

public void setType(java.lang.String type)
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".

Parameters:
type - the type


Copyright © 2000-2005 SCC Informationssysteme GmbH. All Rights Reserved.