So basically, there’s a wrapper controller which brings in the sub-controllers?
Is there any examples which does this already? On Jun 1, 2016, at 12:16 AM, Peter Ent <p...@adobe.com> wrote: > My official reply is "Hmm, I don't think you can". I think you'd want to > use something like IMouseController and IKeyboardController for the items > in the style. IBeadController, if present, is automatically detected and > loaded as the controller for the strand (same for the IBeadView and > IBeadModel). But you can write your view to load your own classes. > > —peter > > On 5/31/16, 5:09 PM, "Harbs" <harbs.li...@gmail.com> wrote: > >> So, is it possible to have two IBeadControllers? >> >> On Jun 1, 2016, at 12:04 AM, Peter Ent <p...@adobe.com> wrote: >> >>> The key to the CSS and the beads is the ValuesManager >>> (org.apache.flex.core.ValuesManager) the implementation used >>> (org.apache.flex.core.SimpleCSSValuesImpl). This searches through the >>> CSS >>> for the class and matches the name (eg, IBeadController) and >>> instantiates >>> and instance of the class referenced. This is done in the >>> MXMLDataInterpreter. >>> >>> —peter >>> >>> On 5/31/16, 4:24 PM, "Harbs" <harbs.li...@gmail.com> wrote: >>> >>>> Yeah. If I’m going to jump in, it might as well be with both feet into >>>> the deep water… ;-) >>>> >>>> How does the css setting of beads work under the hood? I’d like to >>>> understand the mechanics. >>>> >>>> I’ll figure out the HierarchicalData as soon as I fix the XML issue >>>> with >>>> the compiler. >>>> >>>> I’ll look at EditableTextKeyboardController. Thanks. Is there any trick >>>> necessary for specifying multiple controller beads? >>>> >>>> I’d also like to figure out how to specify different icons for open and >>>> closed nodes. Ideally there should be a way to specify look using CSS >>>> class names in HTML. Is there an easy way to do that? >>>> >>>> On May 31, 2016, at 5:24 PM, Peter Ent <p...@adobe.com> wrote: >>>> >>>>> 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 >>>>>> >>>>> >>>> >>> >> >