org.apache.commons.jelly.tags.fmt
Class FormatDateTag

java.lang.Object
  extended byorg.apache.commons.jelly.TagSupport
      extended byorg.apache.commons.jelly.tags.fmt.FormatDateTag
All Implemented Interfaces:
org.apache.commons.jelly.Tag

public class FormatDateTag
extends org.apache.commons.jelly.TagSupport

Support for tag handlers for <formatDate>, the date and time formatting tag in JSTL.

Version:
$Revision: 1.3 $
Author:
Willie Vu

Field Summary
private static java.lang.String DATE
           
private  org.apache.commons.jelly.expression.Expression dateStyle
          Holds value of property dataStyle.
private static java.lang.String DATETIME
           
private static java.lang.String DEFAULT
           
private  java.lang.String edateStyle
          Evaluated dateStyle
private  java.lang.String etimeStyle
          Evaluated timeStyle
private  java.lang.String etype
          Evaluated type
private static java.lang.String FULL
           
private static java.lang.String LONG
           
private static java.lang.String MEDIUM
           
private  org.apache.commons.jelly.expression.Expression pattern
          Holds value of property pattern.
private  java.lang.String scope
          Holds value of property scope.
private static java.lang.String SHORT
           
private static java.lang.String TIME
           
private  org.apache.commons.jelly.expression.Expression timeStyle
          Holds value of property timeStyle.
private  org.apache.commons.jelly.expression.Expression timeZone
          Holds value of property timeZone.
private  org.apache.commons.jelly.expression.Expression type
          Holds value of property type.
private  org.apache.commons.jelly.expression.Expression value
          Holds value of property value.
private  java.lang.String var
          Holds value of property var.
 
Fields inherited from class org.apache.commons.jelly.TagSupport
body, context, hasTrimmed, parent, shouldTrim
 
Constructor Summary
FormatDateTag()
          Creates a new instance of FormatDateTag
 
Method Summary
private  java.text.DateFormat createFormatter(java.util.Locale loc)
           
 void doTag(org.apache.commons.jelly.XMLOutput output)
          Evaluates this tag after all the tags properties have been initialized.
static int getStyle(java.lang.String style, java.lang.String errCode)
           
 void setDateStyle(org.apache.commons.jelly.expression.Expression dateStyle)
          Setter for property dataStyle.
 void setPattern(org.apache.commons.jelly.expression.Expression pattern)
          Setter for property pattern.
 void setScope(java.lang.String scope)
          Setter for property scope.
 void setTimeStyle(org.apache.commons.jelly.expression.Expression timeStyle)
          Setter for property timeStyle.
 void setTimeZone(org.apache.commons.jelly.expression.Expression timeZone)
          Setter for property timeZone.
 void setType(org.apache.commons.jelly.expression.Expression type)
          Setter for property type.
 void setValue(org.apache.commons.jelly.expression.Expression value)
          Setter for property value.
 void setVar(java.lang.String var)
          Setter for property var.
 
Methods inherited from class org.apache.commons.jelly.TagSupport
findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, findAncestorWithClass, getBody, getBodyText, getBodyText, getContext, getParent, invokeBody, isTrim, setBody, setContext, setParent, setTrim, trimBody
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DEFAULT

private static final java.lang.String DEFAULT
See Also:
Constant Field Values

SHORT

private static final java.lang.String SHORT
See Also:
Constant Field Values

MEDIUM

private static final java.lang.String MEDIUM
See Also:
Constant Field Values

LONG

private static final java.lang.String LONG
See Also:
Constant Field Values

FULL

private static final java.lang.String FULL
See Also:
Constant Field Values

DATE

private static final java.lang.String DATE
See Also:
Constant Field Values

TIME

private static final java.lang.String TIME
See Also:
Constant Field Values

DATETIME

private static final java.lang.String DATETIME
See Also:
Constant Field Values

value

private org.apache.commons.jelly.expression.Expression value
Holds value of property value.


type

private org.apache.commons.jelly.expression.Expression type
Holds value of property type.


dateStyle

private org.apache.commons.jelly.expression.Expression dateStyle
Holds value of property dataStyle.


timeStyle

private org.apache.commons.jelly.expression.Expression timeStyle
Holds value of property timeStyle.


pattern

private org.apache.commons.jelly.expression.Expression pattern
Holds value of property pattern.


timeZone

private org.apache.commons.jelly.expression.Expression timeZone
Holds value of property timeZone.


var

private java.lang.String var
Holds value of property var.


scope

private java.lang.String scope
Holds value of property scope.


etype

private java.lang.String etype
Evaluated type


edateStyle

private java.lang.String edateStyle
Evaluated dateStyle


etimeStyle

private java.lang.String etimeStyle
Evaluated timeStyle

Constructor Detail

FormatDateTag

public FormatDateTag()
Creates a new instance of FormatDateTag

Method Detail

doTag

public void doTag(org.apache.commons.jelly.XMLOutput output)
           throws org.apache.commons.jelly.JellyTagException
Evaluates this tag after all the tags properties have been initialized.

Throws:
org.apache.commons.jelly.JellyTagException

setValue

public void setValue(org.apache.commons.jelly.expression.Expression value)
Setter for property value.

Parameters:
value - New value of property value.

setType

public void setType(org.apache.commons.jelly.expression.Expression type)
Setter for property type.

Parameters:
type - New value of property type.

setDateStyle

public void setDateStyle(org.apache.commons.jelly.expression.Expression dateStyle)
Setter for property dataStyle.


setTimeStyle

public void setTimeStyle(org.apache.commons.jelly.expression.Expression timeStyle)
Setter for property timeStyle.

Parameters:
timeStyle - New value of property timeStyle.

setPattern

public void setPattern(org.apache.commons.jelly.expression.Expression pattern)
Setter for property pattern.

Parameters:
pattern - New value of property pattern.

setTimeZone

public void setTimeZone(org.apache.commons.jelly.expression.Expression timeZone)
Setter for property timeZone.

Parameters:
timeZone - New value of property timeZone.

setVar

public void setVar(java.lang.String var)
Setter for property var.

Parameters:
var - New value of property var.

setScope

public void setScope(java.lang.String scope)
Setter for property scope.

Parameters:
scope - New value of property scope.

createFormatter

private java.text.DateFormat createFormatter(java.util.Locale loc)
                                      throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException

getStyle

public static int getStyle(java.lang.String style,
                           java.lang.String errCode)
                    throws org.apache.commons.jelly.JellyTagException
Throws:
org.apache.commons.jelly.JellyTagException