Class GetPropertyTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.GetPropertyTag
- All Implemented Interfaces:
Serializable
,javax.servlet.jsp.tagext.IterationTag
,javax.servlet.jsp.tagext.JspTag
,javax.servlet.jsp.tagext.Tag
public class GetPropertyTag
extends javax.servlet.jsp.tagext.TagSupport
Tag for retrieving a property from a ValueMap.
- See Also:
-
Field Summary
Fields inherited from class javax.servlet.jsp.tagext.TagSupport
id, pageContext
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 -
Method Summary
Modifier and TypeMethodDescriptionint
doEndTag()
protected ClassLoader
Method for retrieving the classloader from the OSGi console.Gets the default value to return if no value exists for the key.getKey()
Gets key to retrieve the value from from the ValueMap.org.apache.sling.api.resource.ValueMap
Gets the ValueMap from which to retrieve the value.Gets the name of class into which to coerce the returned value.getVar()
Gets the variable name to which to save the valuevoid
setDefaultValue
(Object defaultValue) Sets the default value to return if no value exists for the key.void
Sets the key to retrieve the value from from the ValueMap.void
setProperties
(org.apache.sling.api.resource.ValueMap properties) Sets the ValueMap from which to retrieve the value.void
setReturnClass
(String returnClass) Sets the name of class into which to coerce the returned value.void
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
-
Constructor Details
-
GetPropertyTag
public GetPropertyTag()
-
-
Method Details
-
doEndTag
public int doEndTag()- Specified by:
doEndTag
in interfacejavax.servlet.jsp.tagext.Tag
- Overrides:
doEndTag
in classjavax.servlet.jsp.tagext.TagSupport
-
getClassLoader
Method for retrieving the classloader from the OSGi console.- Returns:
- the classloader
-
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
Gets key to retrieve the value from from the ValueMap.- Returns:
- the key
-
getProperties
public org.apache.sling.api.resource.ValueMap getProperties()Gets the ValueMap from which to retrieve the value.- Returns:
- the ValueMap of properties
-
getReturnClass
Gets the name of class into which to coerce the returned value.- Returns:
- the class name
-
getVar
Gets the variable name to which to save the value- Returns:
- the variable name
-
setDefaultValue
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
Sets the key to retrieve the value from from the ValueMap.- Parameters:
key
- the key
-
setProperties
public void setProperties(org.apache.sling.api.resource.ValueMap properties) Sets the ValueMap from which to retrieve the value.- Parameters:
properties
- the ValueMap of properties
-
setReturnClass
Sets the name of class into which to coerce the returned value.- Parameters:
returnClass
- the class name
-
setVar
Sets the variable name to which to save the value.- Parameters:
var
- the variable name
-