Uploaded image for project: 'Click'
  1. Click
  2. CLK-458

CountrySelect contains several double items

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Trivial
    • Resolution: Fixed
    • Affects Version/s: 1.5 RC2
    • Fix Version/s: 1.5 RC3
    • Component/s: extras
    • Labels:
      None
    • Environment:
      windows / jdk1.6.0_10 / Apache Tomcat/6.0.18

      Description

      The net.sf.click.extras.control.CountrySelect field generates a list which contains several countries multiple times (Belgium, Canada, Ireland, Japan, Luxembourg, Malta, Norway, Singapore, Spain, Switzerland, Thailand, United States).

      This is because the source used to generate this list (Locale.getAvailableLocales()) contains multiple items (when there are sublocales).

      This can be solved by manually filtering the list, or using a set. I solved it using a set.

      in CountrySelect Line: 212
      original:
      List optionList = new ArrayList();
      new:
      Set optionList = new TreeSet(new OptionLabelComparator(getLocale()));

      and removing lines: 223 and 224

        Activity

        Hide
        sabob Bob Schellink added a comment -

        fix checked into trunk.

        Show
        sabob Bob Schellink added a comment - fix checked into trunk.

          People

          • Assignee:
            sabob Bob Schellink
            Reporter:
            highway Christopher Highway
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development