Have you tried this?
<s:iterator value="#session.testArray">
Value of the arry is
<s:property />
<br>
</s:iterator>
tom tom wrote:
I did further investigation,
I think this is a bug, I think this is a very scary
bug.
You dont need three iterators, I could reproduce this
very easily,
In your action class have the following,
String[] testArray = new String[5];
testArray[0]="test0";
testArray[1]="test1";
testArray[2]="test2";
testArray[3]="test";
session.setAttribute("testArray",testArray);
In your jsp have the following
<s:iterator value="#session.testArray" id="testarr">
Value of the arry is
<s:property value="#testarr"/>
<br>
</s:iterator>
WHAT it prints is following Issue is for the 4th index
also it prints test, it should print empty
Value of the arry is test0
Value of the arry is test1
Value of the arry is test2
Value of the arry is test
Value of the arry is test
This is a scary behaviour for me,
Has anyone reported this bug, Any JIRA issue raised.
Thanks
--- Ian Roughley <[EMAIL PROTECTED]> wrote:
Take a look at the value stack via the debug tag.
Usually the property tag will keep stepping through
the value stack
until a getter for the property is found (the object
for the current
iteration is placed on the top of the value stack).
Although, if you
are explicitly defining the object (via id and
#test) there shouldn't be
a problem.
/Ian
tom tom wrote:
Hi,
I got three iterations which I tried as below in
the
jsp, First two and Array of certain DTO and last
iterator is a String array. There is no jsp
compilation error, but the issue is it produced
misleading results.
Is there any limitation in S2 for the depth of the
iteration. Is this way of using recommended?
Sometimes where it is suppose to print empty value
it
prints something else (looks like from the previous
iterator)
<s:iterator value="#session.ITER1" id="qnn">
....
....
<s:iterator value="#qnn.ITER2" id="qa">
....
....
<s:iterator value="#qa.ITER3" id="test">
<s:property value="#test" />
</s:iterator>
</s:iterator>
</s:iterator>
____________________________________________________________________________________
Park yourself in front of a world of choices in
alternative vehicles. Visit the Yahoo! Auto Green
Center.
http://autos.yahoo.com/green_center/
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail:
[EMAIL PROTECTED]
For additional commands, e-mail:
[EMAIL PROTECTED]
____________________________________________________________________________________
Sucker-punch spam with award-winning protection.
Try the free Yahoo! Mail Beta.
http://advision.webevents.yahoo.com/mailbeta/features_spam.html
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]