RichFaces
  1. RichFaces
  2. RF-997

Calendar - incorrect use of converters

    Details

    • Type: Bug Bug
    • Status: Closed Closed (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.1.0
    • Fix Version/s: 3.2.0
    • Component/s: None
    • Security Level: Public (Everyone can see)
    • Labels:
      None
    • Similar Issues:
      Show 10 results 

      Description

      Calendar component uses converter.getAsObject on render phase.
      This is wrong.

      Correct behavior - use converter.getAsObject on process validations phase.
      In case of bad user input - converter will give conversion exception, display submitted value in input field, in calendar grid select last user selected day (if exists).

        Activity

        Hide
        Viktor Volkov
        added a comment -

        verified on build 31 richfaces 3.1.3

        Show
        Viktor Volkov
        added a comment - verified on build 31 richfaces 3.1.3
        Hide
        Daniel Soneira
        added a comment -

        Today I stumbled again over this mess of CalendarRendererBase.getSelectedDate...
        I will upload a modified example war file.

        I will make this as clear as possible. The last fix was a dirty hack and did not solve the misuse of conversion code in the renderer at all.

        THIS time PLEASE rewrite your calendar code:
        Renderer renders, Converter converts, Component stores value - the way it was meant to be.

        Please reopen this issue.

        Thanks,
        Daniel

        Show
        Daniel Soneira
        added a comment - Today I stumbled again over this mess of CalendarRendererBase.getSelectedDate... I will upload a modified example war file. I will make this as clear as possible. The last fix was a dirty hack and did not solve the misuse of conversion code in the renderer at all. THIS time PLEASE rewrite your calendar code: Renderer renders, Converter converts, Component stores value - the way it was meant to be. Please reopen this issue. Thanks, Daniel
        Hide
        Ilya Shaikovsky
        added a comment -

        please check the users issues. There is a couple of posts at forum again.

        Show
        Ilya Shaikovsky
        added a comment - please check the users issues. There is a couple of posts at forum again.
        Hide
        Daniel Soneira
        added a comment -

        Here is the new modified version.

        Steps to reproduce:

        1) open http://localhost:8080/richfaces/calendar.jsf
        2) type "asdf" into the calendar input field.
        3) press cancel

        The problem here is, that the renderer tries to access the submitted value and do some conversion with that. Which is clearly not its task. The renderer should not care about conversion - he should take the value as is (was already converted before).

        Show
        Daniel Soneira
        added a comment - Here is the new modified version. Steps to reproduce: 1) open http://localhost:8080/richfaces/calendar.jsf 2) type "asdf" into the calendar input field. 3) press cancel The problem here is, that the renderer tries to access the submitted value and do some conversion with that. Which is clearly not its task. The renderer should not care about conversion - he should take the value as is (was already converted before).
        Hide
        Vladislav Baranov
        added a comment -

        Fixed in /trunk.

        Show
        Vladislav Baranov
        added a comment - Fixed in /trunk.

          People

          • Assignee:
            Aleksej Yanul
            Reporter:
            Maksim Kaszynski
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: