struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chamal desilva <chama...@yahoo.com>
Subject BeanUtils copyProperties - copying vector
Date Thu, 03 Aug 2006 09:06:50 GMT
Hi,

I have four classes.

public class AccountForm
{
  private String accNum;
}

public class Account
{
  private String accNum;
}

public class CustomerForm
{
     private String custRef = "";
     private Vector accounts= null;//Contains objects
of AccountForms classes

     //Get, set methods
}

public class Customer
{
     private String custRef = "";
     private Vector accounts = null; //Contains
objects of Account classes

     //Get, set methods
}

Now I need to copy properties from CustomerForm object
to Customer object.

My customers classes accounts vector contains Account
objects. CustomerForm classes accounts vector contains
AccountForms.

So when BeanUtils copy accounts vector from
CustomerForm to Customer class, will it also convert
AccountForms to Accounts. If not is there a way that I
can do that.

Thanking You,
Chamal.


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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


Mime
View raw message