Return-Path: Delivered-To: apmail-jakarta-commons-user-archive@www.apache.org Received: (qmail 35515 invoked from network); 14 Nov 2003 21:07:48 -0000 Received: from daedalus.apache.org (HELO mail.apache.org) (208.185.179.12) by minotaur-2.apache.org with SMTP; 14 Nov 2003 21:07:48 -0000 Received: (qmail 64328 invoked by uid 500); 14 Nov 2003 21:07:33 -0000 Delivered-To: apmail-jakarta-commons-user-archive@jakarta.apache.org Received: (qmail 64312 invoked by uid 500); 14 Nov 2003 21:07:33 -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 64290 invoked from network); 14 Nov 2003 21:07:32 -0000 Received: from unknown (HELO gra-smtp2-sun.choiceone.net) (216.47.224.12) by daedalus.apache.org with SMTP; 14 Nov 2003 21:07:32 -0000 Received: (qmail 16021 invoked from network); 14 Nov 2003 21:07:37 -0000 Received: from unknown (HELO myfastmail.com) (66.202.75.116) by gra-smtp2-sun.choiceone.net with SMTP; 14 Nov 2003 21:07:37 -0000 Message-ID: <3FB54405.10208@myfastmail.com> Date: Fri, 14 Nov 2003 15:07:17 -0600 From: Wes Rood User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.4) Gecko/20030624 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Jakarta Commons Users List Subject: BeanUtils Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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 What is the best way to code a custom Converter for use with ConvertUtils.register() while still achieving the default conversion logic provided when you call BeanUtils.copyProperties()? I want to provide my own logic for going from Boolean to String, but I want the default behavior for all types other than Boolean. When I register my custom converter, it is based on the output type, not the output type - input type combination, so my converter runs for Boolean as well as all the other types in the java language. This can be solved by repeating the logic performed by the default StringConverter, but it seems silly to do so. Here are 3 possible solutions: 1 Allow the default converters to be overridden 2. Run the custom converters in addition to the default converters 3. Allow custom converters to be registered based upon the input type - output type combination, not just output type Any ideas? --------------------------------------------------------------------- To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-user-help@jakarta.apache.org