You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Emi Lu <em...@encs.concordia.ca> on 2010/01/19 17:45:59 UTC
s:iterator did not return result?
Good morning,
I have a problem of running the example:
http://www.vaannila.com/struts-2/struts-2-example/struts-2-iterator-tag-example1.html
JSP is:
<table>
<TR class="even">
<TD> <B>Title </B></TD> <TD> <B>Genre </B></TD>
</TR>
<s:iterator value="songs" status="songStatus">
<tr class="<s:if test="#songStatus.odd ==
true">odd</s:if><s:else>even</s:else>">
<td><s:property value="title" /></td>
<td><s:property value="genre" /></td>
</tr>
</s:iterator>
</table>
View sources, only see:
<table>
<TR class="even">
<TD> <B>Title </B></TD>
<TD> <B>Genre </B></TD>
</TR>
</table>
Codes under iterator did not return? Could someone help?
Thanks a lot!
--
Lu Ying
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: s:iterator did not return result?
Posted by Emi Lu <em...@encs.concordia.ca>.
> I have a problem of running the example:
> http://www.vaannila.com/struts-2/struts-2-example/struts-2-iterator-tag-example1.html
>
>
> JSP is:
> <table>
> <TR class="even">
> <TD> <B>Title </B></TD> <TD> <B>Genre </B></TD>
> </TR>
>
> <s:iterator value="songs" status="songStatus">
> <tr class="<s:if test="#songStatus.odd ==
> true">odd</s:if><s:else>even</s:else>">
> <td><s:property value="title" /></td>
> <td><s:property value="genre" /></td>
> </tr>
> </s:iterator>
> </table>
>
>
> View sources, only see:
> <table>
> <TR class="even">
> <TD> <B>Title </B></TD>
> <TD> <B>Genre </B></TD>
> </TR>
> </table>
>
>
> Codes under iterator did not return? Could someone help?
All right, find the reason:
http://www.vaannila.com/struts-2/struts-2-example/struts-2-control-tags-example1.html
static ArrayList does not work. Updated to non-static. The codes work
correctly then.
--
Lu Ying
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org