Package de.hybris.platform.configurablebundlecockpits.productcockpit.navigationnode.browserarea.tree
Class BundleNavigationNodeController
java.lang.Object
de.hybris.platform.configurablebundlecockpits.productcockpit.navigationnode.browserarea.tree.BundleNavigationNodeController
- All Implemented Interfaces:
SelectableComponent<Tree,,org.zkoss.zul.Treeitem, TypedObject> TreeController<TypedObject>
Controller of 'navigation node' tree, see related class:
BundleNavigationNodeBrowserModel- Spring Bean ID:
- navigationNodeController
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidadd(Tree tree, Object object, TypedObject target) Adds given object as a child of 'target' node (by default as last child), if null then new object is createdvoidadd(Tree tree, Object object, TypedObject target, int index) Adds given object as a child of 'target' node, if null then new object is createdvoidaddProductsToNode(BundleTemplateModel bundleTemplateModel, Iterable<TypedObject> typedProductsToAdd) Adds new or existing products to the product list of a bundletemplate.create(Tree tree, TypedObject target) Creates new object as a child of 'target' nodecreate(Tree tree, TypedObject target, int index) Creates new object as a child of 'target' nodecustomAction(Tree tree, org.zkoss.zk.ui.event.Event event, TypedObject node) If some custom actions were added to the tree, this method will be called for each of themvoiddelete(Tree tree, TypedObject node) Deletes given nodeprotected voiddetachDialog(org.zkoss.zul.Window dialog) voiddoubleClicked(Tree tree, TypedObject currentNode) Called when given node was double clicked in treeprotected FlexibleSearchServiceprotected ModelServiceprotected SynchronizationServiceprotected SystemServicevoidmove(Tree tree, TypedObject node, TypedObject target, boolean addAsChild) Moves given node in place of 'target' node.voidvoidvoidCalled every time the tree node was selectedvoidsetBundleNavigationService(BundleNavigationService bundleNavigationService) voidsetBundleTreeController(BundleTreeController bundleTreeController) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetModelService(ModelService modelService) voidsetSynchronizationService(SynchronizationService synchronizationService) voidsetSystemService(SystemService systemService)
-
Constructor Details
-
BundleNavigationNodeController
public BundleNavigationNodeController()
-
-
Method Details
-
selected
Description copied from interface:SelectableComponentCalled every time the tree node was selected- Specified by:
selectedin interfaceSelectableComponent<Tree,org.zkoss.zul.Treeitem, TypedObject> - Parameters:
tree- in case an update is neededselectedTreeItems- set of currently selected items
-
getSelected
- Specified by:
getSelectedin interfaceSelectableComponent<Tree,org.zkoss.zul.Treeitem, TypedObject> - Returns:
- currently selected set of items
-
create
Description copied from interface:TreeControllerCreates new object as a child of 'target' node- Specified by:
createin interfaceTreeController<TypedObject>- Parameters:
tree- after successful creation, tree will be notified to update itselftarget- that will have new 'object' added.- Returns:
- created object
-
create
Description copied from interface:TreeControllerCreates new object as a child of 'target' node- Specified by:
createin interfaceTreeController<TypedObject>- Parameters:
tree- after successful creation, tree will be notified to update itselftarget- that will have new 'object' added.index- at which the new 'object' will be added within 'target' child set- Returns:
- created object
-
add
Description copied from interface:TreeControllerAdds given object as a child of 'target' node (by default as last child), if null then new object is created- Specified by:
addin interfaceTreeController<TypedObject>- Parameters:
tree- after successful addition, tree will be notified to update itselfobject- e.g. the dragged component which contains something to add to the 'target' node, null indicates that new object shall be created or anything elsetarget- that will have 'object' added.
-
move
Description copied from interface:TreeControllerMoves given node in place of 'target' node.- Specified by:
movein interfaceTreeController<TypedObject>- Parameters:
tree- after successful movement, tree will be notified to update itselfnode- to be movedtarget- node to be shifted. In place of this 'target' node the 'node' will be moved.addAsChild- flag indicating whether node should be added as a child or not.
-
add
Description copied from interface:TreeControllerAdds given object as a child of 'target' node, if null then new object is created- Specified by:
addin interfaceTreeController<TypedObject>- Parameters:
tree- after successful addition, tree will be notified to update itselfobject- e.g. the dragged component which contains something to add to the 'target' node, or anything elsetarget- that will have 'object' added.index- at which the 'object' will be added within 'target' child set
-
delete
Description copied from interface:TreeControllerDeletes given node- Specified by:
deletein interfaceTreeController<TypedObject>- Parameters:
tree- after successful deletion, tree will be notified to update itselfnode- to delete
-
doubleClicked
Description copied from interface:TreeControllerCalled when given node was double clicked in tree- Specified by:
doubleClickedin interfaceTreeController<TypedObject>- Parameters:
tree- to play with after whatever was donecurrentNode- which was double clicked
-
customAction
Description copied from interface:TreeControllerIf some custom actions were added to the tree, this method will be called for each of them- Specified by:
customActionin interfaceTreeController<TypedObject>- Parameters:
tree- to play with if necessaryevent- original event that was sent when custom action button was clickednode- from selected tree item- Returns:
- whatever you implement
-
refresh
-
refresh
-
detachDialog
protected void detachDialog(org.zkoss.zul.Window dialog) -
addProductsToNode
public void addProductsToNode(BundleTemplateModel bundleTemplateModel, Iterable<TypedObject> typedProductsToAdd) Adds new or existing products to the product list of a bundletemplate.- Parameters:
bundleTemplateModel-typedProductsToAdd-
-
getModelService
-
getSystemService
-
getSynchronizationService
-
setSystemService
-
setModelService
-
setSynchronizationService
-
getFlexibleSearchService
-
setFlexibleSearchService
-
getBundleTreeController
-