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]

Reply via email to