Package de.jetwick.ese.util

Examples of de.jetwick.ese.util.FacetHelper


                item.add(new ListView("filterValues", entry.getValue()) {

                    @Override
                    protected void populateItem(ListItem li) {
                        final FacetHelper h = (FacetHelper) li.getModelObject();

                        final String filter = h.getFilter();
                        final boolean selected = alreadyFiltered.contains(filter);

                        Link link = new IndicatingAjaxFallbackLink("filterValueLink") {

                            @Override
View Full Code Here


                                if ("T".equals(term))
                                    term = "true";
                                else if ("F".equals(term))
                                    term = "false";

                                list.add(new FacetHelper(key, term, term, e.getCount()));
                            }
                            ret.set(integ, new MapEntry(ff.getName(), list));
                        }
                    } else if (facet instanceof FilterFacet) {
                        FilterFacet ff = (FilterFacet) facet;
                        String name = ff.getName();
                        int firstIndex = name.indexOf(":");
                        if (firstIndex < 0)
                            continue;

                        String key = name.substring(0, firstIndex);
                        String val = name.substring(firstIndex + 1);
                        System.out.println("NAME:"+name);
                        // exclude smaller zero?
                        Long count = ff.count();
                        if (count == null)
                            count = 0L;

                        Integer index = filterToIndex.get(key);
                        if (index == null)
                            continue;

                        Entry<String, List<FacetHelper>> facetEntry = ret.get(index);
                        List<FacetHelper> list;
                        if (facetEntry == null) {
                            facetEntry = new MapEntry(key, new ArrayList<FacetHelper>());
                            ret.set(index, facetEntry);
                        }

                        list = facetEntry.getValue();
                        list.add(new FacetHelper(key, val, translate(name), count));
                    }

                }
        }
        return ret;
View Full Code Here

TOP

Related Classes of de.jetwick.ese.util.FacetHelper

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.