RunReportPopupPanel which is used as input panel for all Jasper reports ignores HH:mm and PM/AM entries in XMLGregorianCalendar fields. It only accepts date and year. The cause is obvious: RunReportPopupPanel, line: 207 onUpdate destroys all HH:mm info by setting time from date only (with zero HH:mm). Im probably able to fix it with workaround (see bellow #1), but I think there must be some clever way to do it in Wicket (#2). It just need some Wicket PRO
Option #1 - workaround:
- alter "date" onUpdate (line 207) to change ONLY date part of XMLGregorianCalendar (e.g. by using setDay, setMonth, setYear)
- Create three more AjaxFormComponentUpdatingBehavior onUpdate methods for these components: hours, minutes, amOrPmChoice. Use appropriate setters only.
- Handle AM/PM, as XMLGregorianCalendar doesnt have it.
Option #2 - PROPER:
- I believe there can be more elegant way to do it.
- XmlGregorianCalendarModel (which encapsulates data from DateTimeField) have proper setObject.
- This XmlGregorianCalendarModel.setObject(Date object) is however never called, so data cannot be saved.
- I dont know why its never called. I suspect its something with AjaxButton being used and something else missing.