Win a copy of Java 9 Revealed this week in the Features new in Java 9 forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

possible value of doAfterBody  RSS feed

 
Radmika Arunachalam
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Somewhere i read doAfterBody can return EVAL_BODY_BUFFERED if implemented BodyTag.. Even i have flow chart with me but i dont know how to copy here... but in HFSJ and few other places it is given only SKIP_BODY and EVAL_BODY_AGAIN? Which one is correct?

Thanks
Radmika
 
Narendra Dhande
Ranch Hand
Posts: 951
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There are only two return type for doAfterBody method SKIP_BODY , EVAL_BODY_AGAIN. ( Actually there are three, but one EVAL_BODY_TAG is deprecated).

The sole purpose of EVAL_BODY_BUFFERED is to activate the mechanism to run the setBodyContent and doInitBody method if required. In the Life cycle these methods are above the doAfterBody method. Also these methods run only one time in the tag invocation. So I think the EVAL_BODY_BUFFERED is not appropriate return type for doAfterBody method.

Hope it help you.

Thanks
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!