a better page : http://jakarta.apache.org/struts/faqs/actionForm.html
-- Alexandre Jaquet ----- Original Message ----- From: "Steve Vanspall" <[EMAIL PROTECTED]> To: "Struts Users Mailing List" <[EMAIL PROTECTED]> Sent: Friday, March 07, 2003 4:49 AM Subject: RE: logic:iterate tag revisited > Yeah that's col, I figured I would have to do that. that's the way I > originally was going to do it, > > This then leads me to my next question, which was in the p.s. of my previous > post, > > how does struts create a formfile for upload form the path entered by the > user. > > My problem is, there could be any number of image files needing uploading, > depending on the strutcture of the template they are going into. > > Hence, I can't just have a fixed number of FormFile fields in my form. > > So when the user submits the file details, I want to be able to upload that > file to the server, then process it from there. > > How do I do that. > > There isn't much info about uploading a dynamic number of files to the serve > using struts. > > Steve > > -----Original Message----- > From: alexj [mailto:[EMAIL PROTECTED] > Sent: Friday, 7 March 2003 2:34 PM > To: Struts Users Mailing List > Subject: Re: logic:iterate tag revisited > > > Yep struts cannot simply act as you wanna do. > > Before you can update your files path or everything else > you will need to tell an action : > > "Hey retrieve all the kinds of datas on a whole collection > I will made some change on it" > > First you got an view page who juste iterate your collection. > and have a tag just as you say to will store some variables > in your request. > > But one trouble I see is you are not in a windows like program, > where you can just made some appropriate change and then > pass it to whatever you want. > > If you wanna do your job, before you can send to an appropriate > action, you will need to hit it by a client side programming. > > I'm not sure if you understand what I mean. > -- > Alexandre Jaquet > > > > ----- Original Message ----- > From: "Steve Vanspall" <[EMAIL PROTECTED]> > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > Sent: Friday, March 07, 2003 4:16 AM > Subject: RE: logic:iterate tag revisited > > > > ok this is the full story > > > > The value come from the form, the IMGTemplateFields object are in an > > ArrayList chich is stored in the 'imageFieldsList' field of my > > RenderHTMLForm > > > > I want to have struts iterate through that list. For wach occurence of an > > IMGTemplateBean I want to make a tag that will allow the user to enter the > > path of a file for upload. > > > > this will go into the 'file' field of the corresponding IMGTemplateBean. > > > > Now my problem is, when I submit the form, using the code mentioned in my > > previous message, it does not update the IMGTemplateBeans that the 'file' > > fields relate to. > > > > Not sure if I am trying to do something that struts can't do, or if I am > > just doing it wrong > > > > Regards > > > > Steve > > > > P.S. Alternatively how to I create a FormFile, with inputstream etc. from > a > > string giving me the path of a file on the clients machine. > > > > > > > > > > > > -----Original Message----- > > From: alexj [mailto:[EMAIL PROTECTED] > > Sent: Friday, 7 March 2003 2:07 PM > > To: Struts Users Mailing List > > Subject: Re: logic:iterate tag revisited > > > > > > I can't understand why you need to re-iterate . > > > > Do you need to do some update on a view page ? > > > > If yes you will need to have an action defined for > > that, then you will be redirect on an another page > > or update your change on a session scope (for > > example) > > > > From where the original value came ? The default > > value you define on your based ActionForm ? > > > > -- > > Alexandre Jaquet > > > > ----- Original Message ----- > > From: "Steve Vanspall" <[EMAIL PROTECTED]> > > To: "Struts Users Mailing List" <[EMAIL PROTECTED]> > > Sent: Friday, March 07, 2003 4:01 AM > > Subject: RE: logic:iterate tag revisited > > > > > > > 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] > > > > > > > > > > > --------------------------------------------------------------------- > > 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] > > > > --------------------------------------------------------------------- > 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]