Class BundleNavigationNodeContentMainComponent
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.configurablebundlecockpits.productcockpit.session.impl.BundleNavigationNodeContentMainComponent
- All Implemented Interfaces:
BrowserComponent,CockpitComponent,DesktopRemovalAwareComponent,Serializable,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
Represents main component for navigation node perspective.
Note:
Component contains hierarchical representation of Navigation Nodes.
Component contains hierarchical representation of Navigation Nodes.
- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent
org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrlNested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent
org.zkoss.zk.ui.AbstractComponent.Children -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final Stringprotected static final StringFields inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
EMPTY_MESSAGE, lastResultType, listComponentModel, loginService, mainArea, resultModel, typeService, uiConfigurationServiceFields 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, initialized, MAIN_AREA_BL_SCLASS, MINIMIZE_BTN_IMG, SAVE_QUERY_BTN_IMG, SEARCH_MAGNIFIER_BTN_IMG, SPLIT_ACTIVE_BTN_IMG, SPLIT_INACTIVE_BTN_IMGFields inherited from class org.zkoss.zk.ui.HtmlBasedComponent
_zclassFields inherited from interface org.zkoss.zk.ui.Component
APPLICATION_SCOPE, COMPONENT_SCOPE, DESKTOP_SCOPE, PAGE_SCOPE, REQUEST_SCOPE, SESSION_SCOPE, SPACE_SCOPEFields inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
AFTER_CHILD_ADDED, AFTER_CHILD_REMOVED, AFTER_PAGE_ATTACHED, AFTER_PAGE_DETACHED, CE_BUSY_IGNORE, CE_DUPLICATE_IGNORE, CE_IMPORTANT, CE_NON_DEFERRABLE, CE_REPEAT_IGNORE -
Constructor Summary
ConstructorsConstructorDescriptionBundleNavigationNodeContentMainComponent(AdvancedBrowserModel model, AbstractContentBrowser contentBrowser) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidcleanup()protected org.zkoss.zul.ButtoncreateAddBundleButton(CatalogVersionModel catalogVersion) Creates button for adding a new bundleprotected org.zkoss.zul.ButtonCreates button for creating new items inside selected node.protected org.zkoss.zk.ui.ComponentcreateAddItemButtonContainer(org.zkoss.zul.Button addItemButton) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.protected voidcreateBlankArea(String message, org.zkoss.zk.ui.Component parent) Creates blank main area with given message.protected org.zkoss.zk.ui.ComponentcreateButtonContainer(org.zkoss.zul.Button button) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.protected org.zkoss.zul.Divprotected voidcreateMessageArea(String title, String message, org.zkoss.zk.ui.Component parent) Creates message area with title and textprotected org.zkoss.zk.ui.ComponentcreateProductActionButtonContainer(org.zkoss.zul.Button searchProductButton, org.zkoss.zul.Button addProductButton) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.protected ListboxcreateRelatedItemList(TypedObject naviNode) Creates a content item list for right column of main area component.protected org.zkoss.zk.ui.ComponentcreateRelatedItemListContainer(Listbox relatedItemList) Creates container which displays node content.protected org.zkoss.zul.ButtonCreates button for opening a product search listviewprotected TreecreateTree(CatalogVersionModel catVer) Creates tree with.protected TreeControllercreateTreeController(org.zkoss.zk.ui.Component relatedItemListContainer, BundleRelatedItemListController relatedItemListController, Listbox listbox, org.zkoss.zul.Button addItemButton, org.zkoss.zul.Button searchProductButton) Creates a controller for a tree component.voidTriggers adding root navigation node.protected Set<ObjectType>Returns aSetof product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.protected UIItemViewgetModel()protected BundleNavigationNodeControllerReturnsBundleNavigationNodeControllerconfigured via spring.protected org.zkoss.zul.TreeitemRenderergetNavigationNodeRenderer(TreeController controller) ReturnsTreeitemRendererconfigured via spring.protected BundleRelatedItemListControllerReturnsListboxControllerconfigured via spring.protected voidinitTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent) Initialize a whole tree component with its dependencies.protected voidrefreshAddItemButton(Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button addItemButton) Refreshes a item button after selection was done in the tree.protected voidrefreshRelatedItemList(org.zkoss.zk.ui.Component parent, Listbox listBox, BundleRelatedItemListController controller) Refreshes a content item list after selection was done in the tree.protected voidrefreshSearchProductButton(Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button searchProductButton) Refreshes search product button after selection was done in the tree.voidTriggers remove selected navigation node.protected voidrenderMainAreaComponent(org.zkoss.zk.ui.Component parent) Constructs and renders main browse area component for navigation node perspective.protected voidrenderTreeComponent(Tree tree, org.zkoss.zk.ui.Component contentItemListContainer, org.zkoss.zk.ui.Component productActionButtonContainer, org.zkoss.zk.ui.Component addBundleActionButtonContainer, org.zkoss.zk.ui.Component parent) Creates left (with tree) and right (with node content) container, also 'add item' button.booleanupdate()Updates this browser component i.e.protected voidupdateMainAreaCompoenent(org.zkoss.zk.ui.Component parent) protected voidupdateTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent) protected voidUpdates the tree setting actual modelMethods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
createTableController, desktopRemoved, detach, getLoginService, getResultModel, getRootType, getTableModel, getTypeService, getUIConfigurationService, initialize, loadListModel, resetSelection, resize, setActiveItem, setParent, setTableModel, updateActiveItems, updateItem, updateResult, updateSelectedItemsMethods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
getContentBrowser, setModel, updateItemMethods inherited from class org.zkoss.zul.Div
getAlign, renderProperties, setAlignMethods inherited from class org.zkoss.zul.impl.XulElement
clone, getContext, getCtrlKeys, getPopup, getPropertyAccess, getTooltip, setContext, setContext, setContextAttributes, setCtrlKeys, setPopup, setPopup, setPopupAttributes, setTooltip, setTooltip, setTooltipAttributesMethods inherited from class org.zkoss.zk.ui.HtmlBasedComponent
addSclass, evalCSSFlex, focus, getAction, getDraggable, getDroppable, getExtraCtrl, getHeight, getHflex, getLeft, getRenderdefer, getSclass, getStyle, getTabindex, getTabindexInteger, getTooltiptext, getTop, getVflex, getWidth, getZclass, getZindex, getZIndex, removeSclass, removeSclass, 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, setZIndexDirectlyMethods 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, 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, invalidatePartial, isChildable, isInitialized, 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, willSerializeMethods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods 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, setWidgetOverrideMethods inherited from interface org.zkoss.zk.ui.sys.ComponentCtrl
invalidatePartialMethods inherited from interface org.zkoss.zul.api.Div
getAlign, setAlignMethods 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, setZIndexMethods inherited from interface org.zkoss.zk.ui.ext.Scope
addScopeListener, getAttribute, hasAttribute, removeAttribute, removeScopeListener, setAttributeMethods inherited from interface org.zkoss.zul.impl.api.XulElement
getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
-
Field Details
-
RELATED_ITEMS_LIST_SCLASS
- See Also:
-
NAVIGATION_TREE_SCLASS
- See Also:
-
NAVIGATION_TREE_PANEL_SCLASS
- See Also:
-
ROOT_NAVIGATION_CNT_SCLASS
- See Also:
-
ROOT_NAVIGATION_SUB_CNT_SCLASS
- See Also:
-
NAVIGATION_SECTION_CONTAINER_LEFT_SCLASS
- See Also:
-
NAVIGATION_SECTION_CONTAINER_RIGHT_SCLASS
- See Also:
-
RELATED_ITEMS_CONTAINER_SCLASS
- See Also:
-
ADD_RELATED_ITEMS_BTG_SCLASS
- See Also:
-
MARGIN_HELPER_SCLASS
- See Also:
-
ADD_PRODUCT_LABEL
- See Also:
-
ADD_BUNDLE_LABEL
- See Also:
-
ADD_BUNDLE_TOOLTIP
- See Also:
-
SEARCH_PRODUCT_LABEL
- See Also:
-
INFO_AREA_DIV_ID
- See Also:
-
-
Constructor Details
-
BundleNavigationNodeContentMainComponent
public BundleNavigationNodeContentMainComponent(AdvancedBrowserModel model, AbstractContentBrowser contentBrowser)
-
-
Method Details
-
initTreeComponent
protected void initTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent) Initialize a whole tree component with its dependencies.- Parameters:
catalogVersion- current catalog versionparent- a parent for component
-
updateTreeComponent
protected void updateTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent) -
renderTreeComponent
protected void renderTreeComponent(Tree tree, org.zkoss.zk.ui.Component contentItemListContainer, org.zkoss.zk.ui.Component productActionButtonContainer, org.zkoss.zk.ui.Component addBundleActionButtonContainer, org.zkoss.zk.ui.Component parent) Creates left (with tree) and right (with node content) container, also 'add item' button.- Parameters:
tree- tree componentcontentItemListContainer- node content parentproductActionButtonContainer-parent- add page button parent
-
createMainArea
protected org.zkoss.zul.Div createMainArea()- Specified by:
createMainAreain classAbstractMainAreaBrowserComponent
-
renderMainAreaComponent
protected void renderMainAreaComponent(org.zkoss.zk.ui.Component parent) Constructs and renders main browse area component for navigation node perspective.- Parameters:
parent- a component parent
-
updateMainAreaCompoenent
protected void updateMainAreaCompoenent(org.zkoss.zk.ui.Component parent) -
update
public boolean update()Description copied from class:AbstractBrowserComponentUpdates this browser component i.e. synchronizes its view width the underlying model.- Specified by:
updatein interfaceCockpitComponent- Specified by:
updatein classAbstractBrowserComponent- Returns:
trueif this browser was successfully updated,falseotherwise
-
getModel
- Specified by:
getModelin interfaceBrowserComponent- Overrides:
getModelin classAbstractMainAreaBrowserComponent
-
getCurrentItemView
- Specified by:
getCurrentItemViewin classAbstractMainAreaBrowserComponent
-
cleanup
protected void cleanup()- Specified by:
cleanupin classAbstractMainAreaBrowserComponent
-
createAddItemButtonContainer
protected org.zkoss.zk.ui.Component createAddItemButtonContainer(org.zkoss.zul.Button addItemButton) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.- Parameters:
addItemButton- add page button
-
createButtonContainer
protected org.zkoss.zk.ui.Component createButtonContainer(org.zkoss.zul.Button button) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.- Parameters:
button- add page button
-
createProductActionButtonContainer
protected org.zkoss.zk.ui.Component createProductActionButtonContainer(org.zkoss.zul.Button searchProductButton, org.zkoss.zul.Button addProductButton) Just a box around button so that it can be aligned to the bottom right corner of enclosing component.- Parameters:
searchProductButton- add page buttonaddProductButton- add page button
-
createRelatedItemList
Creates a content item list for right column of main area component. -
createAddItemButton
protected org.zkoss.zul.Button createAddItemButton()Creates button for creating new items inside selected node. -
createSearchProductButton
protected org.zkoss.zul.Button createSearchProductButton()Creates button for opening a product search listview -
createAddBundleButton
Creates button for adding a new bundle -
createRelatedItemListContainer
Creates container which displays node content.- Parameters:
relatedItemList- content item list
-
updateTreeModel
protected void updateTreeModel()Updates the tree setting actual model -
createTree
Creates tree with. -
createBlankArea
Creates blank main area with given message.- Parameters:
message- given messageparent- a parent component
-
createMessageArea
Creates message area with title and text- Parameters:
title- title textmessage- given messageparent- a parent component
-
refreshAddItemButton
protected void refreshAddItemButton(Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button addItemButton) Refreshes a item button after selection was done in the tree.- Parameters:
selectedItems- currently selected itemsaddItemButton- add item button
-
refreshSearchProductButton
protected void refreshSearchProductButton(Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button searchProductButton) Refreshes search product button after selection was done in the tree.- Parameters:
selectedItems- currently selected itemssearchProductButton- add item button
-
getRelatedItemListController
ReturnsListboxControllerconfigured via spring. -
getAllowedProductTypes
Returns aSetof product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.
-