vi.widgets.tree
¶
Module Contents¶
Classes¶
Base Widget that renders a tree. |
|
Base Widget that renders a tree. |
- class vi.widgets.tree.TreeWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)¶
Bases:
flare.html5.Div
Base Widget that renders a tree.
- nodeWidget¶
- leafWidget¶
- requestStructure(self)¶
- receivedStructure(self, resp)¶
- setSelector(self, callback, multi=True, allow=None)¶
Configures the widget as selector for a relationalBone and shows it.
- selectorReturn(self)¶
Returns the current selection to the callback configured with setSelector.
- onKeyDown(self, event)¶
- onKeyUp(self, event)¶
- getActions(self)¶
Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.
- clearSelection(self)¶
Empties the current selection.
- extendSelection(self, element)¶
Extends the current selection to element.
This is normally done by clicking or tabbing on an element.
- activateSelection(self, element)¶
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- requestChildren(self, element)¶
- showErrorMsg(self, req=None, code=None)¶
Removes all currently visible elements and displayes an error message
- onDataChanged(self, module, *args, **kwargs)¶
- onAttach(self)¶
- onDetach(self)¶
- itemForKey(self, key, elem=None)¶
Returns the HierarchyWidget displaying the entry with the given key. :param key: The key (id) of the item. :type key: str :returns: HierarchyItem
- onSetDefaultRootNode(self, req)¶
We requested the list of rootNodes for that module and that request just finished. Parse the respone and set our rootNode to the first rootNode received.
- setRootNode(self, rootNode, node=None)¶
Set the currently displayed hierarchy to ‘rootNode’. :param rootNode: Key of the rootNode which children we shall display :type rootNode: str
- reloadData(self)¶
Reload the data were displaying.
- loadNode(self, node, cursor=None, reqType=None, overrideParams=None)¶
Fetch the (direct) children of the given node. Once the list is received, append them to their parent node. :param node: Key of the node to fetch :type node: str
- onRequestSucceded(self, req)¶
The NetworkRequest for a (sub)node finished. Create a new HierarchyItem for each entry received and add them to our view
- onDrop(self, event)¶
We got a drop event. Make that item a direct child of our rootNode
- onDragOver(self, event)¶
Allow dropping children on the rootNode
- getChildKey(self, widget)¶
Order by sortindex
- static canHandle(moduleName, moduleInfo)¶
- class vi.widgets.tree.BrowserLeafWidget¶
Bases:
flare.viur.widgets.tree.TreeLeafWidget
- setStyle(self)¶
- class vi.widgets.tree.BrowserNodeWidget¶
Bases:
flare.viur.widgets.tree.TreeNodeWidget
- setStyle(self)¶
- class vi.widgets.tree.BreadcrumbNodeWidget¶
Bases:
flare.viur.widgets.tree.TreeNodeWidget
- setStyle(self)¶
- class vi.widgets.tree.TreeBrowserWidget(module, rootNode=None, node=None, context=None, *args, **kwargs)¶
Bases:
TreeWidget
Base Widget that renders a tree.
- leafWidget¶
- nodeWidget¶
- reloadData(self)¶
Reload the data were displaying.
- rebuildPath(self)¶
Rebuild the displayed path-list.
- onPathRequestSucceded(self, req)¶
Rebuild the displayed path-list according to request data
- activateSelection(self, element)¶
Activates the current selection or element.
An activation mostly is an action like selecting or editing an item. This is normally done by double-clicking an element.
- static canHandle(module, moduleInfo)¶