Class GetPropertyTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.sling.scripting.jsp.taglib.GetPropertyTag
-
- All Implemented Interfaces:
java.io.Serializable
,IterationTag
,JspTag
,Tag
public class GetPropertyTag extends TagSupport
Tag for retrieving a property from a ValueMap.- 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
Constructors Constructor Description GetPropertyTag()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
doEndTag()
Default processing of the end tag returning EVAL_PAGE.java.lang.Object
getDefaultValue()
Gets the default value to return if no value exists for the key.java.lang.String
getKey()
Gets key to retrieve the value from from the ValueMap.ValueMap
getProperties()
Gets the ValueMap from which to retrieve the value.java.lang.String
getReturnClass()
Gets the name of class into which to coerce the returned value.java.lang.String
getVar()
Gets the variable name to which to save the valuevoid
setDefaultValue(java.lang.Object defaultValue)
Sets the default value to return if no value exists for the key.void
setKey(java.lang.String key)
Sets the key to retrieve the value from from the ValueMap.void
setProperties(ValueMap properties)
Sets the ValueMap from which to retrieve the value.void
setReturnClass(java.lang.String returnClass)
Sets the name of class into which to coerce the returned value.void
setVar(java.lang.String var)
Sets the variable name to which to save the value.-
Methods inherited from class javax.servlet.jsp.tagext.TagSupport
doAfterBody, doStartTag, findAncestorWithClass, getId, getParent, getValue, getValues, release, removeValue, setId, setPageContext, setParent, setValue
-
-
-
-
Method Detail
-
doEndTag
public int doEndTag()
Description copied from class:TagSupport
Default processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTag
in interfaceTag
- Overrides:
doEndTag
in classTagSupport
- Returns:
- EVAL_PAGE
- See Also:
Tag.doEndTag()
-
getDefaultValue
public java.lang.Object getDefaultValue()
Gets the default value to return if no value exists for the key. If specified, this takes precedence over returnClass.- Returns:
- the default value
-
getKey
public java.lang.String getKey()
Gets key to retrieve the value from from the ValueMap.- Returns:
- the key
-
getProperties
public ValueMap getProperties()
Gets the ValueMap from which to retrieve the value.- Returns:
- the ValueMap of properties
-
getReturnClass
public java.lang.String getReturnClass()
Gets the name of class into which to coerce the returned value.- Returns:
- the class name
-
getVar
public java.lang.String getVar()
Gets the variable name to which to save the value- Returns:
- the variable name
-
setDefaultValue
public void setDefaultValue(java.lang.Object defaultValue)
Sets the default value to return if no value exists for the key. If specified, this takes precedence over returnClass.- Parameters:
defaultValue
- the default value
-
setKey
public void setKey(java.lang.String key)
Sets the key to retrieve the value from from the ValueMap.- Parameters:
key
- the key
-
setProperties
public void setProperties(ValueMap properties)
Sets the ValueMap from which to retrieve the value.- Parameters:
properties
- the ValueMap of properties
-
setReturnClass
public void setReturnClass(java.lang.String returnClass)
Sets the name of class into which to coerce the returned value.- Parameters:
returnClass
- the class name
-
setVar
public void setVar(java.lang.String var)
Sets the variable name to which to save the value.- Parameters:
var
- the variable name
-
-