Class GetParentTag
java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.GetParentTag
- All Implemented Interfaces:
Serializable,IterationTag,JspTag,Tag
Tag for retrieving a parent resource based on the absolute parent level
- See Also:
-
Field Summary
Fields inherited from interface javax.servlet.jsp.tagext.IterationTag
EVAL_BODY_AGAINFields inherited from interface javax.servlet.jsp.tagext.Tag
EVAL_BODY_INCLUDE, EVAL_PAGE, SKIP_BODY, SKIP_PAGE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintdoEndTag()Default processing of the end tag returning EVAL_PAGE.getLevel()Get the level of the parent resource to retrieve.Gets the resource.getVar()Gets the variable name to which to save the list of children.voidSet the level of the parent resource to retrieve.voidsetResource(Resource resource) Sets the resource.voidSets 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
-
Constructor Details
-
GetParentTag
public GetParentTag()
-
-
Method Details
-
doEndTag
public int doEndTag()Description copied from class:TagSupportDefault processing of the end tag returning EVAL_PAGE.- Specified by:
doEndTagin interfaceTag- Overrides:
doEndTagin classTagSupport- Returns:
- EVAL_PAGE
- See Also:
-
getResource
Gets the resource.- Returns:
- the resource
-
getLevel
Get the level of the parent resource to retrieve.- Returns:
- the level
-
getVar
Gets the variable name to which to save the list of children.- Returns:
- the variable name
-
setResource
Sets the resource.- Parameters:
resource- the new resource
-
setLevel
Set the level of the parent resource to retrieve.- Parameters:
level- the level
-
setVar
Sets the variable name to which to save the parent resource.- Parameters:
var- the variable name
-