Uploaded image for project: 'RichFaces'
  1. RichFaces
  2. RF-2969

richfaces calendar component does not support custom date type correctly

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 3.2.0
    • Fix Version/s: 3.2.1
    • Component/s: None
    • Labels:
      None

      Description

      To reproduce this problem:
      Create a custom date type (eg. MyDate.class)
      Create a converter(MyDateConverter.class) for the custom date type and register it for the custom date type (converter-for-class MyDate.class)

      Now create a richfaces calendar component that has its value attribute bound to a variable of type MyDate.class

      Expected result:
      In Get Scenario - String value of MyDate.class is displayed on page, using MyDateConverter.getAsString()
      In Post Scenario - value of MyDate.class is updated based on the string value in calendar component, using MyDateConverter.getAsObject()

      Actual result
      In Get Scenario - String value of MyDate.class is displayed on page, using MyDateConverter.getAsString() (This works!!! yay)
      In Post Scenario - "Error, invalid attribute type", getAsObject is never called on MyDateConverter

      Workaround:
      Specify in the calendar component the converter. eg

      <rich:calendar id="myDateInput"
      enableManualInput="true"
      value="#

      {MyBean.myDate}

      "
      converter="MyDateConverter"
      datePattern="dd/mm/yyyy" />

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                ayanul Aleksej Yanul
                Reporter:
                Kragoth Tim Evers
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: