public class FacetFilterController
extends DefaultWidgetController
| Modifier and Type | Field and Description |
|---|---|
static String |
BREADCRUMB_LIST_MODEL_KEY |
static String |
COMP_ID_APPLY_BTN |
static String |
CURRENTFACET_LIST_MODEL_KEY |
static String |
CURRENTSMALLSEARCHRESUL_MODEL_KEY |
protected static String |
SCLASS_FACETFILTER_BREADCRUMB |
protected static String |
SCLASS_FACETFILTER_CLEARALL |
protected static String |
SCLASS_FACETFILTER_MAINCONTAINER |
protected static String |
SCLASS_FACETFILTER_PANEL |
protected static String |
SCLASS_FACETFILTER_PANEL_CAPTION |
protected static String |
SCLASS_FACETFILTER_PANEL_CHILDREN |
protected static String |
SCLASS_FACETFILTER_PANEL_CHILDREN_CHECKBOX |
protected static String |
SCLASS_FACETFILTER_PANEL_CHILDREN_RADIO |
protected static String |
SCLASS_FACETFILTER_REMOVEBREADCRUMB |
protected static String |
SETTING_VETOED_FACETS |
static String |
SOCKET_IN_SMALLSEARCHRESULT |
static String |
SOCKET_OUT_SELECTEDFACETS |
static String |
SOCKET_OUT_SMALLSEARCHRESULT |
| Constructor and Description |
|---|
FacetFilterController() |
| Modifier and Type | Method and Description |
|---|---|
void |
applyFacetFilter()
Events#ON_CLICK event handler for the apply button. |
protected Component |
createBreadcrumb(BreadcrumbData<SearchStateData> breadcrumb)
Creates a view component for a given breadcrumb.
|
protected Component |
createFacetComponent(FacetData<SearchStateData> facet)
Creates a view component for the given facet.
|
protected void |
displayFacetBreadcrumbs(List<BreadcrumbData<SearchStateData>> breadcrumbData)
Draws facet breadcrumbs
|
void |
initialize(Component comp)
Initializes the facet filter popup title.
|
protected void |
initializeVetoedFacetsCodes()
Creates a set of facet codes that should be filtered out according to a comma-separated string list in widget
setting "vetoedFacets".
|
protected boolean |
isFacetVisible(FacetData<SearchStateData> facet)
Checks the facet visibility: if facet priority is positive value and if it is not among vetoedFactes.
|
void |
preInitialize(Component comp)
Initializes the vetoed facets and model values for current facets and search breadcrumbs/
|
protected void |
removeAllBreadCrumbs()
Removes all currently applied breadcrumbs.
|
protected void |
removeBreadcrumb(BreadcrumbData<SearchStateData> breadcrumb)
Removes a breadcrumb from the current selection.
|
protected FacetData<SearchStateData> |
removeValuesFromFacet(FacetData<SearchStateData> facetData,
List<FacetValueData<SearchStateData>> values2remove)
Removes given values form the given facet.
|
protected void |
renderBreadcrumbs(List<BreadcrumbData<SearchStateData>> facetBreadcrumbs,
Component parent)
Creates view components for the given breadcrumbs and adds it to the parent component.
|
protected void |
renderFacets(List<FacetData<SearchStateData>> facets,
Component parent)
Creates view components for the given facets and adds it to the parent component.
|
protected Component |
renderFacetValueComponent(FacetData<SearchStateData> facet,
FacetValueData<SearchStateData> facetValue)
Draws a facet value component - a radiobutton or checkbox for multiselect facets.
|
protected void |
renderFacetValues(FacetData<SearchStateData> facet,
Component parent)
Creates a view components for facet values of the given facet and adds it to the specified parent view component.
|
protected void |
sendFacetValue(FacetData<SearchStateData> facet,
FacetValueData<SearchStateData> facetValue)
On facet selection, this method adds given facet value to the currently selected and send the updated search
refinements to the output socket.
|
protected void |
updateFacets(List<FacetData<SearchStateData>> facets)
Renders new set of facets in the facetContainer component.
|
void |
updateSearchState(ProductSearchPageData<SearchStateData,ProductData> searchPageData)
Update Currently displayed facets and facet breadcrumbs according to given products search result.
|
protected void |
updateTotalCount(long totalNumberOfResults) |
protected static final String SCLASS_FACETFILTER_PANEL_CHILDREN_CHECKBOX
protected static final String SCLASS_FACETFILTER_PANEL_CHILDREN_RADIO
protected static final String SCLASS_FACETFILTER_PANEL_CHILDREN
protected static final String SCLASS_FACETFILTER_PANEL_CAPTION
protected static final String SCLASS_FACETFILTER_PANEL
protected static final String SCLASS_FACETFILTER_MAINCONTAINER
protected static final String SCLASS_FACETFILTER_BREADCRUMB
protected static final String SCLASS_FACETFILTER_REMOVEBREADCRUMB
protected static final String SCLASS_FACETFILTER_CLEARALL
protected static final String SETTING_VETOED_FACETS
public static final String CURRENTSMALLSEARCHRESUL_MODEL_KEY
public static final String BREADCRUMB_LIST_MODEL_KEY
public static final String CURRENTFACET_LIST_MODEL_KEY
public static final String SOCKET_IN_SMALLSEARCHRESULT
public static final String SOCKET_OUT_SELECTEDFACETS
public static final String SOCKET_OUT_SMALLSEARCHRESULT
public static final String COMP_ID_APPLY_BTN
public void preInitialize(Component comp)
public void initialize(Component comp)
protected void initializeVetoedFacetsCodes()
public void updateSearchState(ProductSearchPageData<SearchStateData,ProductData> searchPageData)
searchPageData - protected void displayFacetBreadcrumbs(List<BreadcrumbData<SearchStateData>> breadcrumbData)
breadcrumbData - protected void renderBreadcrumbs(List<BreadcrumbData<SearchStateData>> facetBreadcrumbs, Component parent)
protected Component createBreadcrumb(BreadcrumbData<SearchStateData> breadcrumb)
protected void removeBreadcrumb(BreadcrumbData<SearchStateData> breadcrumb)
breadcrumb - protected void removeAllBreadCrumbs()
protected void updateFacets(List<FacetData<SearchStateData>> facets)
facets - protected void renderFacets(List<FacetData<SearchStateData>> facets, Component parent)
protected boolean isFacetVisible(FacetData<SearchStateData> facet)
protected Component createFacetComponent(FacetData<SearchStateData> facet)
protected void renderFacetValues(FacetData<SearchStateData> facet, Component parent)
protected Component renderFacetValueComponent(FacetData<SearchStateData> facet, FacetValueData<SearchStateData> facetValue)
facet - facetValue - Componentpublic void applyFacetFilter()
Events#ON_CLICK event handler for the apply button. Sends the search result from the last refinement to
the output socket.protected void sendFacetValue(FacetData<SearchStateData> facet, FacetValueData<SearchStateData> facetValue)
facet - facetValue - protected FacetData<SearchStateData> removeValuesFromFacet(FacetData<SearchStateData> facetData, List<FacetValueData<SearchStateData>> values2remove)
facetData - values2remove - FacetDataprotected void updateTotalCount(long totalNumberOfResults)
totalNumberOfResults - Copyright © 2017 SAP SE. All Rights Reserved.