So as it works now, do you have

public int setValue(int index, String value)
   and
public int setValues(ArrayList values)

or do you have

public int setValues(int index, String value)
  and
public int setValues(ArrayList values)

?  My theory is that the introspection will croak utterly if you have two
methods called setValue() even if they take different arguments.

Also, why are you returning values from a "setXxxx" method?  Shouldn't they
be void methods?

----- Original Message -----
From: "Robert Leland" <[EMAIL PROTECTED]>
To: "Struts Users Mailing List" <[EMAIL PROTECTED]>
Sent: Monday, February 24, 2003 1:31 PM
Subject: Re: [OT] (Slightly OT) Accessing individual array elements (was Re:
<html:select> "multiple" problems)
> If I have in a Form
> class AForm extends ActionForm {
>
>    ArrayList values;
>
>    public int getValue(int index) {
>       return value.get(index);
>    }
>    public int setValue(int index,String value) {
>       return value.set(index,value);
>    }
>    //-- This also could have been getValueList(), just be consistent.
>    ArrayList getValues() {
>     return values;
>    }
>    void setValues(ArrayList values) {
>     this.values = values;
>    }
> }
>
> I had an ActionForm just 2 days ago that had
> ArrayList getValue();int getValue(int index), void setValue(int index,
> String value)
>
> It had worked for over a year, but really wasn't a
> valid bean, because of the ArrayList items.
> However with the latest version of beanutils,
> the int setValue(int index,String value) method couldn't be found.
>
> I guess that beanutils tightened up on their introspection,
> and once ArrayList getValue() was renamed, everything worked again.
>
>
> -Rob
>
>
>
> ---------------------------------------------------------------------
> 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