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

Custom Tags

 
Sophie Angela
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In case of custom tags,while calling the getParent() method can we use super.getParent().?

If yes how it is different from this.getParent();
 
Ali Gohar
Ranch Hand
Posts: 572
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
getParent() will be available if you are extending your tag through TagSupport or BodyTagSupport classes whereas if you are trying to implement Tag/Iteration/BodyTag then you'll have to override getParent() method in your tag handler.

In case of TagSupport/BodyTagSupport, same java rule will apply i.e. you can call super.getParent() because these classes provide their implementation for this method. Whereas you can override the method in your tag handler and thus can call through this.getParent().

Hope it helps
 
Sophie Angela
Ranch Hand
Posts: 46
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic