newton.dave wrote:
>
> I'm not sure what you mean by "using the return
> value..." of the start() and end() methods.
>
> 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?
>
Well, It doesn't iterate (end method), what means "When there aren't any
objects left to iterate over it does some cleanup and
goes away." ???????
Thats my problem.
newton.dave wrote:
>
> 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.
>
Well, the answer is I am developing a tag that uses the S2 tag library for
make this, for example:
<jsongl:jsonarray name="array3" items="%{maquinas}" var="item">
<jsongl:jsonproperty value="%{codigo}"/>
</jsongl:jsonarray>
This would create a json object valueStack that hold the json array object
name "array3" this json object is create using the value stack of S2, in
this way I can create any json object using the object that are into the
valueStack context (and also can use the ognl).
the code generate is below:
<script type="text/javascript">
valueStack = {
array3 = ["m1", "m2"]
}
</script>
In this way I can access from javascript to any object in JSON way ;) that I
configure to using this tag, so
there is not limit to develop a component that use a LOT javascript and at
same time access to objects into the valueStack, with this the develop is
more simple (less code of S2 custom develop of component is needed).
--
View this message in context:
http://www.nabble.com/Problem-developing-a-tag-using-Struts-2-Arch-for-Tags-tf4939292.html#a14179127
Sent from the Struts - User mailing list archive at Nabble.com.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]