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

some doubts in HFSJ :: Custom Tags

 
Shiraz Khan
Ranch Hand
Posts: 51
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HFSJ : Page 563
Q. 9 Option C is said to invalid "because it directs the body of the tag to a buffer which this tag does not process"

If a class extends BodyTagSupport and the doStartTag returns EVAL_BODY BUFFERED, then normal flow goes thru :
doStartTag -> setBodyContent -> doInitBody -> EvaluateBody -> doAfterBody ->
In this normal flow why the body is not going to be evaluated ??

Q. 10 Option E is said consdered correct, ignoring the case when a tag with empty body is invoked !!!

HFSJ : Page 564
Q. 12 the explaining for option D incorrect is "fragmant is invoked by the doTag implememtation , NOT before the doTag is called"
It is however clear from the simple tag lifecycle that setJspBody is invoked before doTag which invokes(sets) the JspFragment ???
 
Ash More'
Ranch Hand
Posts: 47
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
9)doStartTag -> setBodyContent -> doInitBody -> EvaluateBody -> doAfterBody ->

in this the step EvaluateBody means "Evaluate the Body contents but buffer the output(i.e just buffer, but not displayed)"

10)Note that the correct answer starts with "Assuming no exception occurs".

12)well the explanation given is true, setJspBody does not invoke the body fragment, it just makes the body available to the tag for processing, the doTag method invokes the fragment using Fragment.invoke(null)method.

See the book SCWCD exam study kit, the chapters on custom tags are quite nicely explained with lots of examples.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic