On Fri, 15 Feb 2002, Ben Pezzei wrote:

> how is it possible to evaluate the inner tag lib? i read through the
> docs (eg EVAL_BODY_INCLUDE etc), but i think it's more difficult to
> accomplish this, than it looks like.

As long as the body content for the outer tag (in the TLD) is "JSP", the
container will evaluate the inner tag (like any tag) when it comes to it.
This evaluation occurs whether you return EVAL_BODY_INCLUDE or
EVAL_BODY_BUFFERED from doStartTag() in the parent (outer) tag. The only
difference between "include" and "buffered" is whether the output gets
consumed by the outer tag or passed "through" it (either to another tag
or, logically, to the page itself).

For instance, suppose you have the text:

  <foo:one>
     one-<foo:two />-three
  </foo:one>

If "<foo:two />" prints the text "two", then the body content of <foo:one>
is equivalent to "one-two-three".  <foo:one> may buffer this content --
that is, receive it via a BodyContent object and interpret it (e.g., check
it against some value, trim it, make it uppercase, or whatever else it
wants to to) or it can simply pass it through.

--
Shawn Bayern
Author, "JSP Standard Tag Library"               http://www.jstlbook.com
(coming this spring from Manning Publications)


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to