--- victor sosa <[EMAIL PROTECTED]> wrote:
> Yes, I did see the S2 iterator tag, I see that 
> there isn't any while or for into the code, I 
> suppose that the code repeat using the return 
> of the method. but How to uses it? I try twice 
> but the code never iterate using the return 
> value of the #start() and #end() method

I'm not sure what you mean by "using the return
value..." of the start() and end() methods.

Start() and end() return booleans indicating whether
or not the tag should "continue" its operations. The
start() method is what creates the iterator (and saves
it for future reference). It then checks if there are
objects to iterate over, if it does, it pushes the
"next" (in this case, the first) object onto the
stack.

End() does the same thing; this is where (AFAICT) the
bulk of the iteration is done. When there aren't any
objects left to iterate over it does some cleanup and
goes away.

What in particular isn't clicking for you?

This aside, I'm not sure why you're creating a JSON
object like this. There are several JSON libraries
already available for both Java and JavaScript that
will create JSON representation via a single method
call.

d.


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

Reply via email to