[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 195
  • Last Modified:

Regarding custom tags

what is difference between getParent() method and findAncestorWithClass() method in custom tags?and what is a ancestor?
0
PrakashVarma
Asked:
PrakashVarma
  • 3
1 Solution
 
chaitu chaituCommented:
0
 
chaitu chaituCommented:
0
 
dhruvpratapCommented:
findAncestorWithClass()
Searches up the parent hierarchy for a Tag of the given type and returns the tag of the given type or null if it could not be found. It does not necessarily return the immediate parent it returns the most accurate match up the hierarchy.

getParent()
Returns the immediate parent of this tag.

Reference : http://commons.apache.org/jelly/apidocs/org/apache/commons/jelly/TagSupport.html#getParent()

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now