Class ReferenceAdvancedSearchController
- 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
-
- com.hybris.backoffice.widgets.referencesearch.ReferenceAdvancedSearchController
-
- All Implemented Interfaces:
WidgetController,WidgetDragAndDropAware,WidgetInstanceManagerAware,java.io.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 ReferenceAdvancedSearchController extends DefaultWidgetController
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringADVANCED_SEARCH_PARAM_PREFIXprotected WidgetslotadvancedSearchprotected static java.lang.StringCANCEL_BUTTONprotected static java.lang.StringCOLLECTION_BROWSER_PARAM_PREFIXprotected WidgetslotcollectionBrowserprotected static java.lang.StringCONTEXTprotected static java.lang.StringLABEL_KEY_ITEMS_SELECTEDprotected static java.lang.StringLABEL_KEY_SELECTprotected static java.lang.StringSELECT_BUTTONprotected org.zkoss.zul.ButtonselectButtonprotected static java.lang.StringSELECTED_ITEMprotected static java.lang.StringSELECTED_ITEMSprotected static java.lang.StringSETTING_MULTISELECTprotected static java.lang.StringSOCKET_INPUT_REFERENCE_SEARCH_CTXprotected static java.lang.StringSOCKET_INPUT_RESET_SELECTIONprotected static java.lang.StringSOCKET_OUTPUT_ADVANCED_SEARCH_INIT_CTXprotected static java.lang.StringSOCKET_OUTPUT_CANCELprotected static java.lang.StringSOCKET_OUTPUT_SELECTED_REFERENCES
-
Constructor Summary
Constructors Constructor Description ReferenceAdvancedSearchController()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected AdvancedSearchDatabuildAdvancedSearchData(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.Object> searchConditions, AdvancedSearch advancedSearch, java.util.Map<java.lang.String,java.lang.Object> contextMap)Provides advanced search data for advanced reference searchprotected AdvancedSearchInitContextcreateAdvancedSearchInitCtx(TypeAwareSelectionContext ctx)protected FieldTypecreateFieldType(java.lang.String qualifier, java.lang.String operator, AdvancedSearch advancedSearch)protected java.lang.StringextractAdvancedSearchConfigComponentName()protected BackofficeTypeUtilsgetBackofficeTypeUtils()CockpitConfigurationServicegetCockpitConfigurationService()TypeFacadegetTypeFacade()voidinitialize(org.zkoss.zk.ui.Component comp)Override this method to do initialization stuff for your widget, like initialize widget settings, restore view state from viewmodel, etc.protected booleanisMultiselect()protected AdvancedSearchloadAdvancedSearchConfiguration(java.lang.String typeCode)protected DataTypeloadDataTypeForCode(java.lang.String typeCode)voidonCancelButton()voidonMultiReferencesSelected(java.util.List<java.lang.Object> selectedItems)voidonReferenceSearchCtx(TypeAwareSelectionContext ctx)voidonSelectButton()voidonSingleReferenceSelected(java.lang.Object selectedItem)voidresetSelection()protected voidrestoreWidgetState()protected voidupdateAdvancedSearchWidget(TypeAwareSelectionContext ctx)protected voidupdateCollectionBrowserWidget(TypeAwareSelectionContext ctx)protected voidupdateSelectButtonState()protected booleanupdateWidgetSlotSettings(Widgetslot slot, java.lang.String widgetPrefix, java.util.Map<java.lang.String,java.lang.Object> params)-
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, setWidgetTitle
-
Methods inherited from class com.hybris.cockpitng.util.ViewAnnotationAwareComposer
scanEventListeners
-
Methods inherited from class org.zkoss.zk.ui.util.GenericAutowireComposer
alert, didActivate, getPage, willClone, willPassivate
-
-
-
-
Field Detail
-
ADVANCED_SEARCH_PARAM_PREFIX
protected static final java.lang.String ADVANCED_SEARCH_PARAM_PREFIX
- See Also:
- Constant Field Values
-
COLLECTION_BROWSER_PARAM_PREFIX
protected static final java.lang.String COLLECTION_BROWSER_PARAM_PREFIX
- See Also:
- Constant Field Values
-
LABEL_KEY_ITEMS_SELECTED
protected static final java.lang.String LABEL_KEY_ITEMS_SELECTED
- See Also:
- Constant Field Values
-
LABEL_KEY_SELECT
protected static final java.lang.String LABEL_KEY_SELECT
- See Also:
- Constant Field Values
-
SOCKET_INPUT_REFERENCE_SEARCH_CTX
protected static final java.lang.String SOCKET_INPUT_REFERENCE_SEARCH_CTX
- See Also:
- Constant Field Values
-
SOCKET_INPUT_RESET_SELECTION
protected static final java.lang.String SOCKET_INPUT_RESET_SELECTION
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_ADVANCED_SEARCH_INIT_CTX
protected static final java.lang.String SOCKET_OUTPUT_ADVANCED_SEARCH_INIT_CTX
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_SELECTED_REFERENCES
protected static final java.lang.String SOCKET_OUTPUT_SELECTED_REFERENCES
- See Also:
- Constant Field Values
-
SOCKET_OUTPUT_CANCEL
protected static final java.lang.String SOCKET_OUTPUT_CANCEL
- See Also:
- Constant Field Values
-
SETTING_MULTISELECT
protected static final java.lang.String SETTING_MULTISELECT
- See Also:
- Constant Field Values
-
SELECTED_ITEMS
protected static final java.lang.String SELECTED_ITEMS
- See Also:
- Constant Field Values
-
SELECTED_ITEM
protected static final java.lang.String SELECTED_ITEM
- See Also:
- Constant Field Values
-
CONTEXT
protected static final java.lang.String CONTEXT
- See Also:
- Constant Field Values
-
SELECT_BUTTON
protected static final java.lang.String SELECT_BUTTON
- See Also:
- Constant Field Values
-
CANCEL_BUTTON
protected static final java.lang.String CANCEL_BUTTON
- See Also:
- Constant Field Values
-
selectButton
protected org.zkoss.zul.Button selectButton
-
advancedSearch
protected Widgetslot advancedSearch
-
collectionBrowser
protected Widgetslot collectionBrowser
-
-
Method Detail
-
initialize
public void initialize(org.zkoss.zk.ui.Component comp)
Description copied from class:DefaultWidgetControllerOverride this method to do initialization stuff for your widget, like initialize widget settings, restore view state from viewmodel, etc. This method will be invoked byDefaultWidgetController.doAfterCompose(Component)everytime your widget view is created. SeeGenericForwardComposer.doAfterCompose(Component)for more details.- Overrides:
initializein classDefaultWidgetController
-
restoreWidgetState
protected void restoreWidgetState()
-
onReferenceSearchCtx
public void onReferenceSearchCtx(TypeAwareSelectionContext ctx)
-
updateAdvancedSearchWidget
protected void updateAdvancedSearchWidget(TypeAwareSelectionContext ctx)
-
updateCollectionBrowserWidget
protected void updateCollectionBrowserWidget(TypeAwareSelectionContext ctx)
-
updateWidgetSlotSettings
protected boolean updateWidgetSlotSettings(Widgetslot slot, java.lang.String widgetPrefix, java.util.Map<java.lang.String,java.lang.Object> params)
-
onMultiReferencesSelected
public void onMultiReferencesSelected(java.util.List<java.lang.Object> selectedItems)
-
onSingleReferenceSelected
public void onSingleReferenceSelected(java.lang.Object selectedItem)
-
resetSelection
public void resetSelection()
-
updateSelectButtonState
protected void updateSelectButtonState()
-
onSelectButton
public void onSelectButton()
-
onCancelButton
public void onCancelButton()
-
createAdvancedSearchInitCtx
protected AdvancedSearchInitContext createAdvancedSearchInitCtx(TypeAwareSelectionContext ctx)
-
buildAdvancedSearchData
protected AdvancedSearchData buildAdvancedSearchData(java.lang.String typeCode, java.util.Map<java.lang.String,java.lang.Object> searchConditions, AdvancedSearch advancedSearch, java.util.Map<java.lang.String,java.lang.Object> contextMap)
Provides advanced search data for advanced reference search
-
createFieldType
protected FieldType createFieldType(java.lang.String qualifier, java.lang.String operator, AdvancedSearch advancedSearch)
-
loadAdvancedSearchConfiguration
protected AdvancedSearch loadAdvancedSearchConfiguration(java.lang.String typeCode)
-
extractAdvancedSearchConfigComponentName
protected java.lang.String extractAdvancedSearchConfigComponentName()
-
isMultiselect
protected boolean isMultiselect()
-
loadDataTypeForCode
protected DataType loadDataTypeForCode(java.lang.String typeCode)
-
getCockpitConfigurationService
public CockpitConfigurationService getCockpitConfigurationService()
-
getTypeFacade
public TypeFacade getTypeFacade()
-
getBackofficeTypeUtils
protected BackofficeTypeUtils getBackofficeTypeUtils()
-
-