• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doAfterBody

 
Shiang Wang
Ranch Hand
Posts: 96
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Question

In which of the following cases will the method doAfterBody() of a tag handler be invoked?
A. This method will be called only when doStartTag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED
B. This method will be called if doAfterBody returns IterationTag.EVAL_BODY_AGAIN


This answer is B. I think A is correct too if the 'only' word is removed.
Right ?

Thanks
Shiang
 
Arut Jothi
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When doStartTag() returns BodyTag.EVAL_BODY_BUFFERD, setBodyContent() would be called and then doInitBody() would be called then finally doAfterBodyTag would be called.

So only answer B is correct.

Please refer HF book also for more info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic