Hate to answer my own question but I understand now - the

do
{
        out.write("...")
}while(__tag1.doAfterBody() == BodyTag.EVAL_BODY_TAG);

fills the buffer with the 'body' allowing me to process it - 'out' is used
as a buffer for the body!


Kevin

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Kevin Jones
Sent: 08 November 1999 14:56
To: Orion-Interest
Subject: Taglets (again)


I have some JSP that looks like this -

<simple:withBody id="betty">
        <BR>Some Text<BR>
</simple:withBody>

and the generated java looks like this

        // <simple:withBody id="betty"> start
                        __tag1.setParent(null);
                        __tag1.setId("betty");
                                __tempInt = __tag1.doStartTag();
                        if(__tempInt == BodyTag.EVAL_BODY_TAG)
                        {
                                out = pageContext.pushBody();
                                __tag1.setBodyContent((BodyContent)out);
                                __tag1.doInitBody();

                                do
                                {

                        out.write("\t<BR>Some Text<BR>\r\n");
                                }
                                while(__tag1.doAfterBody() == BodyTag.EVAL_BODY_TAG);
                                out = pageContext.popBody();
                        }
                        if(__tag1.doEndTag() == Tag.SKIP_PAGE) return;
        // <simple:withBody id="betty"> end

in doStartTag I return EVAL_BODY_TAG, and in doAfterBody I do nothing.

I would expect to see <BR>Some Text<BR> appear in the browser (from the
do...while loop above) but I get nothing (although this text is passed as
the BodyContent to my code).

Is this a bug?

Kevin Jones

Reply via email to