Ok making some headway here, I have my logic:iterate tag working, but it doesn't do what I want it to
this is my code <logic:iterate name="RenderHTMLForm" type="com.crm.util.TemplateBeans.IMGTemplateBean" property="imageFieldsList" id="imgFile"> <tr> <td align="right"><bean:write name="imgFile" property="description"/></td> <td align="left"><html:file name="imgFile" property="file" accept="image/gif,image/jpeg"/></td> </tr> <script> cnt++; </script> </logic:iterate> now I want this to populate the original field it got the value from, when I submit the form. I can see why this won't do it, but can't work out if struts has a way of doing it for me Is there a way to get struts to iterate through a list, and then re iterate through thelist and make the necessary changes, by populating the IMGTemplateBean with the apporopriate formFile information Regards Steve -----Original Message----- From: Steve Vanspall [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2003 12:42 PM To: Struts Users Mailing List Subject: RE: logic:iterate tag revisited Ahhhhh it's always the small thing, I can't beleive I missed that Thank you, I will procedd to kick myself several times Steve -----Original Message----- From: Rick Reumann [mailto:[EMAIL PROTECTED] Sent: Friday, 7 March 2003 11:51 AM To: Struts Users Mailing List Subject: Re: logic:iterate tag revisited On Fri, 7 Mar 2003 11:33:50 +1100 "Steve Vanspall" <[EMAIL PROTECTED]> wrote: > Hi there > > Here's my problem, I have modelled my iterate tag on a working example > I was given by a colleague. > > this is my jsp code > > <logic:iterate name="RenderHTMLForm" > type="com.crm.util.TemplateBeans.IMGTemplateBean" > property="imageFieldsList" id="imfFile"> > <tr> > <td align="right"><bean:write name="imfFile" > property="id"/></td><td align="left"><html:file name="imgFile" > property="file" > accept="image/gif,image/jpeg"/></td> > </tr> > <script>nameArray[cnt] = > '<%=TemplateBeans.IMG_TMPLT%>:<bean:write > name="imfFile" property="id"/>'; > cnt++; > </script> > </logic:iterate> > > > when I run it I get > > javax.servlet.jsp.JspException: Cannot find bean imfFile in any scope are you sure it's not saying "imgFile" is not any scope??? If you look you named one of them imgFile and the other imfFile but I don't see where you ever declared the id imgFile ? Is imgFile declared somewhere else? Also, are you positive your list has IMGTemplateBeans in it? If you remove all the <tr></tr> stuff and just print out "test<BR>" in there do you get a bunch of "test"s printed out? Are you also positive that your imageFieldsList is being populated with the type "com.crm.util.TemplateBeans.IMGTemplateBean" You sure nothing is spelled wrong there..etc. ? I know a lot of this is probably obvious but it's always the obvious that gets me:) A mistyped letter or something. -- Rick Reumann --------------------------------------------------------------------- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]