Can you tell how to use EL code. Am kind of newbie to Struts and and not much aware of EL tags. But my containier is only JSP 1.2 Also I am using struts 1.1
-----Original Message----- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Saturday, October 16, 2004 7:57 PM To: Struts Users Mailing List Subject: Re: logic:iterate and table display Vijay Vishvas Dharap wrote the following on 10/15/2004 9:41 PM: > Hi all, > > I have following scenario.. > I have FormBean which has getter and setter for my VO object > > In VO I have a list of another VO. > > Now on this form I want to display the contents of the list using > logic.iterate tags. > > I will make matter simpler saying... > > aFormBean has aVO which as list of bVO. bVO has attributes like xAttr, > yAttr, zAttr. > > now aForm should show on the page table where contents of list of bVO > will be giving one one row of the table. You can do this with struts logic and bean:write,I'm used to JSTL so here it is... <c:forEach items="${yourFormName.aVo.bVOlist}" var="bVOitem"> <c:out value='${bVOitem.xAttr}'/> <%-- or JSP2.0 just ${bVOitem.xAttr} --%> <c:out value='${bVOitem.yAttr}'/> </c:forEach> with logic iterate within your <html:form> tags (I 'think' this is right?) //use the EL struts tags if not using JSP2.0 Container <logic:iterate property="aVo.bVOlist" id="bVOitem"> <bean:write name="bVOitem" property="xAttr"/> <bean:write name="bVOitem" property="yAttr"/> </logic:iterate> Obviously you would surround the above with table tags etc. Or you could also use the display tag (search google or archives) that will do this for you. -- Rick --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]