Java Mailing List Archive

http://www.junlu.com/

Home » Home (12/2007) » Struts 2 »

How to print values using nested:iterate tag

Mad Shop

2007-08-09


I have following scenario.
 
    I have getExSummary() method in exForm which returns a arraylist
of A object. How to use logic:iterate tag to print all the values
which methods in A object.
getACount(),getBCount() are methods in A object.
 
   I tried following tag, which is not working. Please suggest me
the correct nested:iterate tag.
 <table>
<nested:notEmpty name ="exForm" property="exSummary">
<nested:iterate name ="exForm" property="exSummary" id="e" indexId="edx">
<tr>
<td>
<nested:write property="aCount" />
</td>
<td>
<nested:write property="bCount" />
</td>
</tr>
</nested:iterate>
</nested:notEmpty>
</table>
 
Error which I am getting
 
<Aug 9, 2007 3:52:43 PM IST> <Error> <HTTP> <BEA-101020>
<[weblogic.servlet.inte
rnal.WebAppServletContext@(protected)',
context-path: '/
eem'] Servlet failed with Exception
java.lang.NullPointerException
    at weblogic.logging.commons.LogImpl.doLog(LogImpl.java:95)
    at weblogic.logging.commons.LogImpl.debug(LogImpl.java:59)
    at weblogic.logging.commons.LogImpl.debug(LogImpl.java:55)
    at
org.apache.struts.taglib.TagUtils.message (TagUtils.java:1036)
    at org.apache.struts.taglib.TagUtils.message (TagUtils.java:999)
    Truncated. see log file for complete stacktrace
>

   
---------------------------------
Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.
©2008 junlu.com - Jax Systems, LLC, U.S.A.