struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ben" <bewalt...@tiscalinet.ch>
Subject notEmpty/empty and interation
Date Mon, 07 Jul 2003 14:05:15 GMT
Hi,

Using struts1.1 I have problems getting the iterate tag working.
the page scoped id bean for the element is never found. This happens when
the collection is empty or contains values.

Help is greatly appreciated.

Details:

I store a Collection under "oss_prod_list" in my session, with the following
jsp snippet:

<logic:empty name="oss_prod_list">
No products available.
</logic:empty>
<!-- @TODO: notEmpty tag does not work for some reason -->
<logic:notEmpty name="oss_prod_list">

<logic:iterate name="oss_prod_list" id="prod_list_el">
<td>
<bean:write name="prod_list_el" property="name" />
...
</logic:iterate>
</logic:notEmpty>


I get the empty as well as the not empty printed out when the collection is
empty or not. When i remove the content between the iterate tag my jsp
works, when not I get always (when collection is empty or not) the exception
that the id bean specified as iteration element is not found:

root cause

javax.servlet.ServletException: Cannot find bean prod_list_el in any scope
	at
org.apache.jasper.runtime.PageContextImpl.handlePageException(PageContextImp
l.java:530)







---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Mime
View raw message