Uploaded image for project: 'Tapestry 5'
  1. Tapestry 5
  2. TAP5-933

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

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • 5.2.0
    • 5.3
    • tapestry-core
    • 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() ).

      Attachments

        Activity

          This comment will be Viewable by All Users Viewable by All Users
          Cancel

          People

            hlship Howard Lewis Ship
            hlship Howard Lewis Ship
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment