Nicholas Lesiecki wrote:
> 
> Jari,
> 
> There's nothing wrong with using endXXX, either way is valid. Using
> pushBody() just saves a method. It may also give some finer control, for
> instance you could inspect the bodyContent object after each iteration of a
> tag. 

like it. and of course, if you've set up some objects on the server to
test the tag, then it's probably easier to do assertXXX tests rather
than relying on string comparisons after the output has gone over the
wire - especially for loops as you say.

>popBody won't write the content out to the endXXX though, for that you
> need to use:
> 
> bodyContent.writeOut(bodyContent.getEnclosingWriter());

ok.

> 
> So in a way it's trickier, but if you *don't* need and endXXX method, its a
> *little* quicker.

> 
> P.S. I'm jsut impressed with myself that I found this fly trick, it doesn't
> mean its actually a good one! :)
>

I like it - it's a nice way of "cheating" to do a test server side.

Jari
--
Jari Worsley
Senior Programmer
Hyperlink Interactive Ltd

Reply via email to