Return-Path: Delivered-To: apmail-jakarta-commons-dev-archive@apache.org Received: (qmail 5547 invoked from network); 1 Apr 2003 19:18:15 -0000 Received: from exchange.sun.com (192.18.33.10) by daedalus.apache.org with SMTP; 1 Apr 2003 19:18:15 -0000 Received: (qmail 13988 invoked by uid 97); 1 Apr 2003 19:20:07 -0000 Delivered-To: qmlist-jakarta-archive-commons-dev@nagoya.betaversion.org Received: (qmail 13981 invoked from network); 1 Apr 2003 19:20:06 -0000 Received: from daedalus.apache.org (HELO apache.org) (208.185.179.12) by nagoya.betaversion.org with SMTP; 1 Apr 2003 19:20:06 -0000 Received: (qmail 5367 invoked by uid 500); 1 Apr 2003 19:18:13 -0000 Mailing-List: contact commons-dev-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Subscribe: 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 5356 invoked from network); 1 Apr 2003 19:18:12 -0000 Received: from pcow057o.blueyonder.co.uk (HELO blueyonder.co.uk) (195.188.53.94) by daedalus.apache.org with SMTP; 1 Apr 2003 19:18:12 -0000 Received: from localhost ([80.194.24.21]) by blueyonder.co.uk with Microsoft SMTPSVC(5.5.1877.757.75); Tue, 1 Apr 2003 20:18:16 +0100 Date: Tue, 1 Apr 2003 20:18:58 +0100 Subject: Re: [betwixt] Strategies for roundtripping Date objects Content-Type: text/plain; charset=US-ASCII; format=flowed Mime-Version: 1.0 (Apple Message framework v482) From: robert burrell donkin To: "Jakarta Commons Developers List" Content-Transfer-Encoding: 7bit In-Reply-To: <4C47F66C98B28B4F903120350DEF05B06CB11C@hqexch01.upstate.com> Message-Id: X-Mailer: Apple Mail (2.482) X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N On Tuesday, April 1, 2003, at 05:04 PM, EPugh@upstate.com wrote: > Hi all, > > I am using betwixt to take a basic object with lots of string parameters > and > roundtrip them to XML and back. However, I just added a java.util.Date > object, and now betwixt is erroring when it tries to pass the String > representation of the date object back in as a string. I could add a > method > > public void setDate(String dateAsString) > > but that seems icky. Do I have to create a .betwixt file to deal with > this? > Or, should betwixt be changed to look at my String and try and convert it > to > a date if my only matching method signature takes a date. Alternatively > to > create a .betwixt file, can I do the same thing, but programatically. I > don't really want to add yet another file for mapping. i believe that betwixt uses ConvertUtils to convert stings to other things. so you should be able to register a Converter. if this doesn't work, then i'd say that this is a bug which needs to be fixed. repost and i'll take a look when i get the change or (if you feeling brave) create a test case and a patch. (i think that MethodUpdater is probably a good place to start looking for the bug.) > Loving Betwixt! don't say that too load! betwixt is cool but there's still tons of work that still needs to be done. any help would be gratefully received! - robert --------------------------------------------------------------------- To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org For additional commands, e-mail: commons-dev-help@jakarta.apache.org