Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7685385
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T19:14:21+00:00 2026-05-31T19:14:21+00:00

How can I enable or disable a group of components in flex (flash builder

  • 0

How can I enable or disable a group of components in flex (flash builder 4)?

For example, if I have a window with several fields, I want to disable them based on the users permissions.

I know I can add the enabled=”true” or “enabled=”false”, and I can also use enabled=”{writeAccessVar}”

However, I am looking for more ideas, as I might have more than one group of fields on the screen, or more complicated user permissions.

For example, I will currently have one field with write access, the other fields on the screen read only for a certain user level.

For a higher level user, all fields are writable. Lower level, all are read-only.

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-31T19:14:22+00:00Added an answer on May 31, 2026 at 7:14 pm

    You can add a variable accessLevel that is equal to the access level of the user:

    [Bindable]
    var accessLevel:int = 0; // 0: low level, 1: next level, 2: next level, an so on
    

    And then, you can set the enabled property of each component according to accessLevel:

    enabled="{accessLevel >= 0}"
    

    To improve the readability of your code, you can declare constants for the different levels

    public static const ACCESS_LEVEL_LOW:int = 0;
    public static const ACCESS_LEVEL_NORMAL:int = 1;
    public static const ACCESS_LEVEL_HIGH:int = 2;
    
    
    // ...
    enabled="{accessLevel >= ACCESS_LEVEL_LOW}"
    // ...
    enabled="{accessLevel >= ACCESS_LEVEL_NORMAL}"
    // ...
    enabled="{accessLevel >= ACCESS_LEVEL_HIGH}"
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a screen where you can enable/disable modules for my Android application. For
I want to launch mobile network settings screen, so that user can enable/disable 3g
I want to enable/disable clipboard in an edittext. How can I do this?
In My app i have button ,i can enable and disable,if go to next
I have preferences where you can enable/disable what items will show up on the
I see that you can enable/disable using the EnableWindow method, but how do I
plz guide me how I can enable or disable asp.net validation controls using jQuery
can any one tell me how can we enable/ disable button by radio button
on Windows 7 I can enable and disable connections via the Network Connections Manager
How can I enable or disable a maven profile based on whether the VM

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.