Renders a tree widget with AJAX support.
The "id "attribute is normally specified(recommended), such that it could be looked up using javascript if necessary. The "id" attribute is required if the "selectedNotifyTopic" or the "href" attributes are going to be used.
<s:tree id="..." label="..."> <s:treenode id="..." label="..." /> <s:treenode id="..." label="..."> <s:treenode id="..." label="..." /> <s:treenode id="..." label="..." /> </s:treenode> <s:treenode id="..." label="..." /> </s:tree> <s:tree id="..." rootNode="..." nodeIdProperty="..." nodeTitleProperty="..." childCollectionProperty="..." /> <s:url id="nodesUrl" namespace="/nodecorate" action="getNodes" /> <div style="float:left; margin-right: 50px;"> <sx:tree id="tree" href="%{#nodesUrl}" /> </div> On this example the url specified on the "href" attibute will be called to load the elements on the root. The response is expected to be a JSON array of objects like: [ { label: "Node 1", hasChildren: false, id: "Node1" }, { label: "Node 2", hasChildren: true, id: "Node2" }, ] "label" is the text that will be displayed for the node. "hasChildren" marks the node has having children or not (if true, a plus icon will be assigned to the node so it can be expanded). The "id" attribute will be used to load the children of the node, when the node is expanded. When a node is expanded a request will be made to the url in the "href" attribute and the node's "id" will be passed in the parameter "nodeId". The children collection for a node will be loaded only once, to reload the children of a node, use the "reload()" function of the treenode widget. To reload the children nodes of "Node1" from the example above use the following javascript: dojo.widget.byId("Node1").reload();