1 Reply Latest reply on Dec 1, 2011 2:28 PM by majester8425

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

    majester8425

      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