Package de.hybris.platform.cockpit.util
Class DefaultLazyLoader
- java.lang.Object
-
- org.zkoss.zk.ui.AbstractComponent
-
- org.zkoss.zk.ui.HtmlBasedComponent
-
- org.zkoss.zul.impl.XulElement
-
- org.zkoss.zul.Div
-
- de.hybris.platform.cockpit.util.DefaultLazyLoader
-
- All Implemented Interfaces:
LazyLoader,java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
public class DefaultLazyLoader extends org.zkoss.zul.Div implements LazyLoader
DefaultLazyLoaderimplementation. This implementation loads all lazy loaded components one-by-one, by the use of multiple echo events sent between server and client.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DefaultLazyLoader(org.zkoss.zk.ui.Component container, java.util.List<org.zkoss.zk.ui.Component> components)Creates a new DefaultLazyLoader instance with the specified lazy load parent and child components.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.zkoss.zk.ui.event.EventListenergetLazyListener()voidloadComponents()Loads the "lazy loaded" child components (seeLazyLoader.setLazyLoadChildren(List)) bit-by-bit i.e.voidsetLazyLoadChildren(java.util.List<org.zkoss.zk.ui.Component> children)Sets the components which should be lazy loaded.voidsetLazyLoadParent(org.zkoss.zk.ui.Component parent)Sets the parent component to be used for the lazy loaded child components.-
Methods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributes
-
Methods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, service, setAction, setClass, setDraggable, setDroppable, setFocus, setHeight, setHeight0, setHeightDirectly, setHflex, setHflex0, setHflexDirectly, setLeft, setLeftDirectly, setRenderdefer, setSclass, setStyle, setTabindex, setTabindex, setTooltiptext, setTop, setTopDirectly, setVflex, setVflex0, setVflexDirectly, setWidth, setWidth0, setWidthDirectly, setZclass, setZindex, setZIndex, setZIndexDirectly
-
Methods inherited from class org.zkoss.zk.ui.AbstractComponent
addAnnotation, addAnnotation, addCallback, addClientEvent, addEventHandler, addEventListener, addEventListener, addForward, addForward, addForward, addForward, addMoved, addRedrawCallback, addScopeListener, addShadowRoot, addShadowRootBefore, addSharedEventHandlerMap, appendChild, applyProperties, beforeChildAdded, beforeChildRemoved, beforeParentChanged, detach, didActivate, didActivate, didDeserialize, didDeserialize, disableBindingAnnotation, disableClientUpdate, enableBindingAnnotation, equals, getAnnotatedProperties, getAnnotatedPropertiesBy, getAnnotation, getAnnotation, getAnnotations, getAnnotations, getAnnotations, getAttribute, getAttribute, getAttribute, getAttributeOrFellow, getAttributes, getAttributes, getAuService, getAutag, getCallback, getChildren, getClientAttribute, getClientDataAttribute, getClientEvents, getDefaultMold, getDefinition, getDesktop, getEventHandler, getEventHandlerNames, getEventListenerMap, getEventListeners, getFellow, getFellow, getFellowIfAny, getFellowIfAny, getFellows, getFirstChild, getId, getLastChild, getListenerIterator, getMold, getNextSibling, getPage, getParent, getPreviousSibling, getRedrawCallback, getRoot, getShadowFellowIfAny, getShadowRoots, getShadowVariable, getShadowVariable, getShadowVariable0, getSpaceOwner, getSpecialRendererOutput, getStubonly, getSubBindingAnnotationCount, getTemplate, getTemplateNames, getUuid, getWidgetAttribute, getWidgetAttributeNames, getWidgetClass, getWidgetListener, getWidgetListenerNames, getWidgetOverride, getWidgetOverrideNames, hasAttribute, hasAttribute, hasAttribute, hasAttributeOrFellow, hasBindingAnnotation, hasFellow, hasFellow, hasSubBindingAnnotation, insertBefore, invalidate, isChildable, isInvalidated, isListenerAvailable, isVisible, onChildAdded, onChildRemoved, onPageAttached, onPageDetached, onWrongValue, query, queryAll, redraw, redrawChildren, removeAttribute, removeAttribute, removeAttribute, removeCallback, removeChild, removeEventListener, removeForward, removeForward, removeRedrawCallback, removeScopeListener, removeShadowRoot, render, render, render, replace, response, response, response, service, sessionDidActivate, sessionWillPassivate, setAttribute, setAttribute, setAttribute, setAuService, setAutag, setClientAttribute, setClientDataAttribute, setDefinition, setDefinition, setId, setMold, setPage, setPageBefore, setParent, setStubonly, setStubonly, setSubBindingAnnotationCount, setTemplate, setVisible, setVisibleDirectly, setWidgetAttribute, setWidgetClass, setWidgetListener, setWidgetOverride, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdate, smartUpdateWidgetListener, smartUpdateWidgetOverride, toString, updateByClient, updateSubBindingAnnotationCount, willPassivate, willPassivate, willSerialize, willSerialize
-
Methods inherited from class java.lang.Object
finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
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
-
-
-
-
Constructor Detail
-
DefaultLazyLoader
public DefaultLazyLoader(org.zkoss.zk.ui.Component container, java.util.List<org.zkoss.zk.ui.Component> components)Creates a new DefaultLazyLoader instance with the specified lazy load parent and child components.- Parameters:
container- component to which the lazy loaded child components will be attachedcomponents- components which should be lazy loaded
-
-
Method Detail
-
loadComponents
public void loadComponents()
Loads the "lazy loaded" child components (seeLazyLoader.setLazyLoadChildren(List)) bit-by-bit i.e. attaches the components to the lazy load parent (seeLazyLoader.setLazyLoadParent(Component)) in multiple event cycles. The default implementation loads components one-by-one using multiple echo events between server and client.- Specified by:
loadComponentsin interfaceLazyLoader
-
setLazyLoadChildren
public void setLazyLoadChildren(java.util.List<org.zkoss.zk.ui.Component> children)
Description copied from interface:LazyLoaderSets the components which should be lazy loaded. When theLazyLoader.loadComponents()method is called, the components in the specified list children will be attached to the lazy load parent (seeLazyLoader.setLazyLoadParent(Component)).- Specified by:
setLazyLoadChildrenin interfaceLazyLoader- Parameters:
children- components which should be lazy loaded
-
setLazyLoadParent
public void setLazyLoadParent(org.zkoss.zk.ui.Component parent)
Description copied from interface:LazyLoaderSets the parent component to be used for the lazy loaded child components.- Specified by:
setLazyLoadParentin interfaceLazyLoader- Parameters:
parent- component to which the lazy loaded child components will be attached- See Also:
LazyLoader.setLazyLoadChildren(List),LazyLoader.loadComponents()
-
getLazyListener
protected org.zkoss.zk.ui.event.EventListener getLazyListener()
-
-