Re: [jsp]: getProperty

From: Ryan Stewart (zzanNOtozz_at_gSPAMo.com)
Date: 12/26/04


Date: Sun, 26 Dec 2004 12:28:50 -0600


"Marcus Reiter" <donotSPAMME@microsoft.com> wrote in message
news:cqmv36$h62$02$1@news.t-online.com...
> 10 should not get converted to a Vector.
>
Obviously, but that's what you've told it to do because the variable
"vectorName" is of type Vector.

> The thing is the vector I want first of all needs to get builded -
> and the method that builds that vector needs an integer value.
>
> look, that's the method it should connect to:
>
> public void setVectorName(int attribute) {
> this.vectorName= dbConnection .getBeanList(attribute);
> }
>
> so it should take that int value, send it to a method in another class and
> this method
> should return a vector, that then gets saved in my bean.
>
The name of the method declares that it's a setter for property vectorName.
You've used it as something else.

> I guess that might not be the best idea, yet it's the only idea I had so
> far...
>
What about a different method like setType or setAttribute, where type or
attribute or whatever you want to call it is an int?