Class SetSupport
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- javax.servlet.jsp.tagext.BodyTagSupport
-
- org.apache.taglibs.standard.tag.common.core.SetSupport
-
- All Implemented Interfaces:
java.io.Serializable
,javax.servlet.jsp.tagext.BodyTag
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public abstract class SetSupport extends javax.servlet.jsp.tagext.BodyTagSupport
Support for handlers of the <set> tag.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
SetSupport()
Constructs a new handler.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private java.lang.Object
convertToExpectedType(java.lang.Object value, java.lang.reflect.Method m)
Convert an object to an expected type of the method parameter according to the conversion rules of the Expression Language.int
doEndTag()
protected abstract java.lang.String
evalProperty()
Evaluate the property attribute.protected abstract java.lang.Object
evalTarget()
Evaluate the target attribute.protected abstract java.lang.Object
evalValue()
Evaluate the value attribute.(package private) void
exportToBeanProperty(java.lang.Object target, java.lang.String property, java.lang.Object result)
Export the result into a bean property.(package private) void
exportToMapProperty(java.lang.Object target, java.lang.String property, java.lang.Object result)
Export the result into a Map.(package private) void
exportToVariable(java.lang.Object result)
Export the result into a scoped variable.protected javax.el.ExpressionFactory
getExpressionFactory()
(package private) java.lang.Object
getResult()
protected abstract boolean
isValueSpecified()
Indicates that the value attribute was specified.void
release()
void
setScope(java.lang.String scope)
Scope for var.void
setVar(java.lang.String var)
Name of the exported scoped variable to hold the value specified in the action.-
Methods inherited from class javax.servlet.jsp.tagext.BodyTagSupport
doAfterBody, doInitBody, doStartTag, getBodyContent, getPreviousOut, setBodyContent
-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
findAncestorWithClass, getId, getParent, getValue, getValues, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
release
public void release()
- Specified by:
release
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
release
in classjavax.servlet.jsp.tagext.BodyTagSupport
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException
- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.BodyTagSupport
- Throws:
javax.servlet.jsp.JspException
-
getResult
java.lang.Object getResult() throws javax.servlet.jsp.JspException
- Throws:
javax.servlet.jsp.JspException
-
isValueSpecified
protected abstract boolean isValueSpecified()
Indicates that the value attribute was specified. If no value attribute is supplied then the value is taken from the tag's body content.- Returns:
- true if the value attribute was specified
-
evalValue
protected abstract java.lang.Object evalValue() throws javax.servlet.jsp.JspException
Evaluate the value attribute.- Returns:
- the result of evaluating the value attribute
- Throws:
javax.servlet.jsp.JspException
- if there was a problem evaluating the expression
-
evalTarget
protected abstract java.lang.Object evalTarget() throws javax.servlet.jsp.JspException
Evaluate the target attribute.- Returns:
- the result of evaluating the target attribute
- Throws:
javax.servlet.jsp.JspException
- if there was a problem evaluating the expression
-
evalProperty
protected abstract java.lang.String evalProperty() throws javax.servlet.jsp.JspException
Evaluate the property attribute.- Returns:
- the result of evaluating the property attribute
- Throws:
javax.servlet.jsp.JspException
- if there was a problem evaluating the expression
-
exportToVariable
void exportToVariable(java.lang.Object result) throws javax.servlet.jsp.JspTagException
Export the result into a scoped variable.- Parameters:
result
- the value to export- Throws:
javax.servlet.jsp.JspTagException
- if there was a problem exporting the result
-
exportToMapProperty
void exportToMapProperty(java.lang.Object target, java.lang.String property, java.lang.Object result)
Export the result into a Map.- Parameters:
target
- the Map to export intoproperty
- the key to export intoresult
- the value to export
-
exportToBeanProperty
void exportToBeanProperty(java.lang.Object target, java.lang.String property, java.lang.Object result) throws javax.servlet.jsp.JspTagException
Export the result into a bean property.- Parameters:
target
- the bean to export intoproperty
- the bean property to setresult
- the value to export- Throws:
javax.servlet.jsp.JspTagException
- if there was a problem exporting the result
-
convertToExpectedType
private java.lang.Object convertToExpectedType(java.lang.Object value, java.lang.reflect.Method m) throws javax.el.ELException
Convert an object to an expected type of the method parameter according to the conversion rules of the Expression Language.- Parameters:
value
- the value to convertm
- the setter method- Returns:
- value converted to an instance of the expected type; will be null if value was null
- Throws:
javax.el.ELException
- if there was a problem coercing the value
-
getExpressionFactory
protected javax.el.ExpressionFactory getExpressionFactory()
-
setVar
public void setVar(java.lang.String var)
Name of the exported scoped variable to hold the value specified in the action. The type of the scoped variable is whatever type the value expression evaluates to.- Parameters:
var
- name of the exported scoped variable
-
setScope
public void setScope(java.lang.String scope)
Scope for var. Values are verified by TLV.- Parameters:
scope
- the variable scope
-
-