Thanks for your reply, I have checked out your nested:iterate and it looks very interesting. And for my problem, if you look in my jsp I have closed the iterate tag twice, this was why I was only printing out the last row of the resultSet and not all of them. Cheers!
<logic:iterate id="appInfoPick" name="appInfo" property="appInfoPicks"/> <--------this "/" shouldn't have been there. <tr> <% Object obj1 = getServletContext().getAttribute("appInfo"); System.out.println("IN iterate ------------1" + obj1.toString());%> <td align="left"> <bean:write name="appInfoPick" property="driverNumber" /> </td> </tr> </logic:iterate> On Saturday, January 12, 2002, at 11:15 PM, Arron wrote: > Wow, that's a lot of code there mate. :) > > I really do recommend using the nested extension for this. It's an > exact fit for what you're trying to do. > http://www.keyboardmonkey.com/strtus > > There's all the information you need to get running. Primer, tutorial > if you need it, and stuff for the future. > > To put it bluntly... original struts iterate tags using nested objects > is simply s--t. And to not use a nested bean creates s--t bean code. > The nested extension will fix all that for you, and you'll end up with > your JSP looking like this... > > Start JSP --==>> > <div align="center"> > <table cellspacing="1" cellpadding="10" border="1" bgcolor="#666699"> > <tr> > <th align="center"> <bean:message > key="heading.playerTeamPick.number"/> </th> > <th align="center"> <bean:message > key="heading.playerTeamPick.driver"/> </th> > <th align="center"> <bean:message > key="heading.playerTeamPick.qualification"/> </th> > <th align="center"> <bean:message > key="heading.playerTeamPick.cost"/> </th> > <th align="center"> <bean:message > key="heading.playerTeamPick.pick"/> </th> > </tr> > <nested:iterate property="appInfoPicks" /> > <tr> > <td align="left"> <bean:write property="driverNumber" /> </td> > <td align="left"> <bean:write property="driver" /> </td> > <td align="left"> <bean:write property="startingPosition" /> > </td> > <td align="left"> <bean:write property="driverPrice" /> </td> > </tr> > </nested:iterate> > </table> > </div> > <<==-- End JSP > > ...it could be just me, but I think that the short-and-sweet aspect of > such markup is truly compelling. And there's other things possible with > it beside this application alone. > > And don't worry, the Nested Extension's destiny is to be in Struts > itself, I'm just building up it's user base to get feedback and make it > stronger before the developers commit it to Struts itself. > > You have a good nesting model happening. You understand that part, and > that's the most important. > Give it a try and get back to the group with how it goes. > > > Arron. > > > > > Team Gasoline wrote: > >> Hi All -- >> >> >> The following iterate code only shows up as one row in my jsp. With >> the debug code I know that the arrayList is being populated with all >> the beans representing my resultSet. The row that appears seems to be >> the last row to be obtained. What is happening with the rest??? Thanks >> for your help! .... > > ... > >> With System.out.println I have verified that the list in AppInfo >> contains the 9 different AppInfoPick beans. If I replace the >> bean:write tags in the iterate with just text or just the name of the >> bean without the property attribute, I expect that iterate should >> iterate through all objects in the list or print the text in rows >> equal to the ArrayList.size(), which does not happen, but I do get >> that one row. Also if I add a scope attribute to the bean:write tags I >> receive one row of null that's all. >> >> >> Thanks again! > > > > -- > To unsubscribe, e-mail: <mailto:struts-user- > [EMAIL PROTECTED]> > For additional commands, e-mail: <mailto:struts-user- > [EMAIL PROTECTED]> > -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>