Uploaded image for project: 'MidPoint'
  1. MidPoint
  2. MID-2440

RunReportPopupPanel ignores HH:mm AM/PM selections

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 3.1.1
    • Fix Version/s: 3.2 (Tycho)
    • Component/s: GUI
    • Labels:
      None

      Description

      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.

      Anybody?

        Attachments

          Activity

            People

            Assignee:
            martin.lizner Martin Lizner
            Reporter:
            martin.lizner Martin Lizner
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: