MyFaces Core
  1. MyFaces Core
  2. MYFACES-2920

UISelectOne/UISelectMany validateValue: Before comparing each option, coerce the option value type to the type of component's value

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.0.2-SNAPSHOT
    • Fix Version/s: 2.0.4
    • Component/s: JSR-314
    • Labels:
      None
    • Environment:
      myfaces trunk

      Description

      From JavaDoc UISelectOne/UISelectMany validateValue:

      " ... Before comparing each option, coerce the option value type to the type of this component's value following the Expression Language coercion rules ..."

      More here:
      http://markmail.org/message/mfhyyiogaz73yfr4

      1. MYFACES-2920-v2.patch
        17 kB
        Martin Kočí
      2. MYFACES-2920.patch
        14 kB
        Martin Kočí

        Issue Links

          Activity

          Martin Kočí created issue -
          Martin Kočí made changes -
          Field Original Value New Value
          Attachment MYFACES-2920.patch [ 12454539 ]
          Martin Kočí made changes -
          Status Open [ 1 ] Patch Available [ 10002 ]
          Hide
          Martin Kočí added a comment -

          Attached MYFACES-2920-v2.patch with explicit test for Enum vs. String value combination.

          Show
          Martin Kočí added a comment - Attached MYFACES-2920 -v2.patch with explicit test for Enum vs. String value combination.
          Martin Kočí made changes -
          Attachment MYFACES-2920-v2.patch [ 12454753 ]
          Hide
          Martin Kočí added a comment -

          If no objections, I will commit the attached patch soon!

          Show
          Martin Kočí added a comment - If no objections, I will commit the attached patch soon!
          Hide
          Leonardo Uribe added a comment -

          The patch looks good, +1 to commit it!

          Show
          Leonardo Uribe added a comment - The patch looks good, +1 to commit it!
          Hide
          Jakob Korherr added a comment -

          Yes, it looks really good. +1 on committing it from me too!

          Show
          Jakob Korherr added a comment - Yes, it looks really good. +1 on committing it from me too!
          Martin Kočí made changes -
          Remaining Estimate 0h [ 0 ]
          Original Estimate 0h [ 0 ]
          Fix Version/s 2.0.3-SNAPSHOT [ 12315349 ]
          Hide
          Martin Kočí added a comment -

          patch applied in rev. 1030636

          Show
          Martin Kočí added a comment - patch applied in rev. 1030636
          Martin Kočí made changes -
          Status Patch Available [ 10002 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.3 [ 12315976 ]
          Fix Version/s 2.0.3-SNAPSHOT [ 12315349 ]
          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Hide
          Leonardo Uribe added a comment -

          Reopening this issue, since later tests revealed problems (see MYFACES-3010 and MYFACES-3011).

          Show
          Leonardo Uribe added a comment - Reopening this issue, since later tests revealed problems (see MYFACES-3010 and MYFACES-3011 ).
          Leonardo Uribe made changes -
          Resolution Fixed [ 1 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          Assignee Leonardo Uribe [ lu4242 ]
          Leonardo Uribe made changes -
          Link This issue blocks MYFACES-3011 [ MYFACES-3011 ]
          Leonardo Uribe made changes -
          Link This issue blocks MYFACES-3010 [ MYFACES-3010 ]
          Hide
          Martin Kočí added a comment -

          There is a test for enum javax.faces.component._SelectItemsUtilTest.testMatchValueWithEnums(), but it is currently @Ignored because requires myfaces-test 1.0.1-SNAPSHOT.

          Leonardo, can you please add there a test for problems MYFACES-3010 and MYFACES-3011? I don't fully understand the problem yet.

          And also please note that myfaces-test has own coercion implementation in MockExpressionFactory.coerceToType(Object, Class) and that can limit capabilities of testing in cases which heavily depend on EL implementation.

          Show
          Martin Kočí added a comment - There is a test for enum javax.faces.component._SelectItemsUtilTest.testMatchValueWithEnums(), but it is currently @Ignored because requires myfaces-test 1.0.1-SNAPSHOT. Leonardo, can you please add there a test for problems MYFACES-3010 and MYFACES-3011 ? I don't fully understand the problem yet. And also please note that myfaces-test has own coercion implementation in MockExpressionFactory.coerceToType(Object, Class) and that can limit capabilities of testing in cases which heavily depend on EL implementation.
          Hide
          Leonardo Uribe added a comment -

          I did some changes on the tests provided and set myfaces-test version to 1.0.1-SNAPSHOT. I did other tests using the test-webapp, to check if everything is correct. An explanation for this issue is on MYFACES-3010, but I commit the changes here to allow follow them easily using subversion commits tab.

          Show
          Leonardo Uribe added a comment - I did some changes on the tests provided and set myfaces-test version to 1.0.1-SNAPSHOT. I did other tests using the test-webapp, to check if everything is correct. An explanation for this issue is on MYFACES-3010 , but I commit the changes here to allow follow them easily using subversion commits tab.
          Leonardo Uribe made changes -
          Status Reopened [ 4 ] Resolved [ 5 ]
          Resolution Fixed [ 1 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.4-SNAPSHOT [ 12315977 ]
          Fix Version/s 2.0.3 [ 12315976 ]
          Leonardo Uribe made changes -
          Fix Version/s 2.0.4 [ 12316153 ]
          Fix Version/s 2.0.4-SNAPSHOT [ 12315977 ]
          Leonardo Uribe made changes -
          Status Resolved [ 5 ] Closed [ 6 ]
          Gavin made changes -
          Link This issue blocks MYFACES-3011 [ MYFACES-3011 ]
          Gavin made changes -
          Link This issue is depended upon by MYFACES-3011 [ MYFACES-3011 ]
          Gavin made changes -
          Link This issue blocks MYFACES-3010 [ MYFACES-3010 ]
          Gavin made changes -
          Link This issue is depended upon by MYFACES-3010 [ MYFACES-3010 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Patch Available Patch Available
          9m 24s 1 Martin Kočí 14/Sep/10 14:03
          Patch Available Patch Available Resolved Resolved
          51d 1h 44m 1 Martin Kočí 04/Nov/10 14:47
          Closed Closed Reopened Reopened
          27d 21h 35m 1 Leonardo Uribe 10/Jan/11 22:36
          Reopened Reopened Resolved Resolved
          20h 36m 1 Leonardo Uribe 11/Jan/11 19:13
          Resolved Resolved Closed Closed
          67d 18h 32m 2 Leonardo Uribe 09/Feb/11 03:32

            People

            • Assignee:
              Leonardo Uribe
              Reporter:
              Martin Kočí
            • Votes:
              1 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Development