Hi Bailly,

That makes sense, yes. Can you create a ticket and a patch for this?

-Darius

On Mon, Nov 7, 2011 at 7:22 AM, Bailly Rurangirwa <[email protected]> wrote:

> Hi,
>
> an exception is being thrown  when trying to calculate history of
> indicators
>
> org.springframework.beans.TypeMismatchException
>
> Failed to convert value of type [java.lang.String] to required type
> [java.util.Date]; nested exception is java.lang.IllegalArgumentException:
> Cannot convert value of type [java.lang.String] to required type
> [java.util.Date]: no matching editors or conversion strategy found
>
> Looking through IndicatorHistoryController, I don't see where we register
> a CustomDateEditor to handle the "startDate" and "endDate" properties from
> the "Query" class.
>
> Can we change initBinder and include a custom date editor for these
> properties?...add something like
>
> SimpleDateFormat dateFormat = Context.getDateFormat();
>  dateFormat.setLenient(false);
> binder.registerCustomEditor(Date.class, new
> CustomDateEditor(dateFormat,true, 10));
>  -Bailly
>  ------------------------------
> Click here to 
> unsubscribe<[email protected]?body=SIGNOFF%20openmrs-devel-l>from 
> OpenMRS Developers' mailing list

_________________________________________

To unsubscribe from OpenMRS Developers' mailing list, send an e-mail to 
[email protected] with "SIGNOFF openmrs-devel-l" in the  body (not 
the subject) of your e-mail.

[mailto:[email protected]?body=SIGNOFF%20openmrs-devel-l]

Reply via email to