You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Michael <mi...@idtect.com> on 2002/11/06 18:27:51 UTC

logic:iterate works but nested:iterate doesn't

The first iterate (using logic) works fine.  But the second (using
nested) gives me:

[ServletException in:/jsp/status/alarm_status.jsp] null' 

I'm not sure why it's not working.  I'm successfully using the nested
tags for iterating over a bean's property (that is a Collection).  But
in this case, I have a Collection in the request scope that I want to
iterate over.  Am I doing this correctly?

Example:

<jsp:useBean id="ALARMS" scope="request" type="java.util.Collection" />

<logic:iterate id="alarm" indexId="myIndex" name="ALARMS">
test
</logic:iterate>

<nested:iterate id="alarm" indexId="myIndex" name="ALARMS">
test
</nested:iterate>



--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>


RE: logic:iterate works but nested:iterate doesn't

Posted by Michael <mi...@idtect.com>.
I solved the problem with a hack work-a-round:  I made a java bean that
has one property (of type object).  I stick the Collection in that
object and then nest off that.  It works.  I don't know why the code
below doesn't work but at least I can keep working.

> -----Original Message-----
> From: Michael [mailto:michael@idtect.com] 
> Sent: mercredi 6 novembre 2002 18:28
> To: struts-user@jakarta.apache.org
> Subject: logic:iterate works but nested:iterate doesn't
> 
> 
> The first iterate (using logic) works fine.  But the second (using
> nested) gives me:
> 
> [ServletException in:/jsp/status/alarm_status.jsp] null' 
> 
> I'm not sure why it's not working.  I'm successfully using 
> the nested tags for iterating over a bean's property (that is 
> a Collection).  But in this case, I have a Collection in the 
> request scope that I want to iterate over.  Am I doing this correctly?
> 
> Example:
> 
> <jsp:useBean id="ALARMS" scope="request" 
> type="java.util.Collection" />
> 
> <logic:iterate id="alarm" indexId="myIndex" name="ALARMS">
> test
> </logic:iterate>
> 
> <nested:iterate id="alarm" indexId="myIndex" name="ALARMS"> 
> test </nested:iterate>
> 
> 
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-user-> unsubscribe@jakarta.apache.org>
> For 
> additional commands, 
> e-mail: <ma...@jakarta.apache.org>
> 


--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>