Tapestry 5
  1. Tapestry 5
  2. TAP5-933

EnumValueEncoder will create a ValueEncoder even when there's a specific String->Enum type coercion

    Details

    • Type: Improvement Improvement
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 5.2.0
    • Fix Version/s: 5.3
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      Had a client who was confused: they had contributed a String->TheirEnum type coercion but it wasn't working in their activation contexts. Turns out the EnumValueEncoderFactory contribution to ValueEncoderSource was being used instead, ignoring their coercion.

      I'm wondering if there's a way that ValueEncoderSource and/or EnumValueEncoderFactory could be smarter about seeing if there is a specific String->Enum coercion and making use of it instead of EnumValueEncoder (which uses Enum.valueOf() ).

        Activity

        Hide
        Howard M. Lewis Ship added a comment -

        Fixed as part of TAP5-1331.

        Show
        Howard M. Lewis Ship added a comment - Fixed as part of TAP5-1331 .

          People

          • Assignee:
            Howard M. Lewis Ship
            Reporter:
            Howard M. Lewis Ship
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development