Class GetParentTag

java.lang.Object
javax.servlet.jsp.tagext.TagSupport
org.apache.sling.scripting.jsp.taglib.GetParentTag
All Implemented Interfaces:
Serializable, IterationTag, JspTag, Tag

public class GetParentTag extends TagSupport
Tag for retrieving a parent resource based on the absolute parent level
See Also:
  • Constructor Details

    • GetParentTag

      public GetParentTag()
  • Method Details

    • doEndTag

      public int doEndTag()
      Description copied from class: TagSupport
      Default processing of the end tag returning EVAL_PAGE.
      Specified by:
      doEndTag in interface Tag
      Overrides:
      doEndTag in class TagSupport
      Returns:
      EVAL_PAGE
      See Also:
    • getResource

      public Resource getResource()
      Gets the resource.
      Returns:
      the resource
    • getLevel

      public String getLevel()
      Get the level of the parent resource to retrieve.
      Returns:
      the level
    • getVar

      public 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(String level)
      Set the level of the parent resource to retrieve.
      Parameters:
      level - the level
    • setVar

      public void setVar(String var)
      Sets the variable name to which to save the parent resource.
      Parameters:
      var - the variable name