Class WarehousingRefineByController
java.lang.Object
org.zkoss.zk.ui.event.GenericEventListener
org.zkoss.zk.ui.util.GenericComposer<T>
org.zkoss.zk.ui.util.GenericAutowireComposer<T>
org.zkoss.zk.ui.util.GenericForwardComposer<org.zkoss.zk.ui.Component>
com.hybris.cockpitng.util.ViewAnnotationAwareComposer
com.hybris.cockpitng.util.DefaultWidgetController
de.hybris.platform.warehousingbackoffice.widgets.warehousingrefineby.WarehousingRefineByController
- All Implemented Interfaces:
com.hybris.cockpitng.core.WidgetController,com.hybris.cockpitng.dnd.WidgetDragAndDropAware,com.hybris.cockpitng.engine.WidgetInstanceManagerAware,Serializable,org.zkoss.zk.ui.event.EventListener,org.zkoss.zk.ui.event.SerializableEventListener,org.zkoss.zk.ui.util.ComponentActivationListener,org.zkoss.zk.ui.util.ComponentCloneListener,org.zkoss.zk.ui.util.Composer<org.zkoss.zk.ui.Component>,org.zkoss.zk.ui.util.ComposerExt<org.zkoss.zk.ui.Component>
public class WarehousingRefineByController
extends com.hybris.cockpitng.util.DefaultWidgetController
Controller allowing to filter a collection browser based combine with advanced search logic.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
_separator, application, applicationScope, arg, componentScope, desktop, desktopScope, execution, page, pageScope, param, requestScope, self, session, sessionScope, spaceOwner, spaceScopeFields inherited from class org.zkoss.zk.ui.util.GenericComposer
_applied -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddConditionList(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData searchData, Map<String, List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchExpressions) Adds refine by filters conditions to the existing ones.protected voidaddSearchCondition(org.zkoss.zul.Checkbox checkbox, Map<String, List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchFieldConditions, com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData advancedSearchData) Adds the search conditions associated to the selectedCheckboxprotected FlexibleSearchQuerybuildSearchQuery(String typeCode, String searchValue) Builds aFlexibleSearchQueryvoidcompleteAdvancedSearchInitContext(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchInitContext context) Adds refine by filters to the initial givenAdvancedSearchInitContext.protected org.zkoss.zul.Labelprotected EnumerationServiceprotected FlexibleSearchServiceprotected RefineByprotected com.hybris.cockpitng.dataaccess.facades.type.TypeFacadeprotected org.zkoss.zul.Divvoidinitialize(org.zkoss.zk.ui.Component comp) protected com.hybris.cockpitng.dataaccess.facades.type.DataTypeloadDataTypeForCode(String typeCode) Loads aDataTypeby its code.protected RefineByloadRefineByConfiguration(String typeCode) Loads the configuration of the refine by according to the given type.voidonNodeSelected(com.hybris.backoffice.navigation.NavigationNode nodeSelected) Resets the refine by widget onNavigationNodeselection.protected voidrenderCheckbox(String searchFieldName, ArrayList searchFieldPossibleValues, String typeCode, SearchValue searchFieldValue, org.zkoss.zul.Div searchFieldDiv) Render a checkbox with her associated hiddenLabelwhich contains the search value.protected voidrenderRefineByFromConfig(String typeCode) Renders the filters based on warehousingbackoffice-refine-by configuration.protected voidResets the content of the filter container.voidsetEmptyFilters(org.zkoss.zul.Label emptyFilters) voidsetEnumerationService(EnumerationService enumerationService) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetRefineByConfig(RefineBy refineByConfig) voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) voidsetWarehousingFilterContainer(org.zkoss.zul.Div warehousingFilterContainer) protected voidsubmitFilter(org.zkoss.zk.ui.event.Event event) Submits a new search on checkbox selection.Methods inherited from class com.hybris.cockpitng.util.DefaultWidgetController
doAfterCompose, doBeforeCompose, doBeforeComposeChildren, executeOperation, getDragAndDropStrategy, getLabel, getLabel, getModel, getValue, getWidgetDragAndDropStrategyRepository, getWidgetInstanceManager, getWidgetRoot, getWidgetSettings, getWidgetslot, getWidgetTitle, getWidgetUtils, initDragAndDropAwareness, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, initWidgetSetting, invokeListenerMethod, onSocketInput, preInitialize, sendOutput, sendOutputAfterOperation, sendOutputAfterOperation, sendOutputAfterOperation, setValue, setWidgetInstanceManager, setWidgetTitleMethods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
scanEventListenersMethods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivateMethods inherited from class org.zkoss.zk.ui.util.GenericComposer
doCatch, doFinallyMethods inherited from class org.zkoss.zk.ui.event.GenericEventListener
bindComponent, getController, onEvent, unbindComponent
-
Field Details
-
SOCKET_IN_NODE_SELECTED
- See Also:
-
SOCKET_IN_ADVANCED_SEARCH_INIT_CONTEXT
- See Also:
-
SOCKET_OUT_OUTPUT_CONTEXT
- See Also:
-
GET_NAME
- See Also:
-
WAREHOUSINGBACKOFFICE_REFINE_BY
- See Also:
-
GROUP_VALUES_SEPARATOR
- See Also:
-
REFINE_BY_CONTAINER
- See Also:
-
CURRENT_SEARCH
- See Also:
-
TYPE_CODE
- See Also:
-
CONTEXT
- See Also:
-
CURRENT_SEARCH_SEPARATOR
- See Also:
-
-
Constructor Details
-
WarehousingRefineByController
public WarehousingRefineByController()
-
-
Method Details
-
initialize
public void initialize(org.zkoss.zk.ui.Component comp) - Overrides:
initializein classcom.hybris.cockpitng.util.DefaultWidgetController
-
completeAdvancedSearchInitContext
public void completeAdvancedSearchInitContext(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchInitContext context) Adds refine by filters to the initial givenAdvancedSearchInitContext.- Parameters:
context- theAdvancedSearchInitContextinput
-
addConditionList
protected void addConditionList(com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData searchData, Map<String, List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchExpressions) Adds refine by filters conditions to the existing ones.- Parameters:
searchData- the original {link AdvancedSearchData}searchExpressions- the search expressions defined in the configuration
-
addSearchCondition
protected void addSearchCondition(org.zkoss.zul.Checkbox checkbox, Map<String, List<com.hybris.backoffice.widgets.advancedsearch.impl.SearchConditionData>> searchFieldConditions, com.hybris.backoffice.widgets.advancedsearch.impl.AdvancedSearchData advancedSearchData) Adds the search conditions associated to the selectedCheckbox -
buildSearchQuery
Builds aFlexibleSearchQuery- Parameters:
typeCode- theDataType.codesearchValue- the search value- Returns:
- the created
FlexibleSearchQuery
-
loadDataTypeForCode
protected com.hybris.cockpitng.dataaccess.facades.type.DataType loadDataTypeForCode(String typeCode) Loads aDataTypeby its code.- Parameters:
typeCode- theDataType.code- Returns:
- the
DataTyperetrieved
-
loadRefineByConfiguration
Loads the configuration of the refine by according to the given type.- Parameters:
typeCode- theDataType.code- Returns:
- the completed
RefineBy
-
renderCheckbox
protected void renderCheckbox(String searchFieldName, ArrayList searchFieldPossibleValues, String typeCode, SearchValue searchFieldValue, org.zkoss.zul.Div searchFieldDiv) Render a checkbox with her associated hiddenLabelwhich contains the search value.- Parameters:
searchFieldName- the name of the field to search onsearchFieldPossibleValues- the list of search expressions to searchtypeCode- theDataType.codesearchFieldValue- the value of the field to searchsearchFieldDiv- theDivto which the checkbox will be added
-
renderRefineByFromConfig
Renders the filters based on warehousingbackoffice-refine-by configuration.- Parameters:
typeCode- theDataType.code
-
resetWidget
protected void resetWidget()Resets the content of the filter container. -
submitFilter
protected void submitFilter(org.zkoss.zk.ui.event.Event event) Submits a new search on checkbox selection.- Parameters:
event- the click event on one of the checkboxes
-
getRefineByConfig
-
setRefineByConfig
-
getWarehousingFilterContainer
protected org.zkoss.zul.Div getWarehousingFilterContainer() -
setWarehousingFilterContainer
public void setWarehousingFilterContainer(org.zkoss.zul.Div warehousingFilterContainer) -
getEmptyFilters
protected org.zkoss.zul.Label getEmptyFilters() -
setEmptyFilters
public void setEmptyFilters(org.zkoss.zul.Label emptyFilters) -
getTypeFacade
protected com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade() -
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) -
getFlexibleSearchService
-
setFlexibleSearchService
-
getEnumerationService
-
setEnumerationService