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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 5.0
    • Fix Version/s: 5.0.6
    • Component/s: tapestry-core
    • Labels:
      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

          Activity

            People

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

              Dates

              • Created:
                Updated:
                Resolved: