com.taggercat.tags
Class AbstractExpEvalTag

java.lang.Object
  extended by javax.servlet.jsp.tagext.TagSupport
      extended by com.taggercat.tags.AbstractExpEvalTag
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
Direct Known Subclasses:
AbstractDataSourceActionTag, AbstractHTMLInputTag, DataSourceOptionListTag, DataSourceTag, ExceptionTag, HQLOptionListTag, PageNavigationTag, RepeatedRegionTag, TCIfTag, TCOutTag, TCSetTag, TCWhenTag

public abstract class AbstractExpEvalTag
extends javax.servlet.jsp.tagext.TagSupport
implements com.taggercat.el.ELPropertyResolver

This is the super class for tags that evaluate expressions.

See Also:
ELParser, 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
AbstractExpEvalTag()
           
 
Method Summary
 int doEndTag()
          Process the end tag.
 int doStartTag()
          Initialized the expression evaluator to be used for this tag.
 Model getModel()
          Gets the model object associated with this page's session.
 java.lang.Object resolveProperty(java.lang.String name, com.taggercat.el.ELContext elcontext)
          This is the call back method registered with the expression evaluator.
 void setScope(java.lang.String scope)
          Sets the scope the attribute will be saved under.
 void setValue(java.lang.String expression)
          Sets the Expression attribute of the Tag.
 void setVar(java.lang.String varName)
          Sets the attribute name the results will be saved under.
 
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

AbstractExpEvalTag

public AbstractExpEvalTag()
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 javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException
Returns:
EVAL_PAGE

doStartTag

public int doStartTag()
               throws javax.servlet.jsp.JspException
Initialized the expression evaluator to be used for this tag.

Specified by:
doStartTag in interface javax.servlet.jsp.tagext.Tag
Overrides:
doStartTag in class javax.servlet.jsp.tagext.TagSupport
Throws:
javax.servlet.jsp.JspException
Returns:
SKIP_BODY

getModel

public Model getModel()
Gets the model object associated with this page's session.

Returns:
the current model object

resolveProperty

public java.lang.Object resolveProperty(java.lang.String name,
                                        com.taggercat.el.ELContext elcontext)
                                 throws java.lang.IllegalArgumentException
This is the call back method registered with the expression evaluator. The evaluator calls this method for all terms of the expression that have dot delimited name.
The dot delimited name is assumed to be of the form dsn.field or that of a scope prefixed variable:
Where the prefix name is one of:
Examples:
 customer.Name
 request.orderDate
 session.user
 page.isValid
 
The attribute on the scope variables may have been added with the TCSet, TCOut etc. tags or with any other means.

Specified by:
resolveProperty in interface com.taggercat.el.ELPropertyResolver
Throws:
java.lang.IllegalArgumentException
Parameters:
name - the dot delimited name of the term to resolve, eg, customer.Name
elcontext - the el context values
Returns:
the object representing the named value

setScope

public void setScope(java.lang.String scope)
Sets the scope the attribute will be saved under.

Parameters:
scope - sets the scope attribute of the tag The scope can be one of:

  • page - default if not specified
  • session
  • request
  • application

setValue

public void setValue(java.lang.String expression)
Sets the Expression attribute of the Tag.

Parameters:
expression - The expression to be evaluated

setVar

public void setVar(java.lang.String varName)
Sets the attribute name the results will be saved under.

Parameters:
varName - the name in the 'var' attribute of the tag