You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by Steve Vanspall <st...@crmsoftware.com.au> on 2003/03/07 01:33:50 UTC

logic:iterate tag revisited

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

having debugged, when struts puts the bea into pageContext, the id it tries
to pass is set to null.

Looking at the list of variables set at the time, there are two variables
named id one set to null and one set to 'imgFile'.

I figure this is where the problem lies,

Is there something wrong withmy coding?

Any help would be appreciated

Steve


---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: logic:iterate tag revisited

Posted by alexj <al...@freesurf.ch>.
I never had that case but you may have a look
at the
http://jakarta.apache.org/struts/api/org/apache/struts/upload/package-use.ht
ml
(never try)
--
Alexandre Jaquet

You can get the source code of this taglib on the wrox web site.
----- Original Message -----
From: "Steve Vanspall" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:alexj@freesurf.ch]
> 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" <st...@crmsoftware.com.au>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> 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:alexj@freesurf.ch]
> > 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" <st...@crmsoftware.com.au>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > 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:steve@crmsoftware.com.au]
> > > 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:maillist@reumann.net]
> > > 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: logic:iterate tag revisited

Posted by alexj <al...@freesurf.ch>.
a better page :
http://jakarta.apache.org/struts/faqs/actionForm.html

--
Alexandre Jaquet

----- Original Message -----
From: "Steve Vanspall" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:alexj@freesurf.ch]
> 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" <st...@crmsoftware.com.au>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> 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:alexj@freesurf.ch]
> > 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" <st...@crmsoftware.com.au>
> > To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> > 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:steve@crmsoftware.com.au]
> > > 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:maillist@reumann.net]
> > > 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> > >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: logic:iterate tag revisited

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
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:alexj@freesurf.ch]
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" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:alexj@freesurf.ch]
> 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" <st...@crmsoftware.com.au>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> 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:steve@crmsoftware.com.au]
> > 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:maillist@reumann.net]
> > 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: logic:iterate tag revisited

Posted by alexj <al...@freesurf.ch>.
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" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:alexj@freesurf.ch]
> 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" <st...@crmsoftware.com.au>
> To: "Struts Users Mailing List" <st...@jakarta.apache.org>
> 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:steve@crmsoftware.com.au]
> > 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:maillist@reumann.net]
> > 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: struts-user-help@jakarta.apache.org
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: logic:iterate tag revisited

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
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:alexj@freesurf.ch]
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" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:steve@crmsoftware.com.au]
> 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:maillist@reumann.net]
> 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: logic:iterate tag revisited

Posted by alexj <al...@freesurf.ch>.
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" <st...@crmsoftware.com.au>
To: "Struts Users Mailing List" <st...@jakarta.apache.org>
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:steve@crmsoftware.com.au]
> 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:maillist@reumann.net]
> 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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: struts-user-help@jakarta.apache.org
>



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: logic:iterate tag revisited

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
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:steve@crmsoftware.com.au]
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:maillist@reumann.net]
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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


RE: logic:iterate tag revisited

Posted by Steve Vanspall <st...@crmsoftware.com.au>.
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:maillist@reumann.net]
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" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Re: logic:iterate tag revisited

Posted by Rick Reumann <ma...@reumann.net>.
On Fri, 7 Mar 2003 11:33:50 +1100
"Steve Vanspall" <st...@crmsoftware.com.au> 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: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org


Search result page with logic:iterate

Posted by Renato Romano <r....@set-network.com>.
The <logic:iterate> tag has attributes "offset" and "length" that
defines the starting element and the maximum number of elements to
iterate; I'd like to use those attributes to display the "X results per
page" navigation style of a search, but i'm looking for an easy way to
dynamically generate those values, and also adding links for <previous>
and <next> page, or maybe (better) something like
<Previous> <1> <2> <3> ... <Next> like in search engine result pages...
I'm sure there something ready to do the work.
Thanks

Renato

____________________________________
Renato Romano
Sistemi e Telematica S.p.A.
Calata Grazie - Vial Al Molo Giano
16127 - GENOVA

e-mail: r.romano@set-network.com
Tel.:   010 2712603
_____________________________________



---------------------------------------------------------------------
To unsubscribe, e-mail: struts-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: struts-user-help@jakarta.apache.org