AddBead does not search the strand.

getBeadByType returns the first bead added that is, extends, or implements the 
type.

Some Basic components like DataGrid have a data model and a presentation model. 
 The data model is intended to support the properties exposed to the developer. 
 The IBeadModel is automatically created in the lifecycle to support setting 
properties in MXML or after instantiation.  Any other models can be created on 
demand in a similar fashion or can be created as needed by the View.  They can 
be found on the strand by implementing a particular interface.  These other 
models do not need to be IBeadModel (and probably shouldn't be).

HTH,
-Alex

On 10/22/18, 3:14 PM, "Carlos Rovira" <[email protected]> wrote:

    Hi,
    
    I'm using the bead system a lot in my app, and is very powerful, but I have
    some case that I'm not sure how to deal with:
    
    Let's say I migrating some business logic separated in different classes
    for example some Model classes (IBeadModel), some controllers
    (IBeadController)
    that manages the business logic of the application and communicates with
    the server. I'm configuring those beads through CSS
    
    Many times, one component, form or view (here the strand) has one
    IBeadModel, and one IBeadController among other beads, but other times a
    the strand would need more than one IBeadsModel and IBeadController (so a
    for example a view is managing more than one entity and its relations so
    each entity is separated in different classes as usual), and I think if I
    setup a bead of a concrete type and then use "addBead" to add other, the
    latest removes the older one. So we can't have mode than one bead of the
    same type.
    
    Is this right? If so, how to deal when we have more than one bead of the
    same type and we want to access any of them?
    
    -- 
    Carlos Rovira
    
https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&amp;data=02%7C01%7Caharui%40adobe.com%7Cd6066381aa6e47b1bddc08d6386babc9%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636758432429647430&amp;sdata=HmoIBDMd7H6QibLXsMwCW9e%2FsbMDOuKpTlis0bwpw7k%3D&amp;reserved=0
    

Reply via email to