Class GridView
- 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.model.general.impl.AbstractItemView
-
- de.hybris.platform.cockpit.model.gridview.impl.GridView
-
- All Implemented Interfaces:
UIItemView,UIViewComponent,UIGridView,java.io.Serializable,java.lang.Cloneable,org.zkoss.zk.ui.api.HtmlBasedComponent,org.zkoss.zk.ui.Component,org.zkoss.zk.ui.ext.Scope,org.zkoss.zk.ui.sys.ComponentCtrl
public class GridView extends AbstractItemView implements UIGridView
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.cockpit.model.general.impl.AbstractItemView
AbstractItemView.LoadImage
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringDEFAULT_GRIDVIEW_CONFprotected org.zkoss.zul.CheckboxfocusComponentprotected booleaninitializedstatic java.lang.StringITEM_BOX_SIZEprotected org.zkoss.zul.DivmainDivprotected MutableListModelmodel-
Fields inherited from class de.hybris.platform.cockpit.model.general.impl.AbstractItemView
loadingProgressContainer, ON_CONTINUE_LOADING
-
-
Constructor Summary
Constructors Constructor Description GridView()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddGridViewListener(GridViewListener listener)protected voidappendScrollIntoViewComponent(org.zkoss.zk.ui.HtmlBasedComponent cell)protected voidcontinueRenderItems(org.zkoss.zk.ui.Component parent, int index)protected voidcontinueRenderItems(org.zkoss.zk.ui.Component parent, int index, int numberOfItemsToRender)protected org.zkoss.zk.ui.HtmlBasedComponentcreateItemBox(TypedObject item, GridViewConfiguration config)protected voiddoUserEvent(java.lang.Object[] data)protected voidfireChangeSelection(int selectedIndex)protected voidfireChangeSelection(java.util.List<java.lang.Integer> selectedIndexes)protected voidfireRemove(java.util.Collection<java.lang.Integer> indexes)protected voidfocusFocusComponent()java.lang.StringgetConfigContextCode()GridItemRenderergetGridItemRenderer()protected TypedObjectgetItemAt(int index)MutableListModelgetModel()TypeServicegetTypeService()protected UIConfigurationServicegetUIConfigurationService()booleaninitialize()Initializes this view component.protected voidrangeSelect(int index)voidremoveGridViewListener(GridViewListener listener)protected voidremoveSelectedItems()protected voidrenderActivation(boolean selected)protected voidrenderItemAsActive(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean active)protected voidrenderItemAsSelected(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean selected)protected voidrenderItems(org.zkoss.zk.ui.Component parent)protected voidrenderSelection(boolean selected)protected voidrerenderItem(TypedObject item)voidsetConfigContextCode(java.lang.String code)voidsetGridItemRenderer(GridItemRenderer gridItemRenderer)voidsetModel(MutableListModel model)voidsetRootType(ObjectTemplate template)booleanupdate()Updates this view component completely.voidupdateActivation()Called whenever the activation needs to be updated i.e.voidupdateActiveItems()Called whenever the currently active items need to be re-rendered.intupdateItem(TypedObject item, java.util.Set<PropertyDescriptor> propertyDescriptors)try to update rows containing the specified itemsvoidupdateItems()Called whenever the items have changed in some way e.g.voidupdateSelection()Called whenever the selection is changed in some way and the view needs to update itself accordingly.-
Methods inherited from class de.hybris.platform.cockpit.model.general.impl.AbstractItemView
delayLazyload, getDDContext, getInitialPackageSize, getLazyloadPackageSize, isSimpleSelectionMode, setDDContext, setSimpleSelectionMode, setupLazyLoading
-
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
-
Methods inherited from interface org.zkoss.zk.ui.api.HtmlBasedComponent
focus, getHeight, getLeft, getSclass, getStyle, getTooltiptext, getTop, getWidth, getZclass, getZindex, getZIndex, setDraggable, setDroppable, setFocus, setHeight, setLeft, setSclass, setStyle, setTooltiptext, setTop, setWidth, setZclass, setZindex, setZIndex
-
Methods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttribute
-
Methods inherited from interface de.hybris.platform.cockpit.model.general.UIItemView
setDDContext
-
-
-
-
Field Detail
-
DEFAULT_GRIDVIEW_CONF
public static final java.lang.String DEFAULT_GRIDVIEW_CONF
- See Also:
- Constant Field Values
-
ITEM_BOX_SIZE
public static final java.lang.String ITEM_BOX_SIZE
- See Also:
- Constant Field Values
-
model
protected MutableListModel model
-
initialized
protected boolean initialized
-
mainDiv
protected org.zkoss.zul.Div mainDiv
-
focusComponent
protected org.zkoss.zul.Checkbox focusComponent
-
-
Method Detail
-
getConfigContextCode
public java.lang.String getConfigContextCode()
-
setConfigContextCode
public void setConfigContextCode(java.lang.String code)
- Specified by:
setConfigContextCodein interfaceUIGridView
-
addGridViewListener
public void addGridViewListener(GridViewListener listener)
- Specified by:
addGridViewListenerin interfaceUIGridView
-
removeGridViewListener
public void removeGridViewListener(GridViewListener listener)
- Specified by:
removeGridViewListenerin interfaceUIGridView
-
setRootType
public void setRootType(ObjectTemplate template)
- Specified by:
setRootTypein interfaceUIGridView
-
getModel
public MutableListModel getModel()
- Specified by:
getModelin interfaceUIGridView
-
setModel
public void setModel(MutableListModel model)
- Specified by:
setModelin interfaceUIGridView
-
updateActivation
public void updateActivation()
Description copied from interface:UIItemViewCalled whenever the activation needs to be updated i.e. which items are currently rendered as "active". Note: Does not re-render the items themselves, only the activation state of them. In order to update the items useUIItemView.updateActiveItems().- Specified by:
updateActivationin interfaceUIItemView
-
updateActiveItems
public void updateActiveItems()
Description copied from interface:UIItemViewCalled whenever the currently active items need to be re-rendered. Note: Does not update the activation itself. For that purpose useUIItemView.updateActivation().- Specified by:
updateActiveItemsin interfaceUIItemView- See Also:
UIItemView.updateActivation()
-
rerenderItem
protected void rerenderItem(TypedObject item)
-
updateItem
public int updateItem(TypedObject item, java.util.Set<PropertyDescriptor> propertyDescriptors)
Description copied from interface:UIItemViewtry to update rows containing the specified items- Specified by:
updateItemin interfaceUIItemView- Parameters:
item- the itempropertyDescriptors- modified properties- Returns:
- the number of updated rows
-
renderItemAsSelected
protected void renderItemAsSelected(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean selected)
-
renderItemAsActive
protected void renderItemAsActive(org.zkoss.zk.ui.HtmlBasedComponent comp, boolean active)
-
renderSelection
protected void renderSelection(boolean selected)
-
renderActivation
protected void renderActivation(boolean selected)
-
appendScrollIntoViewComponent
protected void appendScrollIntoViewComponent(org.zkoss.zk.ui.HtmlBasedComponent cell)
-
updateSelection
public void updateSelection()
Description copied from interface:UIItemViewCalled whenever the selection is changed in some way and the view needs to update itself accordingly.- Specified by:
updateSelectionin interfaceUIItemView
-
initialize
public boolean initialize()
Description copied from interface:UIViewComponentInitializes this view component. Note: Should not be called during object creation i.e. from constructor.- Specified by:
initializein interfaceUIViewComponent- Returns:
trueif initialize was successful,falseotherwise
-
update
public boolean update()
Description copied from interface:UIViewComponentUpdates this view component completely.- Specified by:
updatein interfaceUIViewComponent- Returns:
trueif update was successful,falseotherwise
-
updateItems
public void updateItems()
Description copied from interface:UIItemViewCalled whenever the items have changed in some way e.g. an item has been added or removed.- Specified by:
updateItemsin interfaceUIItemView
-
focusFocusComponent
protected void focusFocusComponent()
-
renderItems
protected void renderItems(org.zkoss.zk.ui.Component parent)
-
continueRenderItems
protected void continueRenderItems(org.zkoss.zk.ui.Component parent, int index)
-
continueRenderItems
protected void continueRenderItems(org.zkoss.zk.ui.Component parent, int index, int numberOfItemsToRender)
-
rangeSelect
protected void rangeSelect(int index)
-
createItemBox
protected org.zkoss.zk.ui.HtmlBasedComponent createItemBox(TypedObject item, GridViewConfiguration config)
-
getItemAt
protected TypedObject getItemAt(int index)
-
removeSelectedItems
protected void removeSelectedItems()
-
fireRemove
protected void fireRemove(java.util.Collection<java.lang.Integer> indexes)
-
fireChangeSelection
protected void fireChangeSelection(java.util.List<java.lang.Integer> selectedIndexes)
-
fireChangeSelection
protected void fireChangeSelection(int selectedIndex)
-
doUserEvent
protected void doUserEvent(java.lang.Object[] data)
-
getUIConfigurationService
protected UIConfigurationService getUIConfigurationService()
-
setGridItemRenderer
public void setGridItemRenderer(GridItemRenderer gridItemRenderer)
- Specified by:
setGridItemRendererin interfaceUIGridView
-
getGridItemRenderer
public GridItemRenderer getGridItemRenderer()
-
getTypeService
public TypeService getTypeService()
-
-