org.ujac.web.tag
Class EvalTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by javax.servlet.jsp.tagext.BodyTagSupport
          extended by org.ujac.web.tag.EvalTag
All Implemented Interfaces:
Serializable, BodyTag, IterationTag, Tag

public class EvalTag
extends BodyTagSupport

Name: EvalTag
Description: Evaluates the tags body using the expression interpreter.

Author:
lauerc
See Also:
Serialized Form

Field Summary
protected  String bean
          The bean to access (for convenience).
protected  boolean customFormat
          Tells, whether a ustom format has been defined or not.
protected  String dateFormat
          The date format.
protected  String doubleFormat
          The double format.
protected  String integerFormat
          The integer format.
protected  String timeFormat
          The time format.
protected  String timestampFormat
          The timestamp format.
 
Fields inherited from class javax.servlet.jsp.tagext.BodyTagSupport
bodyContent
 
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
 
Fields inherited from interface javax.servlet.jsp.tagext.BodyTag
EVAL_BODY_BUFFERED, EVAL_BODY_TAG
 
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
EvalTag()
           
 
Method Summary
 int doAfterBody()
           
 int doEndTag()
           
 void doInitBody()
           
 int doStartTag()
           
 Object getBeanInstance()
          Gets the bean instance according to the bean attribute.
 FormatHelper getFormatHelper()
          Getter method for the the property formatHelper.
protected  Locale getLocale()
          Gets the locale from the HTTP request.
 Map getProperties()
          Getter method for the the property properties.
 TemplateInterpreter getTemplateInterpreter()
          Getter method for the the property templateInterpreter.
 void release()
           
 void setBean(String bean)
          Sets the bean name to access.
 void setDateFormat(String format)
          Sets the format for printing Date values.
 void setDoubleFormat(String format)
          Sets the format for printing double values.
 void setFormatHelper(FormatHelper formatHelper)
          Setter method for the the property formatHelper.
 void setIntegerFormat(String format)
          Sets the format for printing integer values.
 void setTemplateInterpreter(TemplateInterpreter interpreter)
          Setter method for the the property templateInterpreter.
 void setTimeFormat(String format)
          Sets the format for printing Time values.
 void setTimestampFormat(String format)
          Sets the format for printing Timestamp values.
 
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
getBodyContent, getPreviousOut, setBodyContent
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
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
 
Methods inherited from interface javax.servlet.jsp.tagext.Tag
getParent, setPageContext, setParent
 

Field Detail

bean

protected String bean
The bean to access (for convenience).


customFormat

protected boolean customFormat
Tells, whether a ustom format has been defined or not.


integerFormat

protected String integerFormat
The integer format.


doubleFormat

protected String doubleFormat
The double format.


dateFormat

protected String dateFormat
The date format.


timeFormat

protected String timeFormat
The time format.


timestampFormat

protected String timestampFormat
The timestamp format.

Constructor Detail

EvalTag

public EvalTag()
Method Detail

setBean

public void setBean(String bean)
Sets the bean name to access. This optional attribute allows shorter expressions

Parameters:
bean - The name of the default bean.

setIntegerFormat

public void setIntegerFormat(String format)
Sets the format for printing integer values.

Parameters:
format - The format string to set.

setDoubleFormat

public void setDoubleFormat(String format)
Sets the format for printing double values.

Parameters:
format - The format string to set.

setDateFormat

public void setDateFormat(String format)
Sets the format for printing Date values.

Parameters:
format - The format string to set.

setTimeFormat

public void setTimeFormat(String format)
Sets the format for printing Time values.

Parameters:
format - The format string to set.

setTimestampFormat

public void setTimestampFormat(String format)
Sets the format for printing Timestamp values.

Parameters:
format - The format string to set.

getTemplateInterpreter

public TemplateInterpreter getTemplateInterpreter()
Getter method for the the property templateInterpreter.

Returns:
The current value of property templateInterpreter.

setTemplateInterpreter

public void setTemplateInterpreter(TemplateInterpreter interpreter)
Setter method for the the property templateInterpreter.

Parameters:
interpreter - The value to set for the property templateInterpreter.

getFormatHelper

public FormatHelper getFormatHelper()
Getter method for the the property formatHelper.

Returns:
The current value of property formatHelper.

setFormatHelper

public void setFormatHelper(FormatHelper formatHelper)
Setter method for the the property formatHelper.

Parameters:
formatHelper - The value to set for the property formatHelper.

getProperties

public Map getProperties()
Getter method for the the property properties.

Returns:
The current value of property properties.

getBeanInstance

public Object getBeanInstance()
Gets the bean instance according to the bean attribute.

Returns:
The value of bean property from the properties map.

doStartTag

public int doStartTag()
               throws JspException
Specified by:
doStartTag in interface Tag
Overrides:
doStartTag in class BodyTagSupport
Throws:
JspException
See Also:
Tag.doStartTag()

doInitBody

public void doInitBody()
                throws JspException
Specified by:
doInitBody in interface BodyTag
Overrides:
doInitBody in class BodyTagSupport
Throws:
JspException
See Also:
BodyTag.doInitBody()

doAfterBody

public int doAfterBody()
                throws JspException
Specified by:
doAfterBody in interface IterationTag
Overrides:
doAfterBody in class BodyTagSupport
Throws:
JspException
See Also:
IterationTag.doAfterBody()

doEndTag

public int doEndTag()
             throws JspException
Specified by:
doEndTag in interface Tag
Overrides:
doEndTag in class BodyTagSupport
Throws:
JspException
See Also:
Tag.doEndTag()

release

public void release()
Specified by:
release in interface Tag
Overrides:
release in class BodyTagSupport
See Also:
Tag.release()

getLocale

protected Locale getLocale()
Gets the locale from the HTTP request.

Returns:
The user agent's locale.


Copyright © 2003-2004 UJAC.org. All Rights Reserved.