Hi, Picked Tree as the first component, huh? The basic idea behind Tree in FlexJS is that it is a List with itemRenderers that indent.
The reason CSS is used to set beads, such as model, view, controller, and others, is to make it very easy to swap them out just by giving your app a different CSS file and they don't have to be hard-coded. Since it has been a little while since I looked at Tree, my guess is that I just forgot to change it once I took HierarchicalData as far as was needed at the time. I probably worked with HierarchicalData until the end when I created IHierarchicalData and just forgot to go back to Tree and change it. If you want to add keyboard behavior, you'd create another controller type bead. If you look in the HTML project in the org.apache.flex.html.beads.controllers package you'll find EditableTextKeyboardController. There's not much to it, but its a start. Some of the mouse controllers have more insight into separating the SWF and JS event handling if you need to look at specific keyboard keys. On 5/30/16, 3:36 PM, "Harbs" <harbs.li...@gmail.com> wrote: >On second thoughtŠ > >This is the first time I¹m diving into a FlexJS component. I understand >strands and beads conceptually, but I have not really looked into the >practice until now. > >It looks like the behavior of the Tree is handled by the >TreeSingleSelectionMouseController which extends >ListSingleSelectionMouseController. The controller seems to be set in the >css file? That strikes me as a bit odd considering that css usually means >visual to me, but I think I get it. > >Either way, Tree is expecting HierarchicalData rather than >IHierarchicalData. Is there a reason for that? > >If I want to add keyboard behavior (i.e. using the arrow keys to navigate >and open/close nodes, what would be the best way to do that? > >(BTW, I¹m using Tree for a pet project as a way of learning the structure >of FlexJS components before I deep dive into using them.) > >On May 30, 2016, at 10:20 PM, Harbs <harbs.li...@gmail.com> wrote: > >> I¹d like to add XML support for Trees. Any preference on whether I >>should create a new IHierarchicalData class for XML (i.e. >>XMLHierarchicalData) or put conditional logic in the existing >>HierarchicalData class? >> >> I¹m leaning towards the former. >> >> Harbs >