Hi again,

Took another look at your code - wondering why there are no setter/getters in
your Parameter.java?!!  Did I miss something?

You obviously need these for the set to work.  You still haven't posted your jsp
page to show what you are doing there, but if you have something like this:

      <logic:iterate id="parameter" name="ParametersForm"
property="parameterList">
            <html:text name="parameter" property="value" indexed="true"
onchange="validate(this, true)"/>
     </logic:iterate>

this will be translated by struts into a call
ParametersForm.getParameter(0).setValue(value).  So for *each* parameter
attribute you use on the page, you must have an appropriate getter/setter.

Cheers,

Dave





"L. Yeung" <[EMAIL PROTECTED]> on 11/01/2001 09:52:46
PM

Please respond to "Struts Users Mailing List"
      <[EMAIL PROTECTED]>

To:   Struts Users Mailing List
      <[EMAIL PROTECTED]>
cc:    (bcc: David Hay/Lex/Lexmark)
Subject:  RE: Setter method doesn't work with indexed tag



I use log4j for debugging purposes. My PO number and
other po header info do contain edited values, except
for the po details (a vector of param) which turned
out null even though there are values retrieved from
the database. I've been debugging this for about 2
days. I'm currently using request.getParameter() as a
temporary workaround.

Regards,
L. yeung
--- [EMAIL PROTECTED] wrote:
>
>
> Hi.  You didn't attach your jsp!
>
> How far have you got debugging it?  What shows up in
> the log?  What about in the
> request?
>
> Dave
>
>
>
>
>
> "L. Yeung"
> <[EMAIL PROTECTED]> on
> 10/30/2001 09:40:42
> PM
>
> Please respond to "Struts Users Mailing List"
>
>
<[EMAIL PROTECTED]>
>
> To:   Struts Users Mailing List
>
>
<[EMAIL PROTECTED]>
> cc:    (bcc: David Hay/Lex/Lexmark)
> Subject:  RE: Setter method doesn't work with
> indexed tag
>
>
>
> I jsut attached my code below.
>
> Regards,
> L. Yeung
> --- [EMAIL PROTECTED] wrote:
> >
> >
> > Hi,
> >
> > Can you maybe post some more code?
> >
> > It should work fine.  Usually it turns out to be a
> > tiny mistake somewhere.  Have
> > you debugged it at all?  What is getting added to
> > the request?  Are you using
> > your own code, or the example I posted?
> >
> > Cheers,
> >
> > Dave
> >
> >
> >
> >
> >
> > "L. Yeung"
> > <[EMAIL PROTECTED]> on
> > 10/29/2001 10:55:58
> > PM
> >
> > Please respond to "Struts Users Mailing List"
> >
> >
>
<[EMAIL PROTECTED]>
> >
> > To:   Struts Users Mailing List
> >
> >
>
<[EMAIL PROTECTED]>
> > cc:    (bcc: David Hay/Lex/Lexmark)
> > Subject:  RE: Setter method doesn't work with
> > indexed tag
> >
> >
> >
> > Still not working. Got any workaround for this?
> >
> > Regards,
> > L. Yeung
> >
> > --- "L. Yeung" <[EMAIL PROTECTED]> wrote:
> > > David, Yea I changed my struts-config from
> request
> > > to
> > > session . Still didn't work.
> > >
> > > Jason, I'm designing a web app for next january
> > > production release.
> > >
> > > --- Jason Chaffee <[EMAIL PROTECTED]>
> wrote:
> > > > Actually, I just filed a bug on this agains
> > > > BeanUtils.  There is a bug
> > > > when the indexed propery you are trying to set
> > is
> > > of
> > > > the type Array.
> > > >
> > > >
> > > >
> > > > -----Original Message-----
> > > > From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]
> > > > Sent: Monday, October 29, 2001 10:53 AM
> > > > To: Struts Users Mailing List
> > > > Subject: Re: Setter method doesn't work with
> > > indexed
> > > > tag
> > > >
> > > >
> > > >
> > > >
> > > > Hi.  Have you checked what scope your form
> bean
> > is
> > > > in?  Try changing it
> > > > to
> > > > session and see if that helps...
> > > >
> > > > Dave
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > "L. Yeung"
> > > > <[EMAIL PROTECTED]>
> on
> > > > 10/29/2001
> > > > 05:48:38
> > > > AM
> > > >
> > > > Please respond to "Struts Users Mailing List"
> > > >
> > > >
> > >
> >
>
<[EMAIL PROTECTED]>
> > > >
> > > > To:   Struts Users Mailing List
> > > >
> > > >
> > >
> >
>
<[EMAIL PROTECTED]>
> > > > cc:    (bcc: David Hay/Lex/Lexmark)
> > > > Subject:  Setter method doesn't work with
> > indexed
> > > > tag
> > > >
> > > >
> > > >
> > > > I've downloaded the sample from the achive and
> > > read
> > > > the posts on "setter methods and indexed tag"
> > but
> > > > find
> > > > it vague. I followed the sample and the getter
> > > > methods
> > > > works fine except the setter methods. I am
> > > expecting
> > > > the vector to contain values from the form but
> I
> > > got
> > > > null values instead.
> > > >
> > > > public final class EditPOForm extends
> ActionForm
> > {
> > > > ..
> > > >    public void setParameterList(Vector col) {
> > > >      this.parameterList = col;
> > > >    }
> > > >
> > > >     public Vector getParameterList() {
> > > >      return parameterList;
> > > >     }
> > > >
> > > >     public Parameter getParameter(int index) {
> > > >      return
> > > >
> > > > (Parameter)parameterList.elementAt(index);
> > > >     }
> > > > }
> > > >
> > > > Thanks in advance.
> > > > L. Yeung
> > > >
> > > >
> > __________________________________________________
> > > > Do You Yahoo!?
> > > > Make a great connection at Yahoo! Personals.
> > > > http://personals.yahoo.com
> > > >
> > > > --
> > > > To unsubscribe, e-mail:
> > > >
> > >
> >
> <mailto:[EMAIL PROTECTED]>
>
=== message truncated ===

> ATTACHMENT part 2 application/zip name=param.zip
>
>
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
>
>
>
>
>
> > --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>


__________________________________________________
Do You Yahoo!?
Find a job, post your resume.
http://careers.yahoo.com

.ZIP File



--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>





--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to