Class SimpleListController
- 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.cockpitng.widgets.common.simplelist.SimpleListController
-
- 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>
@Deprecated(since="6.6", forRemoval=true) public class SimpleListController extends DefaultWidgetControllerDeprecated, for removal: This API element is subject to removal in a future version.since 6.6 useCollectionBrowserControllerController of the simple list widget.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringCOMP_ID_GRIDLISTDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringCONFIG_CTX_SIMPLE_LISTDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringENTRY_DESCRDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringENTRY_IMG_FALLBACKDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringENTRY_IMG_URLDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringENTRY_NAMEDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringMODEL_PAGEABLEDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringMODEL_PAGEABLE_LISTDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSETTING_ASYNCDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSETTING_CONFIG_CONTEXTDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSETTING_MAX_ENTRY_LIMITDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSETTING_PAGE_SIZEDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSETTING_VIEW_MODEDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSOCKET_IN_PAGEABLEDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSOCKET_IN_PAGEABLELISTDeprecated, for removal: This API element is subject to removal in a future version.static java.lang.StringSOCKET_OUT_SELECTEDITEMDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringVIEW_MODE_GRIDDeprecated, for removal: This API element is subject to removal in a future version.protected static java.lang.StringVIEW_MODE_LISTDeprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Summary
Constructors Constructor Description SimpleListController()Deprecated, for removal: This API element is subject to removal in a future version.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected org.zkoss.zk.ui.ComponentcreateEntry(java.lang.Object entry, SimpleList config)Deprecated, for removal: This API element is subject to removal in a future version.protected org.zkoss.zul.ButtoncreateShowMoreButton(Pageable<?> pageable, org.zkoss.zk.ui.Component parent)Deprecated, for removal: This API element is subject to removal in a future version.CockpitLocaleServicegetCockpitLocaleService()Deprecated, for removal: This API element is subject to removal in a future version.protected java.lang.ObjectgetDescriptionValue(Description descr, java.lang.Object entry)Deprecated, for removal: This API element is subject to removal in a future version.org.zkoss.zk.ui.ComponentgetGridContainer()Deprecated, for removal: This API element is subject to removal in a future version.org.zkoss.zul.ListboxgetGridList()Deprecated, for removal: This API element is subject to removal in a future version.protected java.lang.ObjectgetImageValue(Image img, java.lang.Object entry)Deprecated, for removal: This API element is subject to removal in a future version.protected java.lang.ObjectgetLocalizedValue(java.lang.Object value)Deprecated, for removal: This API element is subject to removal in a future version.LocalizedValuesServicegetLocalizedValuesService()Deprecated, for removal: This API element is subject to removal in a future version.protected java.lang.ObjectgetNameValue(Name name, java.lang.Object entry)Deprecated, for removal: This API element is subject to removal in a future version.protected ObjectValueServicegetObjectValueService()Deprecated, for removal: This API element is subject to removal in a future version.protected java.util.Map<java.lang.String,java.lang.Object>getRendererProps(java.lang.Object entry, SimpleList config)Deprecated, for removal: This API element is subject to removal in a future version.Returns a map with all the key/value pairs which should be passed to the zul template used for rendering.voidinitialize(org.zkoss.zk.ui.Component comp)Deprecated, for removal: This API element is subject to removal in a future version.Override this method to do initialization stuff for your widget, like initialize widget settings, restore view state from viewmodel, etc.protected SimpleListloadConfiguration(java.lang.String typeCode)Deprecated, for removal: This API element is subject to removal in a future version.Loads the UI configuration for component with code "simple-list" and for the specified type, typeCode.protected static voidlogReachingMax(int counter, int limit)Deprecated, for removal: This API element is subject to removal in a future version.protected voidrender(Pageable<?> pageable, java.util.List<?> genericObjectList)Deprecated, for removal: This API element is subject to removal in a future version.Renders the provided entries as either a list or a grid depending on the value of the setting "viewMode" (list is rendered if true, a grid is rendered otherwise).protected org.zkoss.zk.ui.ComponentresolveContainerComponent()Deprecated, for removal: This API element is subject to removal in a future version.Resolves and returns the container component used when rendering entries.voidselectEntry(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zk.ui.Component,?> event)Deprecated, for removal: This API element is subject to removal in a future version.Call back method for select events.voidsetCockpitLocaleService(CockpitLocaleService cockpitLocaleService)Deprecated, for removal: This API element is subject to removal in a future version.voidsetList(java.util.List<?> objectList)Deprecated, for removal: This API element is subject to removal in a future version.Called whenever a socket event is sent to the "pageablelist" socket.voidsetLocalizedValuesService(LocalizedValuesService localizedValuesService)Deprecated, for removal: This API element is subject to removal in a future version.voidsetObjectValueService(ObjectValueService objectValueService)Deprecated, for removal: This API element is subject to removal in a future version.voidsetPageable(Pageable<?> pageable)Deprecated, for removal: This API element is subject to removal in a future version.Called whenever a socket event is sent to the "pageable" socket.-
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
-
SOCKET_IN_PAGEABLELIST
public static final java.lang.String SOCKET_IN_PAGEABLELIST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SOCKET_IN_PAGEABLE
public static final java.lang.String SOCKET_IN_PAGEABLE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SOCKET_OUT_SELECTEDITEM
public static final java.lang.String SOCKET_OUT_SELECTEDITEM
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SETTING_VIEW_MODE
public static final java.lang.String SETTING_VIEW_MODE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SETTING_PAGE_SIZE
public static final java.lang.String SETTING_PAGE_SIZE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SETTING_CONFIG_CONTEXT
public static final java.lang.String SETTING_CONFIG_CONTEXT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SETTING_ASYNC
public static final java.lang.String SETTING_ASYNC
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
SETTING_MAX_ENTRY_LIMIT
public static final java.lang.String SETTING_MAX_ENTRY_LIMIT
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
ENTRY_NAME
protected static final java.lang.String ENTRY_NAME
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
ENTRY_IMG_URL
protected static final java.lang.String ENTRY_IMG_URL
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
ENTRY_DESCR
protected static final java.lang.String ENTRY_DESCR
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
ENTRY_IMG_FALLBACK
protected static final java.lang.String ENTRY_IMG_FALLBACK
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
CONFIG_CTX_SIMPLE_LIST
protected static final java.lang.String CONFIG_CTX_SIMPLE_LIST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
COMP_ID_GRIDLIST
protected static final java.lang.String COMP_ID_GRIDLIST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
VIEW_MODE_LIST
protected static final java.lang.String VIEW_MODE_LIST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
VIEW_MODE_GRID
protected static final java.lang.String VIEW_MODE_GRID
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
MODEL_PAGEABLE
protected static final java.lang.String MODEL_PAGEABLE
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
MODEL_PAGEABLE_LIST
protected static final java.lang.String MODEL_PAGEABLE_LIST
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(org.zkoss.zk.ui.Component comp)
Deprecated, for removal: This API element is subject to removal in a future version.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
-
setPageable
public void setPageable(Pageable<?> pageable)
Deprecated, for removal: This API element is subject to removal in a future version.Called whenever a socket event is sent to the "pageable" socket. Renders the entries in the pageable object (if any) by invokingrender(Pageable, List).- Parameters:
pageable- the pageable object to render
-
setList
public void setList(java.util.List<?> objectList)
Deprecated, for removal: This API element is subject to removal in a future version.Called whenever a socket event is sent to the "pageablelist" socket. Creates a newPageableListobject using the provided list objectList and the page size defined by the "pageSize" setting and then passes it on tosetPageable(Pageable).- Parameters:
objectList- the list of objects to be rendered
-
render
protected void render(Pageable<?> pageable, java.util.List<?> genericObjectList)
Deprecated, for removal: This API element is subject to removal in a future version.Renders the provided entries as either a list or a grid depending on the value of the setting "viewMode" (list is rendered if true, a grid is rendered otherwise).- Parameters:
pageable- used to resolve the relevant type code (if any) and other paging informationgenericObjectList- the objects to be rendered
-
logReachingMax
protected static void logReachingMax(int counter, int limit)Deprecated, for removal: This API element is subject to removal in a future version.
-
resolveContainerComponent
protected org.zkoss.zk.ui.Component resolveContainerComponent()
Deprecated, for removal: This API element is subject to removal in a future version.Resolves and returns the container component used when rendering entries. Which component is returned depends on the value of the setting "viewMode".- Returns:
- the container component
-
createShowMoreButton
protected org.zkoss.zul.Button createShowMoreButton(Pageable<?> pageable, org.zkoss.zk.ui.Component parent)
Deprecated, for removal: This API element is subject to removal in a future version.
-
createEntry
protected org.zkoss.zk.ui.Component createEntry(java.lang.Object entry, SimpleList config)Deprecated, for removal: This API element is subject to removal in a future version.
-
loadConfiguration
protected SimpleList loadConfiguration(java.lang.String typeCode)
Deprecated, for removal: This API element is subject to removal in a future version.Loads the UI configuration for component with code "simple-list" and for the specified type, typeCode.- Parameters:
typeCode- the type code for which the configuration should be loaded- Returns:
- the configuration object if found, null otherwise
-
getRendererProps
protected java.util.Map<java.lang.String,java.lang.Object> getRendererProps(java.lang.Object entry, SimpleList config)Deprecated, for removal: This API element is subject to removal in a future version.Returns a map with all the key/value pairs which should be passed to the zul template used for rendering.- Parameters:
entry- the object to be renderedconfig- the UI configuration to be used when rendering- Returns:
- map with renderer properties, which are accessible in the zul template (using ${args.<KEY_NAME>} )
-
getNameValue
protected java.lang.Object getNameValue(Name name, java.lang.Object entry)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getDescriptionValue
protected java.lang.Object getDescriptionValue(Description descr, java.lang.Object entry)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getImageValue
protected java.lang.Object getImageValue(Image img, java.lang.Object entry)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getLocalizedValue
protected java.lang.Object getLocalizedValue(java.lang.Object value)
Deprecated, for removal: This API element is subject to removal in a future version.
-
selectEntry
public void selectEntry(org.zkoss.zk.ui.event.SelectEvent<org.zkoss.zk.ui.Component,?> event)
Deprecated, for removal: This API element is subject to removal in a future version.Call back method for select events. Resolves the selected object and sends it out on the outgoing socket called "selecteditem".- Parameters:
event- the select event
-
getObjectValueService
protected ObjectValueService getObjectValueService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setObjectValueService
public void setObjectValueService(ObjectValueService objectValueService)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getGridContainer
public org.zkoss.zk.ui.Component getGridContainer()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getGridList
public org.zkoss.zul.Listbox getGridList()
Deprecated, for removal: This API element is subject to removal in a future version.
-
getCockpitLocaleService
public CockpitLocaleService getCockpitLocaleService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setCockpitLocaleService
public void setCockpitLocaleService(CockpitLocaleService cockpitLocaleService)
Deprecated, for removal: This API element is subject to removal in a future version.
-
getLocalizedValuesService
public LocalizedValuesService getLocalizedValuesService()
Deprecated, for removal: This API element is subject to removal in a future version.
-
setLocalizedValuesService
public void setLocalizedValuesService(LocalizedValuesService localizedValuesService)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-