Class NavigationNodeController
java.lang.Object
de.hybris.platform.cmscockpit.navigationnode.browserarea.tree.NavigationNodeController
- All Implemented Interfaces:
SelectableComponent<Tree,,org.zkoss.zul.Treeitem, TypedObject> PositionAwareTreeController<TypedObject>,TreeController<TypedObject>
public class NavigationNodeController
extends Object
implements PositionAwareTreeController<TypedObject>
Controller of 'navigation node' tree, see related class:
NavigationNodeBrowserModel- 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 createdcreate(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 Set<TypedObject>extractSelectedItem(Set<org.zkoss.zul.Treeitem> selectedItems) protected ModelServicestatic org.zkoss.zul.WindowgetMoveItemModalDialog(Tree tree, TypedObject typedObject, TypedObject targetNodeObj, CMSNavigationService cmsNavigationService) Returns window dialog with options when dropping content page.getOpenedNodes(Tree tree, int depth) getPathToRoot(org.zkoss.zul.Treeitem treeItem) protected SynchronizationServiceprotected List<SyncItemJobModel>[]getSyncJobs(ListViewAction.Context context) protected SystemServiceprotected TypeServicevoidmove(Tree tree, TypedObject node, TypedObject target, boolean addAsChild) Moves given node in place of 'target' node.voidmove(Tree tree, TypedObject node, TypedObject target, boolean addAsChild, boolean append) Moves given node in place of 'target' node.voidopenCreatedNode(Tree tree, TypedObject typedObject, boolean addAsAChild) protected voidOpens specified pathvoidprotected voidrestoreOpenedState(Tree tree, List<List<Integer>> openedNodes) Restores opened stateprotected voidrestoreSelectionState(Tree tree) Restores whatever was selected (before tree invalidation etc) Call it after tree open state is restored seerestoreOpenedState(Tree, List)because only opened nodes are search through.protected org.zkoss.zul.TreeitemsearchForSelectedNode(List<org.zkoss.zul.Treeitem> treeitems, TypedObject selectedItem) voidCalled every time the tree node was selectedprotected voidsendUpdateEvents(Tree tree, TypedObject node) voidsetCmsNavigationService(CMSNavigationService navigationNodeService) voidsetModelService(ModelService modelService) voidsetNavigationNodeWizardId(String navigationNodeWizardId) voidsetRelatedResourceWizardId(String relatedResourceWizardId) voidsetSynchronizationService(SynchronizationService synchronizationService) voidsetSystemService(SystemService systemService) voidsetTypeService(TypeService typeService) protected voidshowNodeActions(Tree tree, Set<org.zkoss.zul.Treeitem> selectedItems) Shows actions next to selected row and hides actions from previously selected row
-
Constructor Details
-
NavigationNodeController
public NavigationNodeController()
-
-
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
-
showNodeActions
Shows actions next to selected row and hides actions from previously selected row -
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.
-
move
public void move(Tree tree, TypedObject node, TypedObject target, boolean addAsChild, boolean append) Description copied from interface:PositionAwareTreeControllerMoves given node in place of 'target' node.- Specified by:
movein interfacePositionAwareTreeController<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.append- if true the element will be placed after (addAsChild false) or in the very end (addAsChild true)
-
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
-
extractSelectedItem
-
getOpenedNodes
-
openCreatedNode
-
getPathToRoot
-
restoreSelectionState
Restores whatever was selected (before tree invalidation etc) Call it after tree open state is restored seerestoreOpenedState(Tree, List)because only opened nodes are search through. -
searchForSelectedNode
protected org.zkoss.zul.Treeitem searchForSelectedNode(List<org.zkoss.zul.Treeitem> treeitems, TypedObject selectedItem) - Returns:
- treeitem to be selected, null if nothing found
-
restoreOpenedState
Restores opened state -
openPath
Opens specified path -
getSyncJobs
-
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
-
sendUpdateEvents
-
refresh
-
detachDialog
protected void detachDialog(org.zkoss.zul.Window dialog) -
getModelService
-
getTypeService
-
getSystemService
-
getSynchronizationService
-
setTypeService
-
setSystemService
-
setModelService
-
setSynchronizationService
-
getRelatedResourceWizardId
-
setRelatedResourceWizardId
-