From: Santos, P. <pet...@cs...> - 2004-01-08 19:46:09
|
Hi, I'm very new to Struts, so I apologize ahead if I'm not explaining = myself correctly. I'm trying to extend the examples in the book "Struts in Action". = Specifically the FindByLast() class in that artimus1.1 app. My problem is that I have a "results.jsp" page that is suppose to = display the results of a database query=09 and it's not displaying anything, but it's not erroring either. I = believe I have a collection "LIST" in my request scope since=20 I can make the property size change if I change the number of rows in = my query, I just can't seem to get at the data. Here are the key players. =09 - forums.ForumBean; - this is a simple bean that extends = ProcessBeanBase with getter methods getForum() and setForum(); - forums.ShowForums; - extends ForumBean and wraps the collection = returned by my Database Access class. - scaffold.ProcessAction - says it puts the Collection in my request = scope. I've looked all over for help on this, and it's now the 3rd week that = I've been stuck on this. Any help is deeply appreciated. Thanks. Peter. =20 =20 Here is a snippet from "results.jsp". = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D <TD colspan=3D2>Rows found =3D(<bean:write name=3D"LIST" = property=3D"size"/>)</TD> // this correctly returns "Rows found = =3D(2)"=20 =09 then i have ... <logic:iterate name=3D"LIST" property=3D"iterator" id=3D"row"> <% i++;%> <TR> <TD>(<%=3Di%>)<bean:write name=3D"row"/> </TD> = <TD>(<%=3Di%>)<bean:write name=3D"row" property=3D"forum"/></TD></TR> </logic:iterate> I get the following results = =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D <TR> <TD>(1)forums.ShowForums@da1515</TD> <TD>(1)</TD></TR> <TR> <TD>(2)forums.ShowForums@19e3e24</TD> <TD>(2)</TD></TR> =09 =09 |