Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>The absolute best way to do this is create your hierarchical tree in your data model. So for every node that has children, if you have a selected property, you would also modify the selected property on those children. This way, your ADG is merely a view of the state of the data. You then tie the change event of the checkbox to this selected property.</p> <p>[Edit to show Tree sample]</p> <p>So similar to XML, you're data structures can have a tree leaf/node paradigm For Example (psuedo code):</p> <p>A tree of "People":</p> <pre><code>var gf:Person = new Person(); gf.name = 'Frank'; var gm:Person = new Person(); gm.name = 'Elise'; var c1:Person = new Person(); c1.name = 'Mary'; var c2:Person = new Person(); c2.name = 'Frank Jr'; var c3:Person = new Person(); c3.name = 'Sam'; var couple:PersonGroup = new PersonGroup(); couple.relation = [gm, gf]; couple.children = [c1, c2, c3]; //now you add another 'married PersonGroup to child one, and their children' </code></pre> <p>So since you have a 'children' property the HierarchicalData knows how to work with this, but their is a field which allows you to set it to something else if your 'node' is named something else.</p> <p>So to extend this each 'Person' would have a property that is 'selected, enabled, alive, whichever', and that property needs to be a setter, which then modifies that property also present in it's children. In this way the state of your data is always preserved in your data model, and the ADG just happens to be the current view that you use to display that representation.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload