Results 1 to 4 of 4
  1. #1
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Exclamation Copy from bean to another bean

    Hi,

    I have to copy one bean to another bean. For that i am using following code:

    try {
    System.out.println("Copying properties from fromBean to toBean");
    BeanUtils.copyProperties(toBean, fromBean);
    } catch (IllegalAccessException e) {
    e.printStackTrace();
    } catch (InvocationTargetException e) {
    e.printStackTrace();
    }

    Problem occurred when my from bean is nested bean(it is calling other bean internally) .

    I found that this method is intended to perform a "shallow copy" of the properties and so complex properties (for example, nested ones) will not be copied.

    So How to copy nested bean ??
    Can any one help me ??
    Thanks in advance..:o
    Rakesh Mehta

  2. #2
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Default

    mnerobi15
    Don't write meaningless..

    if you know any information related to post then write it.
    Rakesh Mehta

  3. #3
    Join Date
    Oct 2008
    Posts
    73
    Rep Power
    0

    Default

    any one else ???
    Rakesh Mehta

  4. #4
    Fubarable's Avatar
    Fubarable is offline Moderator
    Join Date
    Jun 2008
    Posts
    19,316
    Blog Entries
    1
    Rep Power
    26

Similar Threads

  1. any way to communicate one bean to another bean not using session in jsf
    By MayaKannan in forum JavaServer Faces (JSF)
    Replies: 1
    Last Post: 01-14-2011, 01:45 PM
  2. Create Bean from another Bean
    By heidiweber in forum JavaServer Pages (JSP) and JSTL
    Replies: 0
    Last Post: 08-31-2009, 03:43 PM
  3. UREGENT-accessing session bean ok but entity bean
    By parimal in forum Enterprise JavaBeans (EJB)
    Replies: 1
    Last Post: 08-28-2008, 01:34 PM
  4. Replies: 0
    Last Post: 03-30-2008, 10:03 AM
  5. Replies: 0
    Last Post: 09-26-2007, 08:36 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •