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.BodyTagSupportSupport for handlers of the <set> tag.
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedSetSupport()Constructs a new handler.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description private java.lang.ObjectconvertToExpectedType(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.intdoEndTag()protected abstract java.lang.StringevalProperty()Evaluate the property attribute.protected abstract java.lang.ObjectevalTarget()Evaluate the target attribute.protected abstract java.lang.ObjectevalValue()Evaluate the value attribute.(package private) voidexportToBeanProperty(java.lang.Object target, java.lang.String property, java.lang.Object result)Export the result into a bean property.(package private) voidexportToMapProperty(java.lang.Object target, java.lang.String property, java.lang.Object result)Export the result into a Map.(package private) voidexportToVariable(java.lang.Object result)Export the result into a scoped variable.protected javax.el.ExpressionFactorygetExpressionFactory()(package private) java.lang.ObjectgetResult()protected abstract booleanisValueSpecified()Indicates that the value attribute was specified.voidrelease()voidsetScope(java.lang.String scope)Scope for var.voidsetVar(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:
releasein interfacejavax.servlet.jsp.tagext.Tag- Overrides:
releasein classjavax.servlet.jsp.tagext.BodyTagSupport
-
doEndTag
public int doEndTag() throws javax.servlet.jsp.JspException- Specified by:
doEndTagin interfacejavax.servlet.jsp.tagext.Tag- Overrides:
doEndTagin 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.JspExceptionEvaluate 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.JspExceptionEvaluate 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.JspExceptionEvaluate 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.JspTagExceptionExport 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.JspTagExceptionExport 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.ELExceptionConvert 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
-
-