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

Select component fails validation due to type mismatch when using model generated from String

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.4
    • Fix Version/s: 5.4
    • Component/s: tapestry-core
    • Labels:
      None

      Description

      A recent change to the Select component enables, by default, the validation of a submitted value to a Select against its SelectModel.

      This works fine in most cases ... however, when the SelectModel is created from a String, the values are also Strings even if the property edited by the Select is a non-String type (relying, again, on TypeCoercer to convert). This causes a failure in the typical case where the string is a list of number, say "1,5,10"; the provided SelectModel provides the values as strings, e.g., "10", which does match against even a valid submitted value, since the ValueEncoder will have converted the value to a number before the search.

        Attachments

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: