Class AbstractSectionMainAreaBrowserComponent
- 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.components.contentbrowser.AbstractBrowserComponent
-
- de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
-
- de.hybris.platform.cockpit.components.contentbrowser.AbstractSectionMainAreaBrowserComponent
-
- All Implemented Interfaces:
BrowserComponent
,CockpitComponent
,DesktopRemovalAwareComponent
,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
,org.zkoss.zul.api.Div
,org.zkoss.zul.impl.api.XulElement
- Direct Known Subclasses:
DefaultSectionMainAreaBrowserComponent
public abstract class AbstractSectionMainAreaBrowserComponent extends AbstractMainAreaBrowserComponent
- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean
initialized
protected org.zkoss.zkex.zul.Borderlayout
mainArea
protected java.util.Map<BrowserSectionModel,BrowserComponent>
sectionMap
-
Fields inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
EMPTY_MESSAGE, lastResultType, listComponentModel, loginService, resultModel, typeService, uiConfigurationService
-
Fields inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
ADV_QUERY_BTN_ACTIVE_IMG, ADV_QUERY_BTN_IMG, BROWSER_TOOLBAR_SCLASS, CLOSE_BTN_IMG, CONTENT_BROWSER_GB_SCLASS, CONTENT_BROWSER_STICKY_GB_SCLASS, DUPLICATE_BTN_IMG, MAIN_AREA_BL_SCLASS, MINIMIZE_BTN_IMG, SAVE_QUERY_BTN_IMG, SEARCH_MAGNIFIER_BTN_IMG, SPLIT_ACTIVE_BTN_IMG, SPLIT_INACTIVE_BTN_IMG
-
-
Constructor Summary
Constructors Constructor Description AbstractSectionMainAreaBrowserComponent(SectionBrowserModel model, AbstractContentBrowser contentBrowser)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected void
cleanup()
protected org.zkoss.zkex.zul.Borderlayout
createMainBorderLayout()
protected java.util.Map<BrowserSectionModel,BrowserComponent>
createSections()
void
desktopRemoved(org.zkoss.zk.ui.Desktop desktop)
void
detach()
SectionBrowserModel
getModel()
protected SectionModelListener
getSectionModelListener()
boolean
initialize()
Initializes this browser component i.e.protected boolean
isInitialized()
protected abstract void
layoutSections(java.util.List<BrowserSectionModel> sectionModels, org.zkoss.zk.ui.HtmlBasedComponent parent)
Responsible for laying out the different sections.void
resize()
Notifies this browser component that it should resize itself if possible, since the view state might require it.void
setActiveItem(TypedObject activeItem)
Sets the active item of this browser component toactiveItem
.void
setParent(org.zkoss.zk.ui.Component parent)
void
setSectionModelListener(SectionModelListener sectionModelListener)
Sets the section model listener to be used by this view component in order to keep its state up to date.boolean
update()
Updates this browser component i.e.void
updateActiveItems()
Re-renders the currently active item(s).void
updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)
Re-renders the item.void
updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties, java.lang.Object reason)
Override if you want to react on the reason for the updatevoid
updateSection(BrowserSectionModel sectionModel)
void
updateSectionSelection(BrowserSectionModel sectionModel)
-
Methods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
createMainArea, createTableController, getCurrentItemView, getLoginService, getResultModel, getRootType, getTableModel, getTypeService, getUIConfigurationService, loadListModel, resetSelection, setTableModel, updateResult, updateSelectedItems
-
Methods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
getContentBrowser, setModel
-
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, 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, 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, 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, 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
-
-
-
-
Field Detail
-
sectionMap
protected transient java.util.Map<BrowserSectionModel,BrowserComponent> sectionMap
-
mainArea
protected transient org.zkoss.zkex.zul.Borderlayout mainArea
-
initialized
protected boolean initialized
-
-
Constructor Detail
-
AbstractSectionMainAreaBrowserComponent
public AbstractSectionMainAreaBrowserComponent(SectionBrowserModel model, AbstractContentBrowser contentBrowser)
-
-
Method Detail
-
initialize
public boolean initialize()
Description copied from class:AbstractBrowserComponent
Initializes this browser component i.e. creates all required components, adds event listeners etc. Implementation note: Remember to set theinitialized
flag totrue
after this method has been called. Note: This method is automatically called when a model or browser controller is set.- Specified by:
initialize
in interfaceCockpitComponent
- Overrides:
initialize
in classAbstractMainAreaBrowserComponent
- Returns:
true
if initialization was successful,false
otherwise- See Also:
AbstractBrowserComponent.setModel(BrowserModel)
-
createMainBorderLayout
protected org.zkoss.zkex.zul.Borderlayout createMainBorderLayout()
-
layoutSections
protected abstract void layoutSections(java.util.List<BrowserSectionModel> sectionModels, org.zkoss.zk.ui.HtmlBasedComponent parent)
Responsible for laying out the different sections.- Parameters:
sectionModels
- the sections to be renderedparent
- the parent component to which the sections should be added
-
update
public boolean update()
Description copied from class:AbstractBrowserComponent
Updates this browser component i.e. synchronizes its view width the underlying model.- Specified by:
update
in interfaceCockpitComponent
- Specified by:
update
in classAbstractBrowserComponent
- Returns:
true
if this browser was successfully updated,false
otherwise
-
getModel
public SectionBrowserModel getModel()
- Specified by:
getModel
in interfaceBrowserComponent
- Overrides:
getModel
in classAbstractMainAreaBrowserComponent
-
updateItem
public void updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties, java.lang.Object reason)
Description copied from class:AbstractBrowserComponent
Override if you want to react on the reason for the update- Overrides:
updateItem
in classAbstractBrowserComponent
reason
- the reason for the update
-
updateItem
public void updateItem(TypedObject item, java.util.Set<PropertyDescriptor> modifiedProperties)
Description copied from class:AbstractBrowserComponent
Re-renders the item.- Specified by:
updateItem
in interfaceCockpitComponent
- Overrides:
updateItem
in classAbstractMainAreaBrowserComponent
- Parameters:
item
- the item to be re-renderedmodifiedProperties
- modified properties
-
updateSection
public void updateSection(BrowserSectionModel sectionModel)
-
updateSectionSelection
public void updateSectionSelection(BrowserSectionModel sectionModel)
-
resize
public void resize()
Description copied from class:AbstractBrowserComponent
Notifies this browser component that it should resize itself if possible, since the view state might require it. This is typically only necessary for ZK'sBorderlayout
components.- Overrides:
resize
in classAbstractMainAreaBrowserComponent
-
setActiveItem
public void setActiveItem(TypedObject activeItem)
Description copied from class:AbstractBrowserComponent
Sets the active item of this browser component toactiveItem
.- Specified by:
setActiveItem
in interfaceCockpitComponent
- Overrides:
setActiveItem
in classAbstractMainAreaBrowserComponent
- Parameters:
activeItem
- the new active item
-
updateActiveItems
public void updateActiveItems()
Description copied from class:AbstractBrowserComponent
Re-renders the currently active item(s).- Specified by:
updateActiveItems
in interfaceCockpitComponent
- Overrides:
updateActiveItems
in classAbstractMainAreaBrowserComponent
-
createSections
protected java.util.Map<BrowserSectionModel,BrowserComponent> createSections()
-
setSectionModelListener
public void setSectionModelListener(SectionModelListener sectionModelListener)
Sets the section model listener to be used by this view component in order to keep its state up to date. Note: This listener should be used internally for updating this view components state when the underlying model changes.- Parameters:
sectionModelListener
-
-
getSectionModelListener
protected SectionModelListener getSectionModelListener()
-
isInitialized
protected boolean isInitialized()
-
setParent
public void setParent(org.zkoss.zk.ui.Component parent)
- Specified by:
setParent
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
setParent
in classAbstractMainAreaBrowserComponent
-
detach
public void detach()
- Specified by:
detach
in interfaceorg.zkoss.zk.ui.Component
- Overrides:
detach
in classAbstractMainAreaBrowserComponent
-
desktopRemoved
public void desktopRemoved(org.zkoss.zk.ui.Desktop desktop)
- Specified by:
desktopRemoved
in interfaceDesktopRemovalAwareComponent
- Overrides:
desktopRemoved
in classAbstractMainAreaBrowserComponent
-
cleanup
protected void cleanup()
- Specified by:
cleanup
in classAbstractMainAreaBrowserComponent
-
-