This week's book giveaway is in the Java 9 forum.
We're giving away four copies of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications and have Sander Mak & Paul Bakker on-line!
See this thread for details.
Win a copy of Java 9 Modularity: Patterns and Practices for Developing Maintainable Applications this week in the Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Regarding Classic Custom Tags  RSS feed

 
Karne Reddy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The Question is from Enthuware

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.


d This method will be called only when doEndTag() returns Tag.EVAL_BODY_INCLUDE or BodyTag.EVAL_BODY_BUFFERED.


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



My answer is C . But he has given E as answer.
 
cheenu Dev
Ranch Hand
Posts: 276
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
certainly only the IterationTag has the constants defined...

Note: in Tag there is no constants...

Complain me if i am wrong
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This was actually discussed quite recently in another thread:

http://www.coderanch.com/t/172145/java-Web-Component-SCWCD/certification/One-Tag

Can I suggest in future a quick search of the forum first, before posting? It will save you time if the answer is already lying around!
 
Karne Reddy
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thnx Charles

My doubt is rectified.
 
Yi Yuan
Greenhorn
Posts: 22
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think the correct answer E.
 
Charles Lyons
Author
Ranch Hand
Posts: 836
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please continue discussion (if necessary) in the other thread:

http://www.coderanch.com/t/172145/java-Web-Component-SCWCD/certification/One-Tag
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!