Is there any way to reference a component and its properties in a variable ?

I have two custom components. Only one ever displays depending on the currentState value.
<componants:wrUnapproved
    itemCreationPolicy="immediate"
    excludeFrom="SQLSERVER"
    id="wrUnapprovedComp"
    wrIdLv="{parentApplication.wrId}"
    userTypeCdLv="{parentApplication.userTypeCd}"
    width="100%"
    height="354"
    y="25"/>
   <componants:wrUnapprovedSqlServer
    itemCreationPolicy="immediate"
    includeIn="SQLSERVER"
    id="wrUnapprovedCompSs"
    wrIdLv="{parentApplication.wrId}"
    userTypeCdLv="{parentApplication.userTypeCd}"
    width="100%"
    height="354"
    y="25"/>
Now I want to refrence whichever one is active and dynamically reference it
Like
myComponanet.init();
where myComponanet is either wrUnapprovedComp or wrUnapprovedCompSs

Found my own answer
var pp:Object = wrUnapprovedComp;  

Similar Messages

Maybe you are looking for

  • How to open iPhoto in the new update ??

    Why can i no longer open iPhoto after the Yosemite update ?

  • Editing problems with iTunes 64-bit in Vista

    Hello! Just bot a new computer with Win Vista 64-bit and had to install new iTunes 64-bit. It's somewhat slow when switching between Windows and iTunes. Also, what happened to the "quick" edit feature? As in.... highlight song, hit F2 or just click O

  • Syntax for Update Query?

    Hi I have the following query: update martin_adhoc_pct set adhoc.mbr_oed = mbr.orig_eff_date where adhoc.subs_ssn = mbr.subs_ssn and adhoc.mbr_type = mbr.mbr_type I get an error saying that: ORA-000904 "mbr"."mbr_type" invalid identifier.. I am using

  • Drag and drop panel

    I plan on writing a "drag and drop" interface that lets a user place things on a "canvas" and move them around. I will then let the user connect them with lines. Such things could be nodes in a network, one of the ideas I've had for using it. Basical

  • Any Idea when Apple will email the redemption code for Mountain Lion?

    Any Idea when Apple will email the redemption code for Mountain Lion? I got a code but it said it was invalid on the app store. When will this issue be solved? Kind of getting impatient, given I dropped 2k over their product...