This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

findAncestorWithClass() Problem

 
Mohit G Gupta
Ranch Hand
Posts: 634
Chrome Eclipse IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I am unable to understand how


functions.


could somebody provide an example that explains the working of findAncestorWithClass ?
 
Piyush Joshi
Ranch Hand
Posts: 207
Eclipse IDE Firefox Browser jQuery
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Its a static method in SimpleTagSupport class.

You must have read the JavaDocs for this method.

For understanding how it works, here is the source code from Tomcat implementation:


Read the code above, its pretty straightforward to see how it has been implemented (see the for loop above).

I think now you can write an example yourself. Isn't it?
 
Don't get me started about those stupid light bulbs.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic