tw2.jqplugins.dynatree

TW2 widget wrapper the jquery ui dynatree

Get the source from http://github.com/toscawidgets/tw2.jqplugins.dynatree

DynaTreeWidget
  • options
    • Configuration options to pass to dynatree
  • events
    • (dict) (BETA) javascript callbacks for events
class DemoDynaTree(DynaTreeWidget):
    options = {
        'onActivate': twc.JSSymbol(
            src="""function(node) {
            alert("You activated " + node.data.title);
        }"""),
        'children': [
            {'title': "Item 1"},
            {'title': "Folder 2",
             'isFolder': True,
             'key': "folder2",
             'children': [
                 {'title': "Sub-item 2.1"},
                 {'title': "Sub-item 2.2"}
             ]
            },
            {'title': "Item 3"}
        ]
    }
<%namespace name="tw" module="tw2.core.mako_util"/>
<div>
<div ${tw.attrs(attrs=w.attrs)}></div>
</div>