Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 59266 invoked from network); 24 Sep 2003 09:24:52 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 24 Sep 2003 09:24:52 -0000 Received: (qmail 40140 invoked by uid 500); 24 Sep 2003 09:24:30 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 40019 invoked by uid 500); 24 Sep 2003 09:24:29 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: List-Help: List-Post: List-Id: "Jakarta Commons Users List" Reply-To: "Jakarta Commons Users List" Delivered-To: mailing list commons-user@jakarta.apache.org Received: (qmail 39752 invoked from network); 24 Sep 2003 09:24:23 -0000 Received: from unknown (HELO armail.arsoe-trelaze.com) (212.234.147.82) by daedalus.apache.org with SMTP; 24 Sep 2003 09:24:23 -0000 Received: from arsovir.arsoe.pl ([192.168.38.180]) by armail.arsoe-trelaze.com (8.11.0/8.11.0) with SMTP id h8O9OZm20014 for ; Wed, 24 Sep 2003 11:24:36 +0200 Received: from 192.168.38.176 by arsovir.arsoe.pl (InterScan E-Mail VirusWall NT); Wed, 24 Sep 2003 11:38:54 +0200 To: "Jakarta Commons Users List" Subject: [BeanUtils] Indexed and mapped properties MIME-Version: 1.0 X-Mailer: Lotus Notes Release 5.0.10 March 22, 2002 Message-ID: From: Nicolas.CHALUMEAU@arsoe-trelaze.com Date: Wed, 24 Sep 2003 11:24:32 +0200 X-MIMETrack: Serialize by Router on Domino/arsoe trelaze/rie(Release 5.0.9a |January 7, 2002) at 24/09/2003 11:24:33, Serialize complete at 24/09/2003 11:24:33 Content-Type: text/plain; charset="us-ascii" X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: minotaur-2.apache.org 1.6.2 0/1000/N I define a propertie with its getter and setter indexed in ObjectA and ObjectB : private Collection voConfList = new ArrayList(); public Collection getVoConfList() { return (voConfList); } public String getVoConfList(int index) { return (String) CollectionUtils.index(voConfList, index); } public void setVoConfList(int index, String value) { // index ingnore it's just a test this.voConfList.add(value); } public void setVoConfList(Collection voConfList) { this.voConfList = voConfList; } And then call copyProperties : objectB.setVoConfList(0, "value from") BeanUtils.copyProperties(objectA, objectB); The attribut in object is create but empty. The copy is not done. I have the same probleme with Map. But when i do same indexed getter and setter for an String[] it work. I see in the BeanUtils javadoc for copyProperties methode : "FIXME - Indexed and mapped properties that do not have getter and setter methods for the underlying array or Map are not copied by this method" I define getter and setter so where is the probleme Is there an other way to copy Indexed and mapped properties of an object to an other ? Nicolas --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org