Class 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
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.HtmlBasedComponent

        org.zkoss.zk.ui.HtmlBasedComponent.ExtraCtrl
      • Nested classes/interfaces inherited from class org.zkoss.zk.ui.AbstractComponent

        org.zkoss.zk.ui.AbstractComponent.Children
    • 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 bundle
      protected 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 text
      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.
      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 listview
      protected 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 a Set of product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.
      protected UIItemView getCurrentItemView()  
      BundleNavigationNodeBrowserModel getModel()  
      protected BundleNavigationNodeController getNavigationNodeController()
      Returns BundleNavigationNodeController configured via spring.
      protected org.zkoss.zul.TreeitemRenderer getNavigationNodeRenderer​(TreeController controller)
      Returns TreeitemRenderer configured via spring.
      protected BundleRelatedItemListController getRelatedItemListController()
      Returns ListboxController 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 org.zkoss.zul.Div

        getAlign, renderProperties, setAlign
      • 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.zul.api.Div

        getAlign, setAlign
      • 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 org.zkoss.zul.impl.api.XulElement

        getAction, getContext, getCtrlKeys, getPopup, getTooltip, setAction, setContext, setContext, setCtrlKeys, setPopup, setPopup, setTooltip, setTooltip
    • 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
    • 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 version
        parent - 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 component
        contentItemListContainer - node content parent
        productActionButtonContainer -
        parent - add page button parent
      • 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)
      • fireAddRootNavigationNode

        public void fireAddRootNavigationNode()
        Triggers adding root navigation node.

      • removeSelectedNavigationNode

        public void removeSelectedNavigationNode()
        Triggers remove selected navigation node.

      • 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 button
        addProductButton - 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
      • createBlankArea

        protected void createBlankArea​(java.lang.String message,
                                       org.zkoss.zk.ui.Component parent)
        Creates blank main area with given message.

        Parameters:
        message - given message
        parent - 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 text
        message - given message
        parent - 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 items
        addItemButton - 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 items
        searchProductButton - 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 component
        listBox - a content item list
        controller - a content item list controller
      • getNavigationNodeRenderer

        protected org.zkoss.zul.TreeitemRenderer getNavigationNodeRenderer​(TreeController controller)
        Returns TreeitemRenderer configured via spring.

      • getAllowedProductTypes

        protected java.util.Set<ObjectType> getAllowedProductTypes()
        Returns a Set of product types (configured via spring bean 'allowedProductTypesList') that can be added to a bundle component.