Uploaded image for project: 'Tapestry'
  1. Tapestry
  2. TAPESTRY-1597

When a List is converted to a SelectModel, the keys are converted unnecessarily to strings

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 5.0
    • 5.0.6
    • tapestry-core
    • None

    Description

      Same thing as the Map problem, but a one liner:

      org.apache.tapestry.internal.TapestryInternalUtils, line 234:

      public static OptionModel toOptionModel(Object input)

      { String value = (input != null ? String.valueOf(input) : ""); return new OptionModelImpl(value, false, value); // <-- should be value, false, input (and perhaps rename value to label for consistency) }

      Cheers,
      Nick.

      Attachments

        1. TAPESTRY-1597.patch
          2 kB
          Nick Westgate

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: