• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Query Related to Custom Tags

 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All
Please help me finding the solution of below mentioned mock test question:

In which of the following cases will the method doAfterBody() of a tag handler be invoked?
Select 1 correct option.

a This method will always be called when the body of the tag is not empty.

b This method will be called only when the body of the tag IS empty.

c This method will be called only when doStartTag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED.
Reason (As per mock test)Why this option is wrong: It'll also be called when doAfterBody() (ie. the same method) returns IterationTag.EVAL_BODY_AGAIN.

d. This method will be called if doAfterBody() returns IterationTag.EVAL_BODY_AGAIN.


Answer is option d
But as per my understanding option c is alos right.


Amit
 
Shivani Chandna
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, both c and d are right.

Rgds
 
Amit Tayal
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Shivani
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic