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
,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
public class BundleNavigationNodeContentMainComponent extends AbstractMainAreaBrowserComponent
Represents main component for navigation node perspective. Note:
Component contains hierarchical representation of Navigation Nodes.- See Also:
- Serialized Form
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ADD_BUNDLE_LABEL
protected static java.lang.String
ADD_BUNDLE_TOOLTIP
protected static java.lang.String
ADD_PRODUCT_LABEL
protected static java.lang.String
ADD_RELATED_ITEMS_BTG_SCLASS
protected static java.lang.String
INFO_AREA_DIV_ID
protected static java.lang.String
MARGIN_HELPER_SCLASS
protected static java.lang.String
NAVIGATION_SECTION_CONTAINER_LEFT_SCLASS
protected static java.lang.String
NAVIGATION_SECTION_CONTAINER_RIGHT_SCLASS
protected static java.lang.String
NAVIGATION_TREE_PANEL_SCLASS
protected static java.lang.String
NAVIGATION_TREE_SCLASS
protected static java.lang.String
RELATED_ITEMS_CONTAINER_SCLASS
protected static java.lang.String
RELATED_ITEMS_LIST_SCLASS
protected static java.lang.String
ROOT_NAVIGATION_CNT_SCLASS
protected static java.lang.String
ROOT_NAVIGATION_SUB_CNT_SCLASS
protected static java.lang.String
SEARCH_PRODUCT_LABEL
-
Fields inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractMainAreaBrowserComponent
EMPTY_MESSAGE, lastResultType, listComponentModel, loginService, mainArea, 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, initialized, 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 BundleNavigationNodeContentMainComponent(AdvancedBrowserModel model, AbstractContentBrowser contentBrowser)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
cleanup()
protected org.zkoss.zul.Button
createAddBundleButton(CatalogVersionModel catalogVersion)
Creates button for adding a new bundleprotected org.zkoss.zul.Button
createAddItemButton()
Creates button for creating new items inside selected node.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.protected void
createBlankArea(java.lang.String message, org.zkoss.zk.ui.Component parent)
Creates blank main area with given message.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.protected org.zkoss.zul.Div
createMainArea()
protected void
createMessageArea(java.lang.String title, java.lang.String message, org.zkoss.zk.ui.Component parent)
Creates message area with title and textprotected 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.protected Listbox
createRelatedItemList(TypedObject naviNode)
Creates a content item list for right column of main area component.protected org.zkoss.zk.ui.Component
createRelatedItemListContainer(Listbox relatedItemList)
Creates container which displays node content.protected org.zkoss.zul.Button
createSearchProductButton()
Creates button for opening a product search listviewprotected Tree
createTree(CatalogVersionModel catVer)
Creates tree with.protected TreeController
createTreeController(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.void
fireAddRootNavigationNode()
Triggers adding root navigation node.protected java.util.Set<ObjectType>
getAllowedProductTypes()
Returns aSet
of product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.protected UIItemView
getCurrentItemView()
BundleNavigationNodeBrowserModel
getModel()
protected BundleNavigationNodeController
getNavigationNodeController()
ReturnsBundleNavigationNodeController
configured via spring.protected org.zkoss.zul.TreeitemRenderer
getNavigationNodeRenderer(TreeController controller)
ReturnsTreeitemRenderer
configured via spring.protected BundleRelatedItemListController
getRelatedItemListController()
ReturnsListboxController
configured via spring.protected void
initTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent)
Initialize a whole tree component with its dependencies.protected void
refreshAddItemButton(java.util.Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button addItemButton)
Refreshes a item button after selection was done in the tree.protected void
refreshRelatedItemList(org.zkoss.zk.ui.Component parent, Listbox listBox, BundleRelatedItemListController controller)
Refreshes a content item list after selection was done in the tree.protected void
refreshSearchProductButton(java.util.Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button searchProductButton)
Refreshes search product button after selection was done in the tree.void
removeSelectedNavigationNode()
Triggers remove selected navigation node.protected void
renderMainAreaComponent(org.zkoss.zk.ui.Component parent)
Constructs and renders main browse area component for navigation node perspective.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.boolean
update()
Updates this browser component i.e.protected void
updateMainAreaCompoenent(org.zkoss.zk.ui.Component parent)
protected void
updateTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent)
protected void
updateTreeModel()
Updates the tree setting actual model-
Methods 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, updateSelectedItems
-
Methods inherited from class de.hybris.platform.cockpit.components.contentbrowser.AbstractBrowserComponent
getContentBrowser, setModel, updateItem
-
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
-
RELATED_ITEMS_LIST_SCLASS
protected static final java.lang.String RELATED_ITEMS_LIST_SCLASS
- See Also:
- Constant Field Values
-
NAVIGATION_TREE_SCLASS
protected static final java.lang.String NAVIGATION_TREE_SCLASS
- See Also:
- Constant Field Values
-
NAVIGATION_TREE_PANEL_SCLASS
protected static final java.lang.String NAVIGATION_TREE_PANEL_SCLASS
- See Also:
- Constant Field Values
-
ROOT_NAVIGATION_CNT_SCLASS
protected static final java.lang.String ROOT_NAVIGATION_CNT_SCLASS
- See Also:
- Constant Field Values
-
ROOT_NAVIGATION_SUB_CNT_SCLASS
protected static final java.lang.String ROOT_NAVIGATION_SUB_CNT_SCLASS
- See Also:
- Constant Field Values
-
NAVIGATION_SECTION_CONTAINER_LEFT_SCLASS
protected static final java.lang.String NAVIGATION_SECTION_CONTAINER_LEFT_SCLASS
- See Also:
- Constant Field Values
-
NAVIGATION_SECTION_CONTAINER_RIGHT_SCLASS
protected static final java.lang.String NAVIGATION_SECTION_CONTAINER_RIGHT_SCLASS
- See Also:
- Constant Field Values
-
RELATED_ITEMS_CONTAINER_SCLASS
protected static final java.lang.String RELATED_ITEMS_CONTAINER_SCLASS
- See Also:
- Constant Field Values
-
ADD_RELATED_ITEMS_BTG_SCLASS
protected static final java.lang.String ADD_RELATED_ITEMS_BTG_SCLASS
- See Also:
- Constant Field Values
-
MARGIN_HELPER_SCLASS
protected static final java.lang.String MARGIN_HELPER_SCLASS
- See Also:
- Constant Field Values
-
ADD_PRODUCT_LABEL
protected static final java.lang.String ADD_PRODUCT_LABEL
- See Also:
- Constant Field Values
-
ADD_BUNDLE_LABEL
protected static final java.lang.String ADD_BUNDLE_LABEL
- See Also:
- Constant Field Values
-
ADD_BUNDLE_TOOLTIP
protected static final java.lang.String ADD_BUNDLE_TOOLTIP
- See Also:
- Constant Field Values
-
SEARCH_PRODUCT_LABEL
protected static final java.lang.String SEARCH_PRODUCT_LABEL
- See Also:
- Constant Field Values
-
INFO_AREA_DIV_ID
protected static final java.lang.String INFO_AREA_DIV_ID
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
BundleNavigationNodeContentMainComponent
public BundleNavigationNodeContentMainComponent(AdvancedBrowserModel model, AbstractContentBrowser contentBrowser)
-
-
Method Detail
-
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:
createMainArea
in 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: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
-
fireAddRootNavigationNode
public void fireAddRootNavigationNode()
Triggers adding root navigation node.
-
removeSelectedNavigationNode
public void removeSelectedNavigationNode()
Triggers remove selected navigation node.
-
getModel
public BundleNavigationNodeBrowserModel getModel()
- Specified by:
getModel
in interfaceBrowserComponent
- Overrides:
getModel
in classAbstractMainAreaBrowserComponent
-
getCurrentItemView
protected UIItemView getCurrentItemView()
- Specified by:
getCurrentItemView
in classAbstractMainAreaBrowserComponent
-
cleanup
protected void cleanup()
- Specified by:
cleanup
in classAbstractMainAreaBrowserComponent
-
createTreeController
protected TreeController createTreeController(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.
-
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
protected Listbox createRelatedItemList(TypedObject naviNode)
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
protected org.zkoss.zul.Button createAddBundleButton(CatalogVersionModel catalogVersion)
Creates button for adding a new bundle
-
createRelatedItemListContainer
protected org.zkoss.zk.ui.Component createRelatedItemListContainer(Listbox relatedItemList)
Creates container which displays node content.- Parameters:
relatedItemList
- content item list
-
updateTreeModel
protected void updateTreeModel()
Updates the tree setting actual model
-
createTree
protected Tree createTree(CatalogVersionModel catVer)
Creates tree with.
-
createBlankArea
protected void createBlankArea(java.lang.String message, org.zkoss.zk.ui.Component parent)
Creates blank main area with given message.- Parameters:
message
- given messageparent
- a parent component
-
createMessageArea
protected void createMessageArea(java.lang.String title, java.lang.String message, org.zkoss.zk.ui.Component parent)
Creates message area with title and text- Parameters:
title
- title textmessage
- given messageparent
- a parent component
-
refreshAddItemButton
protected void refreshAddItemButton(java.util.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(java.util.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
-
refreshRelatedItemList
protected void refreshRelatedItemList(org.zkoss.zk.ui.Component parent, Listbox listBox, BundleRelatedItemListController controller)
Refreshes a content item list after selection was done in the tree.- Parameters:
parent
- a parent componentlistBox
- a content item listcontroller
- a content item list controller
-
getNavigationNodeRenderer
protected org.zkoss.zul.TreeitemRenderer getNavigationNodeRenderer(TreeController controller)
ReturnsTreeitemRenderer
configured via spring.
-
getRelatedItemListController
protected BundleRelatedItemListController getRelatedItemListController()
ReturnsListboxController
configured via spring.
-
getNavigationNodeController
protected BundleNavigationNodeController getNavigationNodeController()
ReturnsBundleNavigationNodeController
configured via spring.
-
getAllowedProductTypes
protected java.util.Set<ObjectType> getAllowedProductTypes()
Returns aSet
of product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.
-
-