Index value of combobox layout

I have a combobox that I'm filling some XML.

The XML code is as follows

<?xml version="1.0" encoding="UTF-8"?>
<eventTypes>
  <eventType>
    <eventTypeID>1</eventTypeID>
    <eventTypeDescription>Event</eventTypeDescription>
  </eventType>
  <eventType>
    <eventTypeID>2</eventTypeID>
    <eventTypeDescription>Seminar</eventTypeDescription>
  </eventType>
  <eventType>
    <eventTypeID>3</eventTypeID>
    <eventTypeDescription>Social Occasion</eventTypeDescription>
  </eventType>
</eventTypes>

I am populating the comobobox using an array collection based on this XML.

What I want to be able to do is set the index for each item in the combobox equal to the eventTypeID node in the XML.

Is it possible to do this? If so how.

Currently my MXML for the combobox is like this

<mx:ComboBox id="calendarEventTypeID" dataProvider="{eventsTypeDataProvider}"
     editable="false" labelField="eventTypeDescription"/>

Thanks for any help.

comboBox.selectedItem eventTypeID , you can send to the server to record in db.

Are you able to see the drop-down list box? I think he must have data & label property on objects you are adding to the comboBox dataProvider. In the data , you can set value eventTypeID & label will be visible to the user.

Tags: Flex

Similar Questions

  • Index value of parameter problem on ComboBox

    I'm running into a problem with the definition of the index on a drop-down list box. I'll try to give as much detail as possible. From what I can tell, it must work and do, but only for a single item. If anyone can suggest another group to publish on, let me know. I can't find a solution anywhere.

    I have the following code to display a combobox control. The figures are from a configuration XML file. The combobox itself works very well and in fact shows all the data from the XML configuration file.

    < mx:HBox >
    < mx:Label text = 'Status' width = "55" / >
    < mx:ComboBox id = "uxstatus" dataProvider = "{_xmlVulnStatus}" = 'status' labelField / >
    < / mx:HBox >

    The part of the XML config file that is used to populate the combobox control.

    < mainconfig >
    < vulnstatus >
    < status > Open < / status >
    < status > current < / status >
    < status > Closed < / status >
    < / vulnstatus >
    < / mainconfig >

    Now, when a user selects an item in a separate DataGrid, on change, I have run the following function. The function reads the data, analysis and compares the value of "status" of the info of datagrid with the options of 'status' in the configuration XML file. When it matches, it sets the combobox's index number so that it shows the right data. My problem is the function below.

    public void parseMSVulnStatus(evt:Event):void {}
    var xmlMSV:XML = XML (msdetailed.selectedItem); the host of dataProvider item
    trace ("status Vuln MS =" + xmlMSV.status);
    for (var MSVi:Number = 0; MSVi < _xmlVulnStatus.length (); MSVi++) {//loop over the in the dataProvider}
    var sDataValueCurMSV:String is _xmlVulnStatus [MSVi] .valueOf ();. get the current value of the item.data
    If (sDataValueCurMSV == xmlMSV.status) {//compare desired value current value of the item.data
    mx.controls.Alert.show ("match found - status Vuln MS =" + xmlMSV.status + "and MSVi ="+ MSVi ");
    msstatus.selectedIndex = MSVi; the value of the seletedIndex from the drop-down list box
    }
    else {msstatus.selectedIndex = - 1}
    }
    If (msdetailed.selectedItem.falsepos == 'Y') {msfalsepos.selected = true ;}
    }

    The problem. If the value of the data grid is 'Closed', it shows the index as being '2' and sets the index of the combobox in a proper way and shows 'closed '. The alert box is displayed (for testing) to display the values.

    If the value of the data grid is "Open" or "Ongoing", it shows the appropriate index as being equal to 0 or 1, respectively and shows the alert box. However, it seems that the drop-down list, the value - 1. I checked that data are set correctly in the database (which is what fills the datagrid control).

    Any ideas on that? According to my alert box, it seems that the data are properly seen and he knows how to set the index of the combobox... it simply not happen (unless it is 'closed').

    Thanks in advance.

    Chris

    It seems you need to add a break to your loop when he finds a positive match. This would explain why it works for the last item in your xml file, but fails for others.

    msstatus.selectedIndex = MSVi; the value of the seletedIndex from the drop-down list box
    break;

    Vygo

  • Get the current index value of the table control

    I have a table control 1 d on a panel that contains a value of temperature curve that I send to a temperature controller. The values in the table are not unique, because for example 40.5 degrees in the table could represent 40.5 degrees on the cycles of cooling or heating. I could have severat heating/cooling cycles programmed into the table. I would like a way to read the array index of the currently displayed item in the array in the up/down control of index on the left of the table control. I could then run curves partial temperature easily by neutrophilia a starting point on the curve in the table control.

    I don't see a property that I can use to get this index value. Anyone have any ideas?

    Thank you

    J

    Use the property 'index values. It will be the first item of the output of a 1-d array.

  • How to find the bpel instance in 11 g based on the index values

    We have 10 GB BPEL processes where we define the 4 index values for all instances. Whenever the support request comes, ask us the values of index and based on what we're looking for the process instance.

    We have now migrated bpel 10g and 11g process. How to find the bpel instance in 11 g based on the index values?

    You can go there. http://soasphere.blogspot.com/2011/04/how-to-Serch-composites-for-index.html. Do a join on the cube_instance and ci_indexes tables.

  • While (list ($index; $value) = each ($array)) {echo "Wtf?" ;}

    Hello comrades!

    I'm new to PHP and now I'm stuck at list(); and each(); functions.

    Can someone explain to me the meaning of:

    list ($index; $value) = each ($array) ?

    I understand that the meaning of the variables in the present code:

    $array [index] = 'value ';

    But what is the meaning of the equation in the parenthesis of the cycle while ?

    Thank you people!

    DissidentPJ

    ya that's how to use it. I had to search what each() done haha coz I do not use it

  • The value of ComboBox selectedItem

    I've seen half a dozen of the solutions to this on the internet, but somehow, they don't work. Basically, I just want to put the selectedItem of a combobox control:

    < mx:Combobox id = dataprovider="{httpserv.lastresult.system.data}"/ "comboboxID" >

    ActionScript is not working
    comboboxID.selectedItem = 'something';

    So I tried to make a loop on the comboboxID.dataprovider to find the index for 'something', but he will never give me the ropes of dataprovider, rather it sends me errors like this:

    WARNING: cannot bind to property 'name' class 'String' (class is not an IEventDispatcher)

    How can I get this to work?

    Thank you.

    Thanks for the interest. I think the problem was somehow in the way which I define my own custom drop-down list. I finally gave up and just to write a loop to get the corresponding index and set manually. Maybe not the best solution, but it works...

    combo.selectedIndex = setComboBox (combo, "label_name");

    private void setComboBox(box:ComboBox,_val:String):int {}

    for (var i: int = 0; i

    If (box.dataProvider .name == val) {//compare desired value current value of the item.data
    box.selectedIndex = i; the value of the seletedIndex from the drop-down list box
    trace ("found clue:", i);
    Return i;
    }
    }
    return 0;
    }

  • L7780 WPA - PSK index value

    Hello

    I think it's pretty simple, but I am unable to find a concrete response so far. The settings of the wireless on the L7780 interface supported by the selection of an index key other 1 to search for wireless networks.

    For example the unit sees my network, I can enter key communicated in advance through the menu before, but don't connect not because of the value of key index being other than 1.

    Your help is greatly appreciated.

    See you soon!

    I wonder if you meant index WEP as WPA - PSK does not use the concept of a key index.

    To change the index WEP, temporarily connect the L7780 with an Ethernet cable to your network and browse the web page internal printer.  Select wireless, wireless network, and then modify the index WEP as you wish.  Unplug the cable and the printer must connect to your wireless network.

    Just curious - must - use you WEP?  Can you switch to WPA - PSK?

  • Extract the supplied index value of array element

    Hello

    A similar question might have been asked before, but I couldn't find one that exactly matches what I want. Also, I'm using labview 8.5 so could not read most of the views that you guys tied with other solutions.

    The files that I use are attached. Test_FIFO_TimeTagging-Nov16 - try1.vi is the main vi.

    The absolute time in milliseconds in the table of resorption. As can be seen, it is derived from the berries Micro2 and Macro2. I want the user can specify the duration, that is, whether the current item in the table of absorption has a value greater than the value of the user entered, so I want the index of this item in the resorption so that I can use this index to create Micro2 and Macro2 subtables that contain only items from index 0 to index I get resorption.

    I do not know how to retrieve the index of an array given the value of the element, so can't go forward.

    Thank you

    Kaiser

    Hey Kaiser,

    the function that you need is 'threshold 1 d table '. (I guess that your time values are sorted, otherwise using subdashboards makes no sense...)

  • OEID 3.1 get the index value in a multi-assign set attribute

    Hello

    In OEID 3.1 EQL represents assign many attributes of the corpus as defined. How can I get a single value from this overall picture? If the table contains only one value, how can I get this value as the value of the single award and not a game/table.

    http://docs.Oracle.com/CD/E40518_01/server.760/es_eql/TOC.htm#sets%20and%20Multi-assign%20Data

    Thank you.

    1. "How can I get a single value from a game?

    If I understand your question, I think that you want to use a universal or existential (SOME) (ALL) qualifier for records based on a unique value that exists in a return set.

    They are documented here:

    "+ gMapTitle +".

    In the example for the qualification of SOME, the two important lines are:

    SELECT bodyAttr AS body

    WHERE SOME IN x body SATISFIED (x = "robust")

    This means that the query is basically this:

    1. Select the multi-assign Body attribute and its values as a set back.

    2 values in this organization has set, return every record that has an assignment of "Robust" in its attribute of body. In other words, you use the value "Robust" (throughout the body) to get the records you want.

    2. "If a set contains only one value, how can I get this value as the single entitled value and not a game?

    Whatever the number of items is in a game, you can use the IS_MEMBER_OF function to test if a given value is in this value. The given value can be a single-assign attribute. However, I'm not sure if that's what you're asking.

    In both cases, keep in mind sets that were put in place because to 7.5 (and previous), EQL chooses an arbitrary value of a multiple assign attribute for each input record, rather than select all attribute values. Sets now allow EQL select all values in a multiple assign attribute.

  • Default value for ComboBox?

    Y at - it a way for you to set the default value for a drop-down list box. Let's say that the combo box is there, but the user doesn't have to interact with him. How can affect the value of the combo box value without user intervention?

    myCombo.selectedIndex
    
  • Data value of ComboBox

    Hi all

    I have what should be a simple problem to solve, but I am new to Flex and Google has failed me.  I'm working on a Flex app where I have a combo box that has a query of database as the data provider. Everything works fine except one small detail.  I want to have the spectacle of the label name, but the value of this tag to be a number.  For example my database table has in there names that are associated with an ID which is the primary key:

    Name ID
    John Doe1
    Jane Doe2
    Jim Jones3

    I want the combo box to display the user name, but the value of what is selected is the number.  How do I do this in flex?  If I did that in ColdFusion, it would be easy, but I can't understand how to do this in Flex.  In ColdFusion, I would do something like:

    In this example the user would have shown a simple water drop down with names, but behind the scenes you would actually be to select the ID of the same name which is necessary for a subsequent query.

    It is possible that I am so used to programming ColdFusion I go about it completely wrong, but I don't know where to begin the search.

    Any help would be greatly appreciated.

    If it was just fed an arrayCollection collection, you should be able to charge like this

    countyName.selectedItem.ID
    

    change "ID" some hidden node you want to output. Try something like:

    
    

    and see if it starts to come out the identification number in the console of flex.

    It works in this small example, I just write

    
    
    
        
            
                John
                994563
            
            
                Sally
                123564
            
            
                Mary
                131233
            
            
                Robert
                33324
            
        
        
    
    
    

    same theory behind it. Allows you to access a hidden quickly field without displaying directly to the user.

    I would like to know if this is what you wanted

  • Replace the index of an array with strings values

    I have a control table 2D (or indicator) CH x T: each cell of the table contains the voltage check for channel and time represented by the respective row and column.

    I would like to be able to scroll the data showing the names and time values to the Index screen instead of numeric values.

    For example, instead of see 0,1,2,3 etc. as line index values, I would like to see channel 1, canal2, canal3 etc..

    Is - it somehow possible?

    Any idea is welcome!

    Thank you in advance!

    See you soon.

    MG

    If you want to display the data in the form of a 2D array, but use channel & time as the Index display, you can use the rings of text and structure of the event.  You can reduce the table view if you only want to display one value.

  • How can you get the index of an enum rather than the enumeration value?

    IM new to labview and I'm trying to read the index of an enum object to the string value has the enum.

    that is for example an enumeration of the values 1, 5, 10, 20 with markings 0,1,2,3 I want to take the index value to use in a code as a string.

    in order to make the values of 0,1,2,3

    Are there simple solutions?

    See you soon,.

    JimJamBot

    It is already a number.

    Try to use a "I32" or similar in the digital palette.

    Ben

  • How better to insert a subarray (line) in a 2D array to the correct index which is based on the value of the first column

    Hello

    I would like to insert a subarray (line) in a 2D to the correct index table. The position is to say the index value depends on the value of the first column of the table 2d.

    As an examlple my 2d array would look like this

    230 50 215 255

    300 60 270 330

    360 20 350 370

    And I would like to insert another line (subarray) with the following values

    320 40 300 340

    This new line should be placed between the second and third rows (this is based on the first column only).

    I tried the threshold 1 d function table by taking an 1Dsub array of my 2d array (first column), then using the first of the new line (320) as the threshold. It sort of work, but it does not work when I start the table (IE there is only 1 row) and it seems to not work properly on other occasions (as explained in the help of Labview).

    Hopefully the explanation is clear enough for any suggestion. Thanks in advance for the help!

    JTRI wrote:

    The idea is I have start with a new table and add these lines in the right order every time that the user sets the values Jack

    Ahh, so try this.

    This will also work with an empty array.

    You want to do with this function it is a Subvi.

    Make the entries 'table' and 'subarray"on the connector, then 'new array' output.

    You can then put this Subvi in a loop with a registry to shift and it will help to add new lines in a sorted order, when they are added.

    That is what you were aiming for?

  • Separate s processed NULL values in indexes

    http://docs.Oracle.com/CD/B19306_01/server.102/b14220/schema.htm#i20690

    Indices and null values

    NULLthe index values are considered as distinct except when all non - NULL in two or several lines of an index, the values are the same, in which case the lines are regarded as the same. Therefore, UNIQUE i index prevents the lines containing NULL values to be treated as identical. This does not apply if there is not a no - NULL values - in other words, if the lines are fully NULL .

    The bold part: who's trying to tell me that the lines for the NULL indexed lines, that if these indexed 2 NULL values maintain the same values for the rest of the line that oracle treats as unique to them?

    That being said, the bold part is qualified with this statement:

    Therefore, UNIQUE i index prevents the lines containing NULL values to be treated as the same.




    In fact all this 2 average values in a single column being zero, with the rest of the line being exactly the same, is not treated as identical.


    I'm sure that's what the DOC tries to explain.

    Consider that you have a composit index SINGLE a two columns COL1 and COL2. And you want to insert some values like this

    ROWNUM COL1, COL2
    ------- -------- --------
    1 1 NULL
    2 2 NULL
    3 3 NULL
    4 3 NULL

    NULL values in the index are considered to be separate

    This statement indicates that NULL in COL2 values are considered to be UNIQUE values. If the NULL in COL2 ROWNUM 1, 2 are considered to be two different values.

    But the following statement

    except in the case of all values not NULL in two or more rows of an index are the same, in this case, the lines are considered to be identical

    This statement says ROWNUM 3, 4 for COL1, where they have identical values, where the NULL in COL2 value are not considered as UNIQUE values but as identical. That's why the 4 ROWNUM insert will fail with UNIQUE constraint violation.

Maybe you are looking for