Class GetParentTag
- java.lang.Object
-
- javax.servlet.jsp.tagext.TagSupport
-
- org.apache.sling.scripting.jsp.taglib.GetParentTag
-
- All Implemented Interfaces:
java.io.Serializable
,IterationTag
,JspTag
,Tag
public class GetParentTag extends TagSupport
Tag for retrieving a parent resource based on the absolute parent level- 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 GetParentTag()
-
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.String
getLevel()
Get the level of the parent resource to retrieve.Resource
getResource()
Gets the resource.java.lang.String
getVar()
Gets the variable name to which to save the list of children.void
setLevel(java.lang.String level)
Set the level of the parent resource to retrieve.void
setResource(Resource resource)
Sets the resource.void
setVar(java.lang.String var)
Sets the variable name to which to save the parent resource.-
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()
-
getResource
public Resource getResource()
Gets the resource.- Returns:
- the resource
-
getLevel
public java.lang.String getLevel()
Get the level of the parent resource to retrieve.- Returns:
- the level
-
getVar
public java.lang.String getVar()
Gets the variable name to which to save the list of children.- Returns:
- the variable name
-
setResource
public void setResource(Resource resource)
Sets the resource.- Parameters:
resource
- the new resource
-
setLevel
public void setLevel(java.lang.String level)
Set the level of the parent resource to retrieve.- Parameters:
level
- the level
-
setVar
public void setVar(java.lang.String var)
Sets the variable name to which to save the parent resource.- Parameters:
var
- the variable name
-
-