Class 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 DefaultWidgetController
    Deprecated, for removal: This API element is subject to removal in a future version.
    Controller of the simple list widget.
    See Also:
    Serialized Form
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.lang.String COMP_ID_GRIDLIST
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String CONFIG_CTX_SIMPLE_LIST
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String ENTRY_DESCR
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String ENTRY_IMG_FALLBACK
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String ENTRY_IMG_URL
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String ENTRY_NAME
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String MODEL_PAGEABLE
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String MODEL_PAGEABLE_LIST
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SETTING_ASYNC
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SETTING_CONFIG_CONTEXT
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SETTING_MAX_ENTRY_LIMIT
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SETTING_PAGE_SIZE
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SETTING_VIEW_MODE
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SOCKET_IN_PAGEABLE
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SOCKET_IN_PAGEABLELIST
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      static java.lang.String SOCKET_OUT_SELECTEDITEM
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String VIEW_MODE_GRID
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      protected static java.lang.String VIEW_MODE_LIST
      Deprecated, for removal: This API element is subject to removal in a future version.
       
      • Fields 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, spaceScope
      • Fields inherited from class org.zkoss.zk.ui.util.GenericComposer

        _applied
    • Constructor Summary

      Constructors 
      Constructor Description
      SimpleListController()
      Deprecated, for removal: This API element is subject to removal in a future version.
       
    • 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
    • Constructor Detail

      • SimpleListController

        public SimpleListController()
        Deprecated, for removal: This API element is subject to removal in a future version.
    • 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: DefaultWidgetController
        Override this method to do initialization stuff for your widget, like initialize widget settings, restore view state from viewmodel, etc. This method will be invoked by DefaultWidgetController.doAfterCompose(Component) everytime your widget view is created. See GenericForwardComposer.doAfterCompose(Component) for more details.
        Overrides:
        initialize in class DefaultWidgetController
      • 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 invoking render(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 new PageableList object using the provided list objectList and the page size defined by the "pageSize" setting and then passes it on to setPageable(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 information
        genericObjectList - 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 rendered
        config - 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.