3 Replies Latest reply on Oct 29, 2007 9:02 PM by Giribabums

    Loading/Calling components based on Roles and Rights

    Giribabums Level 1
      I want to call [load] components based on user credentials [roles and rights], Roles can be Admin/Manager/SalesPerson which i am setting in salesforce Database. If admin user logs into the salesforce account i want to load/call the admin related componets[pages] and if Managers logs into the salesforce account i want to show manager related components and vise versa. how can i achieve this.
        • 1. Re: Loading/Calling components based on Roles and Rights
          ntsiii Level 3
          ViewStacks, states, the visibility property, manually calling addChild, etc.

          Tracy
          • 2. Re: Loading/Calling components based on Roles and Rights
            Giribabums Level 1
            Thanks for your reply.
            oneway i tried is using addChild, let me try another way.

            [code]
            if(isAdmin)
            {
            var screen:UIComponent = new AdminComponent()
            addChild( AdminComponent );
            }
            else
            {
            var screen:UIComponent = new NormalUserComponent()
            addChild( NormalUserComponent);
            }
            [/code]

            I am using SalesForce Database, In each component i have written a method login() and generating data. I want to make the login in 1component and want to use the same login for other component, can you tell me how can i do that.
            • 3. Re: Loading/Calling components based on Roles and Rights
              Giribabums Level 1
              Thanks for your reply.
              oneway i tried is using addChild, let me try another way.

              [code]
              if(isAdmin)
              {
              var screen:UIComponent = new AdminComponent()
              addChild( AdminComponent );
              }
              else
              {
              var screen:UIComponent = new NormalUserComponent()
              addChild( NormalUserComponent);
              }
              [/code]

              I am using SalesForce Database, In each component i have written a method login() and generating data. I want to make the login in 1component and want to use the same login for other component, can you tell me how can i do that.