Easy way to have a dropdownlist control with without a separate dataProvider?

Hi all

Sometimes I have a DropDownList control that I want or need to bind to an object separate dataProvider.  For example, if I want a DropDownList control that the user and the use of select the quantity of something - I just want a DropDownList control that lists the numbers 1 to 10, maybe.

First, I tried something like this:

< s:DropDownList = "0" right = "0" width = "50" dataProvider = "{[1,2,3,4,5,6,7,8,9,10]}" / >

But, the compiler generates an error saying: it cannot convert from an array of IList.

I finally came to this and it works, but it is not as compact as I was hoping.  This is the simplest way, or I can refine it?

<s:DropDownList y="0" right="0" width="50" id="numberOfInstructorsDropDownList">
     <s:dataProvider>
          <s:ArrayList>
               <fx:int>1</fx:int>
               <fx:int>2</fx:int>
               <fx:int>3</fx:int>
               <fx:int>4</fx:int>
               <fx:int>5</fx:int>
               <fx:int>6</fx:int>
               <fx:int>7</fx:int>
               <fx:int>8</fx:int>
          </s:ArrayList>
     </s:dataProvider>
</s:DropDownList>

Yes:

Tags: Flex

Similar Questions

  • Y at - it an easy way to have a version number that the code VI has access to, and which is used as the version number for the executable file and the installer builds?

    Y at - it an easy way to have a version number that the code VI has access to, and which is used as the version number for the executable file and the installer builds? Now whenever I update my software I need to change the global variable where I store the version number, and then when I build I have in hand, open the properties and change the version number for the executable file and the installer. Is there an easy way to make these as all corresponding automatically?

    Have you tried a search? This question comes up a LOT. Here are the results of a search: http://forums.ni.com/t5/forums/searchpage/tab/message?location=Node%3A170&q=application+version#mess...

  • Lance Muse problems, every time I launch Muse, it crashes, I have re-installed twice with without success.

    Lance Muse problems, every time I launch Muse, it crashes, I have re-installed twice with without success.

    Hello

    It might be because of permissions. If you are on a MAC, you can give permissions ' read & write ' to everyone on the following folders: -.

    (1) ~/Library/Application support/Adobe

    (2) / Library/Application Support/Adobe

    ~/Library/preferences/Adobe 3)

    On a windows machine, please give all permissions for all on: -.

    (1) C:/Program Files(x86) /Adobe

    Files(x86) /Common 2) C:/Program Files/Adobe

    Kind regards

    Neha

  • Is there a DropDownList control with multiple selection?

    Is there a DropDownList widget or something similar that allows more of a menu item to be selected at the same time?

    (I'm looking for a simple way to view and set options of power that does not have a lot of space on the Panel and can still be created dynamically).

    You could add a character of ticks.

  • y at - it an easy way to convert w7 64-bit with VMware vCenter Converter Standalone

    Hallo

    I am struggling with the VMware vCenter Converter Standalone with windows XP everthing works well...

    I would like to convert a 64-bit Windows 7 computer and run it on a windows 7 64 bit with vmware player > 4

    I get a blue screen and message windows cannot be bootet normally...

    Thanks for any help

    was soon rene

    Welcome to the community,

    It is most likely a problem with the virtual drive created for the converted virtual machine controller. Unless you specify the correct controller ("LSI Logic SAS' for Windows 7) type in the Converter Wizard, you can end up with an IDE controller.

    André

  • Have no control with the mouse on my Satallite P300-123

    I have a problem with my mouse on the laptop. When I use the mouse, the mouse is every time left right up down.
    So I have no good control with the mouse.

    Can someone help me with this probem?

    (Sorry for my English)

    Hello

    Do you use the touch pad or external mouse?
    If you use an external mouse disable touchpad by using the FN + F9 key combination, especially when you use the keyboard.

  • Jdev ADF BC 11.1.1.0.2: how to create a dropdownlist control that is based on a list fixed?

    Hello

    With the help of Jdev 11.1.1.0.2, a search form is created according to a view critiria. One of the attributes in the search criteria should be a dropdownlist control with a list of values "N, O, S.

    In Jdev 10.1.3 I was able to set up a selectOneChoice based on a fixed list. The fixed list values can be entered.

    Is this possible in Jdev 11?

    Thank you very much.

    Annie

    I still don't know your scenario, but this is the case if you have defined criteria of display and based on it to use af:query component to search and instead of input field you want to have the list based on static values box:

    1. create the new object from view as a static list, create the attribute, set it as the primary key and define the list of static values
    2. in the view object with your view criteria go to attributes, select only the one you used in view criteria and click on + to add the list of values
    3. in the list of values Wizard Select ListData Source, attribute of the list and in the indications of the user interface, select attributes to display

    now when you run your page you will have the list of static values in the combobox as a value pick for research

    Kind regards

    Branislav

  • A way to have fields update automatically?

    I'm sure this is a stupid question, but I would still like to know.

    Let's say I have a table in a database.  And its structure is as follows:

    users

    COMPANY_ID

    name

    E-mail

    admin_id

    Is there a way to have admin_id automatically fill with the same number which is incremented automatically in the company_id field when a new record is created here?

    I know in Access, you can create relational databases and have that happen, but I can't find a way to do this in PhpMyAdmin.

    Here's my server info:

    PhpMyAdmin 3.3.9

    MySql 5.0.7

    Thank you!


    > Then, how would put a day start ID in the table user make

    > these days appear necessary?  As the week begins on Thursday

    > and not Monday as in my example?

    You don't need a recordset for the days of the week. Just store the day of departure and use math date in your loop to create the names of days in the header.

    > If I had a calendar that kept the schedule and the user_id of table

    > he has been associated with - who would not become too much information

    > for the server to manage quickly?

    No, not at all. A good DBMS can handle tables with millions of rows.

    > I thought to limit it to the two annexes - he would smoke less on the

    > amount of information that had to be stored.

    I'm not this suite. The calendar is associated with an employee, correct? Don't you still have more than two annexes?

    > That I don't get.  I've read a lot about this, but I read that

    > you can't create a relationship of the tables more in phpmyadmin.

    > How can I do this?

    I use MySQL, if I am not familiar with the features of phpmyadmin. I thought it was able to create a foreign key relationship, but maybe not. In any case, it does not matter. Foreign key constraints are used to enforce referential integrity, but this does not mean that you do not have logical relationships. In a relational DBMS, you always have relationships. Do not even worry about the FK constraints for now.

  • Easy way to return a graphic/symbol?

    Is there an easy way to return a graphic/symbol? Without having to type in javascript?

    Select your png can use the transform tool and use the handle to drag the image to the original limit of the opposite side. Put a guide to keep the same size.

  • Can I remotely from a computer that does not have control with LabVIEW?

    Hi, I have a PC at work that has LabVIEW (LV) installed, and I order several machines using a GPIB/USB interface. I would like to be able to control them remotely, at home, so I can start new experiences without having to enter in my lab. However, my PC at home isn't LV what are my options to achieve this?

    The most obvious solution is to use a software that allows me to remotely control the PC of my work, and then do that. However, it would be nice if there is an easy way to interface directly with LV. For example, something where he would create the VI as a Web page, and then I could see it in my browser to home or something. Is there something like this?

    What are my options to control everything from home, without LV on my PC at home?

    If "at work" is a reasonable society, there will be a firewall and it would be difficult to do anything without their approval. Connections to the internal network from external random places are usually blocked for good reasons. Talk to your first COMPUTER service.

    Assuming that you can connect to the remote computer, you can start reading here. Be aware that several modern browser (e.g. Chrome) is no longer support or allow NPAPI plugins, then your choice of browser style are limited.

    A better choice is direct on the remote control. This allows you to fully control the LabVIEW application, start it even if it is not active, loading/saving files, etc.

    I generally use Chrome remote desktop. I can connect to one of my computers from anywhere, even if both computers are located on networks private behind a NAT or firewall. Works great!

  • Y at - it an easy way to change the stacking order of the controls on the front panel

    I have two controls. I would like to place the smaller one on the largest. Is there an easy way to change the stacking order?

    Thank you

    Chuck

    On top of your LabVIEW façade, there is a button that looks like two arrows going in a circle.
    Select the control, and then press "Send backward".

  • Explorer.exe: "this file doesn't have a program associated with it for performing this action. Please install a program or, if such is already installed, create an association in the default programs control panel. »

    I find this weird problem affecting that explorer.exe and not any other .exe files. When I open explorer.exe in the taskbar or the C:\Windows\explorer.exe, the dialog box opens and indicates "this file does not have a program associated with it for performing this action. Please install a program or, if such is already installed, create an association in the default programs control panel. ». The control panel default programs Dosen t State .exe in the list of protocols and I find it complicated to press the windows logo and click computer each time. Please tell me that there is a way to solve this problem by means of edit this record.

    I have not tried running sfc/scannow then chkdsk/f, two found no error.

    -------------------------------------------------------------------------

    Name of the operating system Microsoft Windows 7 Ultimate
    Version 6.1.7600 Build 7600
    Manufacturer of operating system Microsoft Corporation
    System Type X 86-based PC
    Processor Intel (r) Core (TM) 2 CPU Quad Q9300 @ 2.50 GHz, 2500 Mhz, 4 Lossnay, 4 logical processors
    Windows directory C:\Windows
    System directory C:\Windows\system32
    Boot Device \Device\HarddiskVolume1
    Locale Singapore
    Hardware Abstraction Layer Version = "6.1.7600.16385".
    Normal time zone schedule Malay Peninsula
    Installed RAM GB 5,00
    3.00 GB total physical memory
    936 MB available physical memory
    12.5 GB total virtual memory
    9,88 GB available virtual memory
    Page file space GB 9.47
    Paging file C:\pagefile.sys

    Hello brandongwh,

    Check out the post here for help with a solution that should help your problem with Explorer.exe.

    If this does not help, then please reply back and let us know.

    Thank you

    Marilyn
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • My m4v videos to view a preview, but now it is a generic white band 'film' with a blue dot. I used to fly over the icon and preview would play. Previews were an easy way of the video ID. How can I restore previews?

    My m4v videos to view a preview, but now it is a generic white band 'film' with a blue dot. I used to fly over the icon and preview would play. Previews were an easy way of the video ID. How can I restore previews? OS X El Capitan 10.11.4

    I'm ' dropped in ' the answer! By changing the name of the ".m4v" to ".mov" file preview is now fixed! Billy just got lucky...

  • Have problems and questions with Time Capsule were addressed in any significant way. Reluctant to buy according to your comments.

    Have problems and questions with Time Capsule was dealt with in a meaningful way? Reluctant to buy according to your comments.

    Apple did not have any material changes to the time Capsule to nearly 3 years. The only change that has occurred in the last 18 months or so is a firmware update to address security issues.

  • Is there an easy way to add text to a chain control / indicator and keep the colors

    Hello

    Bassically I want to add text to a chain control / indicator without losing the formatting of the previous text.

    For a part of a program that I create, data will be transmitted to and from a serial device. I want to display this data in a chain control / indicator and change the color of the text of certain strings depending on data type (sent, received). Basically as a nice log window.

    At the moment, I update the chain control / indicator by reading the text and concatenated with the new string. However, this method removes the colors of previous text :-(

    Is it possible to add data to the control of the chain / indicator without losing the text previous formatting?

    I started to create a sub vi who reads a text both character and adds a new element in an array (offset color and text), if the color is distinguished by the previous character. Only problem is it seems to be quite time CPU.

    Thanks in advance,

    Matt

    MattB-5906 wrote:

    Is it possible to add data to the control of the chain / indicator without losing the text previous formatting?

    Actually, no. This means that you will have to use workarounds. Your workaround solution seems a bit involved. Basically, all you need to do is just to keep track of the pairs of end start/selection selection that must be colored in a table. Then just you loop in this table to color the text marked by the power positions.

    An alternative is to use a different indicator. Rather than an indicator of the string, you can use a table with a column. You can then set the foreground color on a cell by cell basis, and add a new line (row) will not affect the coloration of the previous lines.

Maybe you are looking for