If I am not mistaking you will use either the collection or the property attribute but not both. http://struts.apache.org/struts-taglib/tagreference-struts-logic.html#logic:iterate
For each iteration of the loop you should be able to compare the value of the id property in you logic:equal tag to the forms value by saying <logic:iterate id="tz" collection="timezones"> <logic:equal name="accountProfileForm" property="timeZone" value="${tz}"> //do something </logic:equal> </logic:iterate> Bryan LaPlante ---------- Original Message ----------- From: "Kalcevich, Daniel" <[EMAIL PROTECTED]> To: user@struts.apache.org Sent: Fri, 3 Mar 2006 12:21:18 -0800 Subject: Logic Tag Question > I have the following: > > - An ArrayList<LabelValueBean> in the ServletContext called > "timezones" > > - A Form Bean in the request scope called "accountProfileForm" > > I want to be able to loop through the values in the "timezones" > attribute and compate the "value" to the value of the "timeZone" in the > "accountProfileForm". Here is what I am trying: > > <logic:iterate id="timeZones" collection="timezones" property="value"> > > <logic:equal name="accountProfileForm" property="timeZone" > value="timeZones.value"> > > <bean:write name="timeZones" property="label"/> > > </logic:equal> > > </logic:iterate> > > I get the following error: > > 12:16:59,031 ERROR [action]:253 - Servlet.service() for servlet action > threw exception > > javax.servlet.jsp.JspException: ServletException in > '/jsp/templates/tab_content_template.jsp': ServletException in > '/jsp/account/account_profile_form.jsp': Cannot create iterator for this > collection > > at > org.apache.struts.taglib.tiles.InsertTag$InsertHandler.doEndTag(InsertTa > g.java:923) > > Can someone point me in the right direction or let me know what is wrong > with the above? Thanks. > > Daniel ------- End of Original Message ------- --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]