Troy Bull wrote:
I have a situation here. I have an ArrayList of DTO objects in session.
<%
ArrayList rows = (ArrayList) session.getAttribute("rows");
if (rows != null) {
Iterator i = rows.iterator();
while (i.hasNext())
{
NibuSrchVLocalDTO debug = (NibuSrchVLocalDTO)i.next();
out.println("Name: " + debug.getFullName() + "<BR>");
}
}
%>
This code here (scriptlet above this line) works perfectly but
<logic:present name="rows" scope="session">
<logic:iterate id="row" scope="session"
collection="rows">Hi</logic:iterate>
</logic:present>
1) Use JSTL.
2) The logic tag doesn't automagically grab stuff from scopes like JSTL
does.
3) So, if you're dead-set on not using JSTL, either:
a) Use the EL version of the struts lib (or if you're on a JSP 2.0
server) and say collection="${rows}"
b) Do that bean definition stuff (sorry, don't have time to provide
reference right now)
I'd go for the JSTL, though.
Hmm, I'm looking at this and being deep in a Lisp project right now I
might be remembering COMPLETELY incorrectly, so hopefully somebody more
awake and smart will jump in. Sorry.
Dave
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]