\r
import java.text.MessageFormat;\r
import java.util.ArrayList;\r
+import java.util.LinkedHashSet;\r
import java.util.List;\r
+import java.util.Set;\r
\r
import org.apache.wicket.Component;\r
import org.apache.wicket.PageParameters;\r
import org.apache.wicket.markup.html.basic.Label;\r
+import org.apache.wicket.markup.html.form.CheckBox;\r
import org.apache.wicket.markup.html.form.ListMultipleChoice;\r
import org.apache.wicket.markup.html.form.TextField;\r
-import org.apache.wicket.markup.html.form.CheckBox;\r
import org.apache.wicket.markup.html.panel.Fragment;\r
import org.apache.wicket.markup.repeater.Item;\r
import org.apache.wicket.markup.repeater.data.DataView;\r
}\r
\r
// enforce user-accessible repository selections\r
- ArrayList<String> searchRepositories = new ArrayList<String>();\r
+ Set<String> uniqueRepositories = new LinkedHashSet<String>();\r
for (String selectedRepository : repositories) {\r
if (availableRepositories.contains(selectedRepository)) {\r
- searchRepositories.add(selectedRepository);\r
+ uniqueRepositories.add(selectedRepository);\r
}\r
}\r
+ ArrayList<String> searchRepositories = new ArrayList<String>(uniqueRepositories);\r
\r
// search form\r
final Model<String> queryModel = new Model<String>(query);\r