Interface LazyLoader

  • All Superinterfaces:
    java.lang.Cloneable, org.zkoss.zk.ui.Component, org.zkoss.zk.ui.ext.Scope, java.io.Serializable
    All Known Implementing Classes:
    DefaultLazyLoader

    public interface LazyLoader
    extends org.zkoss.zk.ui.Component
    A LazyLoader provides a mechanism for loading components in multiple steps instead of loading them all at once. This means that client applications don't have to wait for all components to be rendered before displaying content, thus eliminating the feeling of being "blocked" for longer periods of time.
    • Field Summary

      • Fields inherited from interface org.zkoss.zk.ui.Component

        APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPE
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void loadComponents()
      Loads the "lazy loaded" child components (see setLazyLoadChildren(List)) bit-by-bit i.e.
      void setLazyLoadChildren​(java.util.List<org.zkoss.zk.ui.Component> children)
      Sets the components which should be lazy loaded.
      void setLazyLoadParent​(org.zkoss.zk.ui.Component parent)
      Sets the parent component to be used for the lazy loaded child components.
      • Methods inherited from interface org.zkoss.zk.ui.Component

        addEventListener, addEventListener, addForward, addForward, addForward, addForward, appendChild, applyProperties, clone, detach, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getChildren, getClientAttribute, getClientDataAttribute, getDefinition, getDesktop, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRoot, getShadowVariable, getShadowVariable, getSpaceOwner, getStubonly, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttributeOrFellow, hasFellow, hasFellow, insertBefore, invalidate, isInvalidated, isListenerAvailable, isVisible, query, queryAll, removeAttribute, removeAttribute, removeChild, removeEventListener, removeForward, removeForward, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setTemplate, setVisible, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride
      • Methods inherited from interface org.zkoss.zk.ui.ext.Scope

        addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
    • Method Detail

      • setLazyLoadParent

        void setLazyLoadParent​(org.zkoss.zk.ui.Component parent)
        Sets the parent component to be used for the lazy loaded child components.
        Parameters:
        parent - component to which the lazy loaded child components will be attached
        See Also:
        setLazyLoadChildren(List), loadComponents()
      • setLazyLoadChildren

        void setLazyLoadChildren​(java.util.List<org.zkoss.zk.ui.Component> children)
        Sets the components which should be lazy loaded.

        When the loadComponents() method is called, the components in the specified list children will be attached to the lazy load parent (see setLazyLoadParent(Component)).

        Parameters:
        children - components which should be lazy loaded