Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

findAncestorWithClass

 
Renu Radhika
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The method TagSupport.findAncestorWithClass() can be used...

The answer to this is Any type of tag (Tag, IterationTag, BodyTag)

But I thought the answer will be only for tags extending Tag Support.
The hint they have given is as follows




Remember these two points
#1. Any type of tag (Tag, IterationTag, BodyTag) can be nested within another.
#2. The method findAncestorWithClass() is a static method defined in TagSupport class provided for convenience:
public static final Tag findAncestorWithClass(Tag from, java.lang.Class klass);

Thus, it is not necessary to implement the BodyTag interface or extend from the TagSupport or the BodyTagSupport classes to use this method.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic