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

CountrySelect contains several double items

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.5 RC2
    • 1.5 RC3
    • extras
    • None
    • 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

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Slack

                Issue deployment