Hmmm ... and I could make one that is generic enough to work for all 10 or so places in the project where I need this. Managed properties would be used to tell each "ConverterBean" where to place the new converted value. Thanks.
Dennis Byrne >-----Original Message----- >From: Mike Kienenberger [mailto:[EMAIL PROTECTED] >Sent: Wednesday, January 18, 2006 12:38 PM >To: 'MyFaces Discussion' >Subject: Re: Wanting to validate *before* conversion > >No, that's not what I'm recommending. >I'm recommending binding it to an intermediate presentation backing >bean that does the conversion and forwards the binding to your domain >model. > >We're not moving validate before conversion, but we are moving >conversion after validate :) > >On 1/18/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> Yeah. I'll probably change the Date in the domain model to a String, then >> configure the ORM to convert the String to a datetime in the DB. Thanks. >> >> Dennis Byrne >> >> >-----Original Message----- >> >From: Mike Kienenberger [mailto:[EMAIL PROTECTED] >> >Sent: Wednesday, January 18, 2006 12:00 PM >> >To: 'MyFaces Discussion' >> >Subject: Re: Wanting to validate *before* conversion >> > >> >My suggestion would be to bind it to a String so you can do the >> >validation the way you want, and then convert the value in your value >> >binding methods, since you should be able to guarantee that the >> >conversion will work without errors at that point. >> > >> >On 1/17/06, Dennis Byrne <[EMAIL PROTECTED]> wrote: >> >> I have a requirement to provide users with a single text field to specify >> >> time. The time must be in [0-23]:[0-59] format ( in the US, military >> >> format). The inputText field is bound to a java.util.Date in the domain >> >> model. >> >> >> >> In cases where users enter an invalid time, a ConverterException prevents >> >> validation. I would like to avoid the following : >> >> >> >> * letting the exception occur, and handling it at the dep. desc. level >> >> * swallowing exceptions in the Converter, and validating the >> >> submittedValue >> >> * throwing a ValidatorException from a Converter >> >> >> >> Must I do this manually in an action ? >> >> >> >> Dennis Byrne >> >> >> >> >> >> >> > >> >> >> >