vi.widgets.tree

Module Contents

Classes

TreeWidget

Base Widget that renders a tree.

BrowserLeafWidget

BrowserNodeWidget

BreadcrumbNodeWidget

TreeBrowserWidget

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()
receivedStructure(resp)
setSelector(callback, multi=True, allow=None)

Configures the widget as selector for a relationalBone and shows it.

setContext(context)
selectorReturn()

Returns the current selection to the callback configured with setSelector.

onKeyDown(event)
onKeyUp(event)
getActions()

Returns a list of actions that are being set for the ActionBar. Override this to provide additional actions.

clearSelection()

Empties the current selection.

extendSelection(element)

Extends the current selection to element.

This is normally done by clicking or tabbing on an element.

activateSelection(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(element)
_showErrorMsg(req=None, code=None)

Removes all currently visible elements and displayes an error message

onDataChanged(module, *args, **kwargs)
onAttach()
onDetach()
itemForKey(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(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(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()

Reload the data were displaying.

loadNode(node, skelType=None, cursor=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(req)

The NetworkRequest for a (sub)node finished. Create a new HierarchyItem for each entry received and add them to our view

onDrop(event)

We got a drop event. Make that item a direct child of our rootNode

onDragOver(event)

Allow dropping children on the rootNode

getChildKey(widget)

Order by sortindex

static canHandle(moduleName, moduleInfo)
class vi.widgets.tree.BrowserLeafWidget

Bases: flare.viur.widgets.tree.TreeLeafWidget

setStyle()
class vi.widgets.tree.BrowserNodeWidget

Bases: flare.viur.widgets.tree.TreeNodeWidget

setStyle()
class vi.widgets.tree.BreadcrumbNodeWidget

Bases: flare.viur.widgets.tree.TreeNodeWidget

setStyle()
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()

Reload the data were displaying.

rebuildPath()

Rebuild the displayed path-list.

onPathRequestSucceded(req)

Rebuild the displayed path-list according to request data

activateSelection(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)