Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 5438 invoked from network); 12 Sep 2006 11:35:34 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 12 Sep 2006 11:35:34 -0000 Received: (qmail 22572 invoked by uid 500); 12 Sep 2006 11:35:32 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 21503 invoked by uid 500); 12 Sep 2006 11:35:29 -0000 Mailing-List: contact commons-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: 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 21492 invoked by uid 99); 12 Sep 2006 11:35:29 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 12 Sep 2006 04:35:29 -0700 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests=HTML_MESSAGE X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [201.45.111.235] (HELO mail.tjmg.gov.br) (201.45.111.235) by apache.org (qpsmtpd/0.29) with SMTP; Tue, 12 Sep 2006 04:35:28 -0700 Received: (qmail 9354 invoked from network); 12 Sep 2006 11:34:19 -0000 Received: by simscan 1.1.0 ppid: 9349, pid: 9350, t: 0.3056s scanners: attach: 1.1.0 clamav: 0.88.3/m:40/d:1732 spam: 3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on mail.tjmg.gov.br X-Spam-Level: Received: from unknown (HELO dayseADM) (10.0.1.214) by mail.tjmg.gov.br with SMTP; 12 Sep 2006 11:34:19 -0000 Message-ID: <006701c6d65f$ab6c0c60$d601000a@dayseADM> From: "Gabriel Borges" To: Subject: Problems with LazyValidatorForm and BeanUtils.copyProperties Date: Tue, 12 Sep 2006 08:36:20 -0300 MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_NextPart_000_0064_01C6D646.85EA56E0" X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2869 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 X-Virus-Checked: Checked by ClamAV on apache.org X-Old-Spam-Status: No, score=0.5 required=4.0 tests=AWL,BAYES_50,HTML_MESSAGE autolearn=ham version=3.1.0 X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N ------=_NextPart_000_0064_01C6D646.85EA56E0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Hi, I am having some trouble when I use a LazyValidatorForm with = BeansUtils.copyProperties. When I am doing the transfer from a LazyValidatorForm to a (my) Bean, = BeanUtils.copyProperties(appModel, (LazyValidatorForm) form);=20 The copyProperties method is trying to set a value "Object" to a Set. I think there is a bug in the method "get(String name)" of the class = org.apache.commons.beanutils.LazyDynaBean See bellow my questions. Anybody agree with me? public Object get(String name) { if (name =3D=3D null) { throw new IllegalArgumentException("No property name = specified"); } // Value found Object value =3D values.get(name); if (value !=3D null) { return value; } // Property doesn't exist // HERE i THINK THAT IF IS A DYNAPROPERTY, IT SHOULD RETURN = NULL, I THINK THE SIMBOL "!" SHOULD NOT BE HERE if (!isDynaProperty(name)) { return null; } // Property doesn't exist // SO IF THE PROPERTY DOESN'T EXIST, CREATE IT. JUST AS ABOVE value =3D createProperty(name, = dynaClass.getDynaProperty(name).getType()); if (value !=3D null) { set(name, value); } return value; } Thanks a lot... Gabriel Borges ------=_NextPart_000_0064_01C6D646.85EA56E0--