aspose file tools*
The moose likes Web Component Certification (SCWCD/OCPJWCD) and the fly likes doAfterBody Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Certification » Web Component Certification (SCWCD/OCPJWCD)
Bookmark "doAfterBody" Watch "doAfterBody" New topic
Author

doAfterBody

Shiang Wang
Ranch Hand

Joined: Jun 20, 2003
Posts: 96
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


SCBCD, SCWCD, SCJP
Arut Jothi
Greenhorn

Joined: Nov 11, 2004
Posts: 2
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.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: doAfterBody