com.ora.jsp.tags.generic
Class GetLocalDateTag

java.lang.Object
  |
  +--javax.servlet.jsp.tagext.TagSupport
        |
        +--com.ora.jsp.tags.generic.GetLocalDateTag
All Implemented Interfaces:
java.io.Serializable, javax.servlet.jsp.tagext.Tag

public class GetLocalDateTag
extends javax.servlet.jsp.tagext.TagSupport

This class implements a custom action that inserts a date value, formatted according to the currently selected locale, in the response body. It uses the com.ora.jsp.beans.locale.LocaleBean.

Version:
1.0
Author:
Hans Bergsten, Gefion software
See Also:
Serialized Form

Field Summary
private  java.util.Date date
           
private  java.lang.String name
           
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext, parent, values
 
Fields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE
 
Constructor Summary
GetLocalDateTag()
           
 
Method Summary
 int doEndTag()
          Uses the LocaleBean, available in a scope as a variable specified by the "name" property, to format the date specified by the "date" property.
 void release()
          Releases all instance variables.
 void setDate(java.util.Date date)
          Sets the date value property.
 void setName(java.lang.String name)
          Sets the LocaleBean name property.
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

name

private java.lang.String name

date

private java.util.Date date
Constructor Detail

GetLocalDateTag

public GetLocalDateTag()
Method Detail

setName

public void setName(java.lang.String name)
Sets the LocaleBean name property.
Parameters:
name - the name of the LocaleBean

setDate

public void setDate(java.util.Date date)
Sets the date value property.
Parameters:
value - the numeric value

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Uses the LocaleBean, available in a scope as a variable specified by the "name" property, to format the date specified by the "date" property. The result is added to the response body.
Overrides:
doEndTag in class javax.servlet.jsp.tagext.TagSupport

release

public void release()
Releases all instance variables.
Overrides:
release in class javax.servlet.jsp.tagext.TagSupport