Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@www.apache.org Received: (qmail 23581 invoked from network); 15 Nov 2006 01:07:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 15 Nov 2006 01:07:01 -0000 Received: (qmail 65169 invoked by uid 500); 15 Nov 2006 01:07:09 -0000 Delivered-To: apmail-jakarta-commons-dev-archive@jakarta.apache.org Received: (qmail 65078 invoked by uid 500); 15 Nov 2006 01:07:09 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "Jakarta Commons Developers List" Reply-To: "Jakarta Commons Developers List" Delivered-To: mailing list commons-dev@jakarta.apache.org Received: (qmail 65067 invoked by uid 99); 15 Nov 2006 01:07:09 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 17:07:09 -0800 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO brutus.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 14 Nov 2006 17:06:58 -0800 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id 47A7A7142F5 for ; Tue, 14 Nov 2006 17:06:38 -0800 (PST) Message-ID: <11223334.1163552798290.JavaMail.jira@brutus> Date: Tue, 14 Nov 2006 17:06:38 -0800 (PST) From: "Henri Yandell (JIRA)" To: commons-dev@jakarta.apache.org Subject: [jira] Commented: (BEANUTILS-228) [beanutils] ConvertUtilsBean: register converter for specific property MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/BEANUTILS-228?page=comments#action_12449880 ] Henri Yandell commented on BEANUTILS-228: ----------------------------------------- I wonder if the destinationClass is necessary in this API. It seems that the user will get all they need with: register(Converter, Class beanClass, String propertyName). Thoughts? > [beanutils] ConvertUtilsBean: register converter for specific property > ---------------------------------------------------------------------- > > Key: BEANUTILS-228 > URL: http://issues.apache.org/jira/browse/BEANUTILS-228 > Project: Commons BeanUtils > Issue Type: Improvement > Components: ConvertUtils & Converters > Affects Versions: 1.5 > Environment: Operating System: other > Platform: Other > Reporter: Michael Schuerig > Priority: Minor > Fix For: 1.8.0 > > > Currently, converters are selected only based on the class to which they > convert objects. In general this works pretty well, but I've encountered > cases, where this doesn't work out. > > For example, I'm using java.util.Date objects to represent points and > intervals in time that are not completely specific, such as day of the week > and month. Now I can easily write a Converter that uses SimpleDateFormat to > convert string representations of these dates ("Mon", "Feb") to Date objects. > > When I register one of these converters with ConvertUtils(Bean), though, it > preempts any conversion to Date. Something I clearly don't want as I have to > deal with different kinds of dates. > > As a solution, I'd like to be able to register a converter for a specific > property of a bean class, with a method this > > ConvertUtilsBean#register(Converter converter, java.lang.Class > destinationClass, java.lang.Class beanClass, java.lang.String propertyName) > > Michael -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org