com.taggercat.tags
Class TCOutTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.AbstractExpEvalTag
          extended by com.taggercat.tags.TCOutTag
All Implemented Interfaces:
com.taggercat.el.ELPropertyResolver, java.io.Serializable, javax.servlet.jsp.tagext.IterationTag, javax.servlet.jsp.tagext.JspTag, javax.servlet.jsp.tagext.Tag, javax.servlet.jsp.tagext.TryCatchFinally

public class TCOutTag
extends AbstractExpEvalTag
implements javax.servlet.jsp.tagext.TryCatchFinally

This tag evaluates an expression and sends the result to the out stream. If a var (and optionally scope) attribute is set, then the result is also added as an attribute to that scope object. The default scope is page .
The tag also has a format attribute. If the format is specified, that formatter is applied to the result. The formatters are the Java format strings.
The expression evaluator defaults to displaying nulls as the string "(null)". If you want a different representation, set the nulls attribute.

See Also:
Serialized Form
 

Field Summary
 
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
TCOutTag()
           
 
Method Summary
 void doCatch(java.lang.Throwable t)
          Report the exception message directly where the output of the tag would have been.
 int doEndTag()
          Process the end tag.
 void doFinally()
           
 int doStartTag()
          Process the start tag for this instance.
 void setEscapeXml(boolean escapeXml)
          Sets false to not escape XML, default is true
 void setFormat(java.lang.String format)
          Sets the Format pattern for displaying the results.
 void setNulls(java.lang.String nulls)
          Sets the String for displaying null result values.
 void setTranslateAs(java.lang.String translateAs)
          Sets the String for translateAs attribute, this is only used by the DW Tagger.
 
Methods inherited from class com.taggercat.tags.AbstractExpEvalTag
getModel, resolveProperty, setScope, setValue, setVar
 
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TCOutTag

public TCOutTag()
Method Detail

doEndTag

public int doEndTag()
             throws javax.servlet.jsp.JspException
Process the end tag. This method will be called on all Tag objects. All instance state associated with this instance must be reset.

Specified by:
doEndTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doEndTag in class AbstractExpEvalTag
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Process the start tag for this instance. The doStartTag() method assumes that all setter methods have been invoked before. When this method is invoked, the body has not yet been invoked.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class AbstractExpEvalTag
Throws:
javax.servlet.jsp.JspTagException
javax.servlet.jsp.JspException
Returns:
EVAL_BODY_INCLUDE if the tag wants to process body, SKIP_BODY if it does not want to process it.

setFormat

public void setFormat(java.lang.String format)
Sets the Format pattern for displaying the results.

Parameters:
format - the format pattern value

setNulls

public void setNulls(java.lang.String nulls)
Sets the String for displaying null result values.

Parameters:
nulls - the string to use for nulls. The expression evaluator defaults to displaying nulls as the string "(null)".

setTranslateAs

public void setTranslateAs(java.lang.String translateAs)
Sets the String for translateAs attribute, this is only used by the DW Tagger.

Parameters:
translateAs - (not used).

setEscapeXml

public void setEscapeXml(boolean escapeXml)
Sets false to not escape XML, default is true

Parameters:
escapeXml - default is true

doCatch

public void doCatch(java.lang.Throwable t)
             throws java.lang.Throwable
Report the exception message directly where the output of the tag would have been.

Specified by:
doCatch in interface javax.servlet.jsp.tagext.TryCatchFinally
Throws:
java.lang.Throwable
Parameters:
t - the throwable to handle

doFinally

public void doFinally()
Specified by:
doFinally in interface javax.servlet.jsp.tagext.TryCatchFinally