Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

about EVAL_BODY_BUFFERED problem?

 
dx wu
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
which statement is true if the do Start Tag method returns EVAL_BODY_BUFFERED?
A.The tag handler must extend body Tag.
B.The do After Body method is NOT called.
C.The set Body Content method is called.
D.It is never legal to return EVAL_BODY_BUFFERED from do Start Tag.

Could someone help me? thanks in advance.
 
Kejal Shah
Ranch Hand
Posts: 87
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Is the answer A?
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yup only BodyTag can return eval_body_buffered.
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ans: A,C
if eval-body-buffered is called then setbodycontent(),doInitbody() r called before evaluating the body contents .
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
IFF there is a body only then the setBodyContent will be called. In this case, we can't guarantee that setBodyContent will be called even though we return EVAL_BODY_BUFFERED.
HFS p634.
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hey bhumika!!!if there is no body u should never return eval-body-buff from the doStartTag() (see pg.534)
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i guess only C is correct b'coz u need to extend bodytagsupport not bodytag
what r the answers u get dx wu??
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Deepa,

It says that if in tld we declare body-content to be empty then we must not return eval_body_include/buffered.

However, if body-content is not empty then we can return eval_body_include/buffered even if the body of our tag is empty.

Read the answer for that q carefully, its little complicated.
 
Deepa Korecherla
Ranch Hand
Posts: 197
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do agree!! but, hey! the thing in option A is not extend it should be implement or it can be extend btsupport not bt ...do u get it??
 
Bhumika Thakkar
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yup, true! It should implement BodyTag or extend BodyTagSupport.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic