• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Query Related to Custom Tags

 
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 380
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Shivani
 
reply
    Bookmark Topic Watch Topic
  • New Topic