Line | |
---|
1 | package eu.clarin.cmdi.vlo.wicket.pages; |
---|
2 | |
---|
3 | import eu.clarin.cmdi.vlo.wicket.components.FacetsPanel; |
---|
4 | import eu.clarin.cmdi.vlo.pojo.QueryFacetsSelection; |
---|
5 | import java.util.Collection; |
---|
6 | import java.util.Collections; |
---|
7 | import java.util.HashMap; |
---|
8 | import org.apache.wicket.request.mapper.parameter.PageParameters; |
---|
9 | import org.apache.wicket.markup.html.WebPage; |
---|
10 | import org.apache.wicket.model.Model; |
---|
11 | |
---|
12 | /** |
---|
13 | * The main search page showing a search form, facets, and search results |
---|
14 | * |
---|
15 | * @author twagoo |
---|
16 | */ |
---|
17 | public class FacetedSearchPage extends WebPage { |
---|
18 | |
---|
19 | private static final long serialVersionUID = 1L; |
---|
20 | |
---|
21 | public FacetedSearchPage(final PageParameters parameters) { |
---|
22 | super(parameters); |
---|
23 | |
---|
24 | final QueryFacetsSelection selection = new QueryFacetsSelection( |
---|
25 | new HashMap<String, Collection<String>>() { |
---|
26 | { |
---|
27 | put("language", Collections.singleton("Dutch")); |
---|
28 | put("continent", Collections.<String>emptyList()); |
---|
29 | } |
---|
30 | }); |
---|
31 | |
---|
32 | add(new FacetsPanel("facets", new Model<QueryFacetsSelection>(selection))); |
---|
33 | } |
---|
34 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.