Erik and Frank,
Thanks. I would consider your suggestions.
Ola.
--- "Frank W. Zammetti (MLists)"
<[EMAIL PROTECTED]> wrote:
> Erik's answer is what I would call the correct
> one... That being said, if
> for some reason you don't want to use that approach,
> I don't think there's
> anything
On Sun, 19 Sep 2004 19:17:25 -0400 (EDT), Frank W. Zammetti (MLists)
<[EMAIL PROTECTED]> wrote:
> Erik's answer is what I would call the correct one...
I agree as well, but just wanted to point out one additional detail
... if you override the equals() method, you will probably also want
to over
Erik's answer is what I would call the correct one... That being said, if
for some reason you don't want to use that approach, I don't think there's
anything specifically in Struts to do what you want anyway, but you might
want to have a look through the Commons BeanUtils packages. If such a
thing
Why don't you just override the equals method in your bean class?
public boolean equals(Object o) {
if (!(o instanceof MyClass)) return false;
MyClass bean = (MyClass) o;
if (!(name.equals(bean.name))) return false;
if (!(sex.equals(bean.sex))) return false;
//etc. . .
return true;
}
Then y
Please, I want find out if the value of each of the
matching properties in two beans are the same.
BACKGROUND
==
I have two JAVABEANS A AND B. They both have name and
sex properties amongst others. I want to find out if
A.name == B.name and A.sex == B.sex.
Is there any method in Struts
5 matches
Mail list logo