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.StringADD_BUNDLE_LABELprotected static java.lang.StringADD_BUNDLE_TOOLTIPprotected static java.lang.StringADD_PRODUCT_LABELprotected static java.lang.StringADD_RELATED_ITEMS_BTG_SCLASSprotected static java.lang.StringINFO_AREA_DIV_IDprotected static java.lang.StringMARGIN_HELPER_SCLASSprotected static java.lang.StringNAVIGATION_SECTION_CONTAINER_LEFT_SCLASSprotected static java.lang.StringNAVIGATION_SECTION_CONTAINER_RIGHT_SCLASSprotected static java.lang.StringNAVIGATION_TREE_PANEL_SCLASSprotected static java.lang.StringNAVIGATION_TREE_SCLASSprotected static java.lang.StringRELATED_ITEMS_CONTAINER_SCLASSprotected static java.lang.StringRELATED_ITEMS_LIST_SCLASSprotected static java.lang.StringROOT_NAVIGATION_CNT_SCLASSprotected static java.lang.StringROOT_NAVIGATION_SUB_CNT_SCLASSprotected static java.lang.StringSEARCH_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 voidcleanup()protected org.zkoss.zul.ButtoncreateAddBundleButton(CatalogVersionModel catalogVersion)Creates button for adding a new bundleprotected org.zkoss.zul.ButtoncreateAddItemButton()Creates 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(java.lang.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.DivcreateMainArea()protected voidcreateMessageArea(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.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.ButtoncreateSearchProductButton()Creates 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.voidfireAddRootNavigationNode()Triggers adding root navigation node.protected java.util.Set<ObjectType>getAllowedProductTypes()Returns aSetof product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.protected UIItemViewgetCurrentItemView()BundleNavigationNodeBrowserModelgetModel()protected BundleNavigationNodeControllergetNavigationNodeController()ReturnsBundleNavigationNodeControllerconfigured via spring.protected org.zkoss.zul.TreeitemRenderergetNavigationNodeRenderer(TreeController controller)ReturnsTreeitemRendererconfigured via spring.protected BundleRelatedItemListControllergetRelatedItemListController()ReturnsListboxControllerconfigured via spring.protected voidinitTreeComponent(CatalogVersionModel catalogVersion, org.zkoss.zk.ui.Component parent)Initialize a whole tree component with its dependencies.protected voidrefreshAddItemButton(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 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(java.util.Set<org.zkoss.zul.Treeitem> selectedItems, org.zkoss.zul.Button searchProductButton)Refreshes search product button after selection was done in the tree.voidremoveSelectedNavigationNode()Triggers 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 voidupdateTreeModel()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:
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
-
fireAddRootNavigationNode
public void fireAddRootNavigationNode()
Triggers adding root navigation node.
-
removeSelectedNavigationNode
public void removeSelectedNavigationNode()
Triggers remove selected navigation node.
-
getModel
public BundleNavigationNodeBrowserModel getModel()
- Specified by:
getModelin interfaceBrowserComponent- Overrides:
getModelin classAbstractMainAreaBrowserComponent
-
getCurrentItemView
protected UIItemView getCurrentItemView()
- Specified by:
getCurrentItemViewin classAbstractMainAreaBrowserComponent
-
cleanup
protected void cleanup()
- Specified by:
cleanupin 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)
ReturnsTreeitemRendererconfigured via spring.
-
getRelatedItemListController
protected BundleRelatedItemListController getRelatedItemListController()
ReturnsListboxControllerconfigured via spring.
-
getNavigationNodeController
protected BundleNavigationNodeController getNavigationNodeController()
ReturnsBundleNavigationNodeControllerconfigured via spring.
-
getAllowedProductTypes
protected java.util.Set<ObjectType> getAllowedProductTypes()
Returns aSetof product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.
-
-