Structuring the Data
In order to construct our tree view component, we must first have a way of defining the data. The data we will be defining will be requested by our Ajax engine, so we will create an XML structure to define it. The tree view component will render the XML exactly as we define it. This means that if we have a node named Inbox with a node value of 'New Mail', the tree view component will create a folder named Inbox and it will contain a text item equal to the node value that we defined. Therefore, all we need to do is define nodes and node values and leave the rest up to the component. The nodes will be represented as folders, and the node values will be represented as content in the form in which they are defined—whether they ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access