How to get the static attribute by using its name as a string

I have an app with about 100 boxes of single drop-down list (this is a requirement of the Government, I'm not that bad a designer) and I would like to define the choices in a single file separated like this:

package components {}

Import mx.collections.ArrayCollection;

public class {choice}

[Bindable] public static var A0310A: collection ArrayCollection = new ArrayCollection ([] collection
{value: '01', label: 'Admission'},
{value: "02", label: "Quarterly"},
.. .snip...
([{value: "99", label: "NOT the OBRA required"}]) ;

public static void getChoices(name:String):ArrayCollection {}
var temp: ArrayCollection = collection?
Return temp;
}

}//----------------end of class--------------------------------
}//======================== end of package==============================

I want to use it like this

< my: ComboBox id = "mdscombo" tag = "A0310A" / >

Where the definition of my: ComboBox includes the code like this

var zz:ArrayCollection = Choices.getChoices (name);

but I can not find any function that will allow me to do.  I don't want really clutter up the code by creating a name-> object mapping table.

I had also considered using the XML data type, but I have the same question, unless I had all the choices under a single root (possible), but this could be a nightmare when debugging in typo XML file.

Any suggestions?

To answer your question, you can access static variables with a chain in this way:

Choice ["A0310A"]

However, you probably want to re-evaluate your design because this isn't a very desirable approach.

Tags: Flex

Similar Questions

  • How to get the ID internal interface using alternative methods

    Do anybody has an idea, how can I get internal ID of the Interface is there a substitution method I can use to get the code.

    I want to use this ID in the steps of the (GS) Knowledge Module.

    Hello

    You can use API, <%=odiRef.getPop("I_POP")%> to get the internal ID of the interface.

    Thank you
    Guru

  • Photosmart 7525: photosmart 7525 photo tray - how to get the photo tray to use instead of the main tray

    I use a computer from Dell using Windows 8.1 desktop 64-bit.  Printer is HP Photosmart all-in-one 7525.  The software is Microsoft Picture Manager.   I want to print a photo .jpg of MS Picture Manager for paper photo 4 x 6 I have loaded in the photo printer paper tray.  The problem is that printing is still trying to main paper tray in the printer.  Remove all paper from the main tray just causes the print operation to not to say that the main paper tray is in the paper.    If the main tray contains plain paper, the photo printed on this paper.  I have the printer set up to use the photo tray.  I select HP 4 x 6 paper in MS Picture Manager and also set Picture Manager to the highest print quality.  But no mater what I tried, the printer selects tray to main paper rather than the smaller photo paper tray.  The printed image is 4 x 6, but it is printing on paper of the main plate.  What I am doing wrong?

    Well - I found that among the pop ups related print had a link 'options' that seems to indicate that it could be me trying to change things which were not suitable for my printer - so I didn't click the link.  So this time I didn't click the link and he showed me up - again - to set the s/w to use the photo tray.  So I did and the photo made print from the photo rather than the main tray tray.  So now I know how to do and don't need to mess with trinkets or all other signs, you've shown me.  Thank you for taking the time to try to help me.  I appreciate your help.  CR

  • How to get the selected tree node and its attributes

    I have a 'af:RichTree' on a page, which is linked to a support bean (session scope)

    Here is my selection Listener:

    {} public void groupTreeSelectionListener (SelectionEvent selectionEvent)
    RichTree tree = (RichTree) selectionEvent.getSource ();
    Model TreeModel (TreeModel) = tree.getValue (); / /--> this line causes a "pointer Exception zero."
    RowKeySet rowKeySet = selectionEvent.getAddedSet ();
    Key of the object = rowKeySet.iterator () .next ();
    }




    what I'll do is get the note selected and then get all the attributes of this node, perform other actions.


    Please advise,

    Thank you
    Shahab

    have not tried the tree component but cross chek well's Rowselection component of the tree. If so set to single or multiple

  • How to get the web client to refresh its point of view of the deployment of openstack

    Hello

    I had a problem with my MariaDBs which caused Violence to fail to start after his stop. The webclient service displays a message that failed "bootstrap" and newspapers showed that the databases where failing to start. I got data bases and went 'vioconfig start' of the converted VIO openstack starting towards the high fine. IM able to connect to the dashboard and perform all tasks as before so, everything seems to work very well. However the webclient service always shows VIO in a State with the "bootstrap" of initial start error and error. How can I get the webclient service to acknowledge that Violence now is working well?

    Hello

    Here are the steps to synchronize the user interface with the backend.

    1 > please use the user interface to start and stop the Openstack and avoid using CLI tool (because the tool doesn't have sync the database)

    2 > if you do not have to use the user interface to start the deployment (generally, it was caused by the inconsistent database), then you can manually recovered databases.

    3 > using the method as Arvind suggested but instead of changing the status of 'RUNNING', please change it to "STOPPED".

    4 > then come to the user interface to use the user interface to start the cluster.

    Hereby you will have everthing sync upward.

    Kind regards

    Yixing.

  • How to get the jar file without knowing his name and any class on the inside?

    Hello, everyone!

    I would like to know if there is a way to get a reference programmatically in the original container without knowing his name and any class it contains. I mean by "initial pot" the pot that was called in the prompt, like this:
    java -jar jarfile.jar
    or in another way, in a graphics system. To be honest, what I really want is to get a reference to the manifest of the jar, but I know that if I can get a reference to the jar I can get a reference to its manifest file. Or if you know a way to get the manifest directly, it would also be useful. So, is there a way to do this?

    Thank you.

    Marcos

    Ah, so you want to find the calling class and get its source code.

    I managed to get the class calling on occasion, but this is probably a somewhat fragile solution. You must extend SecurityManager because getClassContext() is a protected method.

        private static class CallerFetch extends SecurityManager {
    
            public Class getCallerClass() {
                return getClassContext()[3];
            }
        }
        private static CallerFetch callerFetch =
                new CallerFetch();
    
        /**
         * Find the class of the code which called the
         * method that invokes this method.
         * @return The class of the caller's caller
         */
        public static Class getCallerClass() {
            return callerFetch.getCallerClass();
        }
    
  • How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be.

    How to get the video intro off my google home screen I already saw it, where is the firefox logo used to be. I started with the last update that I rebooted.

    Hello
    to change the homepage when opening firefox-press 'Alt' and click on tools-> Options.

    Main menu, you can change the URL.

    If the problem persists, you can follow these simple steps:

    Enter about: config in the address bar and press ENTER. Accept the message of 'dragons' to see the Advanced preferences screen. Use the above search box to enter the below pref.

    You can assign an empty string to stop your Firefox to retrieve "extracts" and brandLogo changes the browser.aboutHomeSnippets.updateUrl pref. Right-click this pref and select Edit then clear the value as pref in the box that appears, and then click OK. Who will also disable "snippets" that appear under the container of the research on the default home page.

    Then you must open the folder of your profile, via help > Troubleshooting Information > profile folder > > button view folder. Then close Firefox. Your profile file open with Firefox closed (Firefox '3-bar' menu key > exit/Quit), wait or two minutes, then remove the storage\moz-safe-about + home folder in the Firefox profile folder to remove the brandLogo and stored in IndexedDB code snippets to make Firefox use the default brandLogo and a defined default code snippet.

    If you later change your mind about these changes, you can reset the pref browser.aboutHomeSnippets.updateUrl via the context menu and Reset allows to retrieve the default value using the storage\moz-chest-fort-about + home folder again.

  • How to get the CPU usage in LabWindows using C program

    Hi all

    Please help me...

    How to get the CPU usage and the use of the RAM in LabWindows CVI 12.0 using C.

    Any help with this will be appreciated.

    Thank you in advance


  • using PostDelayedCall how to get the value passed through void * callbackData?

    Can someone tell me how to get the data passed through void * callbackData?

    The following code, panel_ptr has the right address but still contains zero.

    void CVICALLBACK value_changed (void * callbackData)
    {
    int * panel_ptr;
     
    panel_ptr = callbackData;
    calculate_new_value (* panel_ptr);
    }

    int sign;

    Panel = 2;

    PostDelayedCall (value_changed & Panel, 0.2);

    The problem is using the callbackData parameter if it is a pointer, it must be a pointer to something which is still topical at the moment that the callback executes. That is to say, you cannot pass the pointer to a local variable in callbackData as when the callback executes the pointer is no longer valid. You can switch from its value, instead, in this way:

    ... SomeFunction)

    {

    int sign;

    ...

    Panel = 2;

    PostDelayedCall (value_changed, (void *) Panel, 0.2);

    ...

    }

    void CVICALLBACK value_changed (void * callbackData)
    {
    int panel_ptr;
     
    panel_ptr = (int) callbackData;

    calculate_new_value (panel_ptr);

    return;
    }

    There are many discussions on the forums on callbackData parameter that you might want to read.

  • How to get the friend list and their IDS in the integration of Facebook using Facebook SDK

    can any body send me the code
    How to get the friend list and their IDS in the integration of Facebook using Facebook SDK
    I did after connection and wall

    Welcome on the support forums.

    Please check the strawberry sample that ships with the SDK

  • How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Hi all

    How to get the functionality of the Plugin BB10 webworks development using phonegap.

    Thank you all

    Here is a link to the documentation specifically: http://docs.phonegap.com/en/2.6.0/guide_plugin-development_index.md.html

    We will update the things little when we adopt a more close relationship with Cordova.

  • How to get the id of the CustomObjectData to a Datacard of elements using api BULK?

    Hello

    I would like to know how to get the id of CustomObjectData (3237 in the sample) for each entry in a data card. I am able to get this information, if I use the REST API. (See below) but I need to be able to get this information using the API as a WHOLE.

    Any ideas?

    URI: https://secure.eloqua.com/Api/rest/2.0/data/customObject/ {identifier}

    Answer:

    {

    "items": [{}

    'type': 'CustomObjectData ',.

    'id': "3237",

    "fieldValues can only be": [{}

    'type': 'FieldValue ',.

    "id': '192."

    'value': "Mr."

    },

    {

    'type': 'FieldValue ',.

    'id': '191 ',.

    'value': '{name} '.

    },

    {

    'type': 'FieldValue ',.

    "id": "190"

    'value': 'Brian '.

    },

    {

    'type': 'FieldValue ',.

    "id': '189."

    'value': '{email} ".

    }]

    .....

    }

    Thank you

    SAI

    Here's how:

    If you use the following statement when you create the export model, you should be able to get the id of the entry of the data card.

    {{Objetpersonnalise [30].}} ID}} instead of {{Objetpersonnalise [30].}} Field [190]}}

    I don't know how to get the date of creation and the date of update information. Any ideas?

    Thank you.

  • How to get the frame number current timeline using jsx?

    How to get the frame number current timeline using jsx?

    Thanks for the link!

    Clarification: I was looking for the current image on the timeline of the video. OP he mentions that he had found how to get that so I searched a bit more and found this thread: Re: can I inpoint in read/write and out-point of the clips in a group of video with scripts? They have the following functions, I have not tried yet, but it seems like it should work.

    function getCurrentFrame() {}

    try {}

    Var ref = new ActionReference();

    ref.putProperty (charIDToTypeID ('Rprp'), stringIDToTypeID ('currentFrame'));

    ref.putClass (stringIDToTypeID ('timeline'));

    var / / desc = new ActionDescriptor();

    desc.putReference (charIDToTypeID ('null'), ref);

    var TC = executeAction (charIDToTypeID ('getd'), desc, DialogModes.NO);

    Return TC.getInteger (stringIDToTypeID ('currentFrame'));

    } catch (e) {return null ;}

    };

  • How to get the storage allocated profile and used the plugin vCloud 5.1 Vdc

    How can I get the storage allocated and used for a Vdc in vCloud 5.1 plugin?

    VCloud plugin 1.5, there was a property of VclVdc.storageCapacity give us the space allotted, limit, use (s) and overhead costs.

    VCloud plugin 5.1 we allways null VclVdc.storageCapacity. Then VclVdc.getStorageProfiles () but presents the objects, there is that the "limit value".

    ¿WHERE are the other values?

    I have attached two screenshots. vCloud console shows the data, but not vCloud plugin.

    Thank you very much.

    Damian

    Tell me if this work. This was written in a few minutes.

    var host = vdc.getHost();
    
    var queryService = host.getQueryService();// toAdminObject().getAdminQueryService();
    
    var profs = vdc.getStorageProfiles();
    
    for each (var prof in profs) {
    
        var expression = new VclExpression(VclQueryAdminOrgVdcStorageProfileField.HREF, prof.getReference().href  , VclExpressionType.EQUALS);
        var filter = new VclFilter(expression);
        var params = new VclQueryParams();
        params.setFilter(filter);
        var resultSet = queryService.queryRecords(VclQueryRecordType.ADMINORGVDCSTORAGEPROFILE,params);
    
        while (resultSet != null) {
            var records = resultSet.getRecords(new VclQueryResultAdminOrgVdcStorageProfileRecord);
            System.log(records.length + " records found");
                for each (var record in records) {
                    //obtain data from record
                    System.log("storageUsedMB : " + record.storageUsedMB);
                    System.log("storageLimitMB : " + record.storageLimitMB);
                }
        resultSet = resultSet.getNextPage();
        }
    
    }
    
  • The knife tool develops a black line on the objects that I colored using the live paint bucket. How to get the tool knife to stop this and instead of being invisible?

    The knife tool develops a black line on the objects that I colored using the live paint bucket. How to get the tool knife to stop this and instead of being invisible?

    I understand that it is a live paint object you use.

    Try this:

Maybe you are looking for

  • HP Pavilion Elite m9600t memories configulation

    A few years ago, I bought this HP Pavilion Elite m9600t. It came with Windows vista x 64 with 6 GB of RAM (2 GB X 3). Currently this system is running Windows 7 Ultimate x 64. Now, I would like to add a few memories more. So, I check on HP web page t

  • Error updating LR CC via CC

    I'm trying to update my LR via CC, but when he is at 54 percent, it gives an error (U44M1I210).I deleted the uploaded file in the \AppData\Local\Adobe\AAMUpdater\1.0\Install directory to download it again without success. It gives me the same error.H

  • How can I move the pixels when the distance is decided by the strength of selection?

    Using the Liquify Filter and transform a few tools can yield results, but are simply not enough specific for me at the moment. I need 100% selected pixels to move 50% selected pixels of 1 cm. must move of 0.5 cm and 0% selected pixels move 0 cm.The e

  • Why a transition plays the role of a video that I cut on?

    I have a clip video, followed by a photo.  The video was cut to finish exactly where I wanted it.  What he does during playback.  At the end of the video clip, the image appears.   I wanted to transition, so I put in a fade.  When faints in the video

  • Thanks for the huge paper weight!

    Well my more $3000 laptop HP - HDX18-1200CTO model is now a paper weaight. The number of questions in the last two years, you don't honnering the free warenty of 90 days I got to pay for a problem that you guys did not set after my warenty orgnail en