Get the value of select Combobox data

Hi all

I have a major issue while trying to get the value of the items selected through the change event in a combobox control.  Here is my code... I really need help ASAP... Thanks in advance

public var test:ArrayCollection = new ArrayCollection([
            { Id:"one", Amount:2000 },
            { Id:"two", Amount:1000 },
            { Id:"three", Amount:200 } ]);

protected function regionCB_changeHandler(event:ListEvent):void
               {
                  Alert.show(//tried so many things here to acces the items amount field.. nothing is working
               }
<s:ComboBox change="regionCB_changeHandler(event)" dataProvider="{test}" labelField="Id" id="regionCB" visible="false" />

Have you tried selectedItem.Amount?

Tags: Flex

Similar Questions

  • HW 2 get the value to select only one option selected by the user in the bean support

    IAM using the select only one option button that is filled during execution.

    I want to get the value selected by the user of a choice selection in the bean to support for other operations of... .IAM using this method, but I got a null pointer exception.

    Public Sub test (ValueChangeEvent tokenChange)
    {
    Integer tokenIndex = (Integer) tokenChange.getNewValue ();
    DCIteratorBinding tokenListIter is getBindings1 () .findIteratorBinding ("TokenIDVOIterator");. in this line null pointer exception
    Token of the line = tokenListIter.getRowAtRangeIndex (tokenIndex.intValue ());
    currenttoken = (Number) token.getAttribute ("TokenId");
    System.out.println ("token ID selected:" + currenttoken);

    }

    I want to know if there is any method to get the value of the value selected by the user to select a choice...

    pls help? //

    3 words:

    "research on the forum.

    asked and answered countless times.

  • How can I get the value of a comboBox element in a grid?

    Hi all

    I have a DataGrid with some comboBoxes in two of its columns.

    What I need to do, is get these boxes of bombo values when a user highlights the line of the grid NOT when user use the comboBox control. I understand how to extract the values once the change handler is called on the drop-down list, but I don't see a way to get to the comboBoxes that belong to the gridRow highlighted.

    I'm sure it's really simple, but I'm not able to find a reference on how it's done. Any help much appreciated.

    Copy the following code shows how you can do it if you know the dataProvider for ComboBox data fields.

    If this post has answered your question or helped, please mark it as such.


    http://www.Adobe.com/2006/mxml '.
    Initialize = "initData ()" > "
      
       Import mx.events.ListEvent;
    Import mx.collections. *;
    private var DGArray:Array =]
    {Artist: 'Pavement', Album: 'Slanted and Enchanted' price: 11.99, combo1: [1,2,3], combo2: [100,200,300]},
    [{Artist: 'Pavement', Album: 'Brighten the corners', price: 11.99, combo1: [2,4,6] combo2: [200,400,600]}] ;
            
    [Bindable] public var initDG:ArrayCollection;
    public function initData (): void {}
    initDG = new ArrayCollection (DGArray);
    }
         
    private void dgChangeHandler(event:ListEvent):void {}
    var ac:ArrayCollection = event.currentTarget.dataProvider;
    txt. Text = "";
    txt. Text += ac.getItemAt (event.rowIndex) .combo1 + "\n";
    txt. Text += ac.getItemAt (event.rowIndex) .combo2;
    }
    ]]>
      


    dataProvider = "{initDG}" change = "dgChangeHandler (event); » >
         
            
            
            
            
             
              
               
                
               

              

             

            

            
             
              
               
                
               

              

             

            

         

      
      

  • Get the value currently selected in the drop-down list

    Hello Zac,

    I have a question to get the current value in a drop in export UI. Currently I have a custom fall that I fill with UTF16 strings down. I set up as follows:

    Field order
    (1) exNewParamInfo ParamName;
    (2) exParamValues ParamValues;
    (3) ParamName.structVersion = 1;
    (4) safeStrCpy(ParamName.identifier, 256, ADBEVideoFieldType);     FieldType is considered an example of existing code
    (5) ParamName.paramType = exParamType_int;
    (6) ParamName.flags = exParamFlag_none;
    (7) ParamValues.structVersion = 1;
    (8) ParamValues.disabled = kPrFalse;
    (9) ParamValues.hidden = kPrFalse;
    (10) fieldOrderParam.paramValues = ParamValues;

    exportParamSuite-> AddParam (exporterPluginID,
    mgroupIndex,
    ADBEBasicVideoGroup,
    and ParamName);

    I can then load my dynamically generated strings in the fall down (in ProstProcessParams) and they are displayed correctly.

    Then, I call upon export

    exportParamSuite-> GetParamValue (exID, 0, ADBEBasicVideoGroup, & ParamValueToBeReturned);

    to get the current value.

    However, I'm not UTF16 string. My guess is that's because the value of this field is UTF16 and not int (that I put in place on the line 5). I tried to use exParamType_string, but it gives me an editable text field.

    Then, how we configure a drop custom down correctly to obtain the current values of the string of her?

    Thank you

    Petro


    Hey Petro,

    During exSelPostProcessParams, in your calls to the AddConstrainedValuePair(), you have defined a type of integer values to strings mapping.  You can use the same mapping to determine which channel has been selected in the drop-down menu of the integer value passed from GetParamValue().  Integer values can actually be more accurate, because due to the location, the strings may vary.

    Looking at the code, you can make limited value of pairs with parameters of type exParamType_string.

    Kind regards

    Zac

  • get the value of entry to screen addresscontact

    Now, I get a request, that need to get the input value, when the user types in the contactscreen.

    I made this function in the form of dia. But in touch sreen, when I debug, I see that this only suply only a default manager, who have that one field which is a subclass of ListField, but it didn't provide any method to get the value of line or data.

    someone at - it a good idea, it's really confused me.

    Thank you

    Thanks for your reply stone.

    Now, I have solved this problem, there is a delegated manager which can to be obtained by the getDelegate() method. She take the field, I really want to. The BB help document is not convenient that the google android platform.

  • ([JDev12c, ADF] 1) how to get the value of a field of the line currently selected in question 2) af:table: flowScope

    Hallo,

    How can I get the value of a field in the row that is currently selected in an af:table?

    I need to pass this value to a setCurrentRowWithKeyValue who took the record to display in another (by a button) called page:

    Limited workflow

    Page1 - goToPage2-> setCurrentRowWithKeyValue-> PAGE2

    I defined a managed bean flowScope for the workflow in which I created the variable 'CodeToSetPage2Row '.

    I will store the value of the field for the selected line in this variable so that I can move on to the setCurrentRowWithKeyValue.

    Could be this method OK? Ore is there any good practice to achieve this goal?

    The managed bean flowScope used to go to the stubborn task may take some values from the outside?

    The workflow defined will be executed in a dynamic region.

    Thank you

    Federico

    Federico, you cannot use a flow variable scope for this page. The region has no access to the bean. You must use a workflow for this parameter.

    To get an attribute of the currently selected line you make slide data vo of control on the page attribute. This will create a link attribute for this attribute. Once this link exists, switch to source mode and remove the component that you do not want.

    The framework passes the value of the current row in this affair of the attribute (table should be in single selection mode).

    Click on the button, you switch the binding of the attribute for the setting of task flow using a setPropertyListener.

    In the workflow, you call the setCurrentRowWithKeyValue with the parameter of workflow as the default activity.

    Timo

  • [JDev12c, ADF] How to get the value of a field from the selected line in af:table and...

    Hallo,

    I want to double click on a line of an af:table to call a page that displays a form (based on a View object) with the details of the selected line.

    I need to go to the second page the value of a field on the line that is selected on the first page.

    How can I do this? In particular, how can I get the value of a field from the selected line? How can I call the second page on double-click on the af line: table?

    Thank you

    F.

    Why would user, you need to pass a value of the line to the shape?

    The framework selects the line you want to display in the form. All you have to do is to show the form with the selected line. It is the framework automatically as long as you use e vo even the same data control.

    Timo

    Post edited by: Timo Hahn
    And the handling double-clicks is described here http://www.oracle.com/technetwork/developer-tools/adf/learnmore/56-handle-doubleclick-in-table-170924.pdf

  • How to get the value in LIB in selection of LOV

    I have the designer generated form. Most of the logic is processed in Library.I do something about validation in £ QMS under Event_name = "key_commit." I have a LOV having the value 1. 2 current. unknown 3. recorded and coresponding parameter system CU, United Nations, RE respectively that return the value in the form field. Now, in the validation, I have to check if the status is 'current' and end_date don't thats not null then we should not allow to save the file and send the message. Keep in mind that I do in the library only if you guys tell me how I will get the value of LOV being selected and get it in / or provide library to comapare against the value of the system setting that is in the database
    -Check if there is an end date, but the status is still defined as 'current '.
    IF NAME_IN('RCBADG.) END_DATE ') IS NOT NULL THEN
    -Do the system_parameter_identifier for the entry labeled as "CURR.
    - AND the user set the value of the parameter (code for 'Current')
    Select parameter_value
    in v_par_value
    of system_parameters
    where cspara_identifier =(select identifier)
    of coded_system_parameters
    where code = 'CURR');
    -Get the identifier of status register coded for "CURR.
    Begin
    Select the identifier
    in v_crsta_id
    of coded_register_statuses
    where code = substr (v_par_value, 1, 4);
    EXCEPTION
    When no_data_found then
    v_crsta_id: = null;
    End;

    -Check if the status of "Current" is defined
    IF v_crsta_id = v_crsta_id1 then
    -v_crsta_id1 is drive where the value must be equal to system param 'CU' LOV selection
    QMS$ SHOW_MESSAGE('SSL-15008','E',TRUE);
    RAISE FORM_TRIGGER_FAILURE;
    ON THE OTHER
    null;
    END IF;
    END IF;

    I can only imagine that I have no idea what makes your library in detail.

    The event that you would get would be the WHEN-VALIDATE-RECORD (at least that's the trigger I would implement the logic).

    With respect to the verification of the value and the end date. I guess the Lov will return the value selected in some element in the block, then the comparison would be something like

    IF NAME_IN('RCBADG.END_DATE') IS NOT NULL THEN
      IF NAME_IN('RCBADG.THE_ITEM_WHERE_THE_LOV_VALUE_IS_TRANSFERED_TO')='CU' THEN
        -- Show some error here
        ERRoR
        RAISE FORM_TRIGGER_FAILURE;
      END IF;
    END IF;
    
  • get the values of the selected items to RichSelectManyChoice

    Hi all

    I have a RichSelectManyChoice

    When the user clicks on the "submit" button I want to get the values of the selected items...


    ----------------------------------------------------------page.jspx-----------------------------------------------------------------------------

    <? XML version = "1.0" encoding = "UTF - 8"? >

    " < = xmlns:jsp jsp:root ' http://Java.Sun.com/JSP/page "version ="2.1"xmlns:f =" " http://Java.Sun.com/JSF/core "

    ' xmlns:af = ' http://xmlns.Oracle.com/ADF/faces/rich "> "

    < jsp:directive.page contentType = text/html"; Charset = UTF - 8 "/ >

    < f: view >

    < af:document title = "untitled1.jspx" id = "d1" > "

    < af:messages id = "m1" / >

    < af:form id = "f1" >

    < af:panelGridLayout id = "pgl1" >

    < af:gridRow height = "100%" id = "gr1" >

    < af:gridCell width = '100% ' halign = "stretch" valign = "stretch" id = "gc1" >

    <! - content - >

    < af:selectManyChoice value = "#{bindings." CountriesView1.inputValue}.

    label = "#{bindings." CountriesView1.label}"id ="smc1.

    valuePassThru Binding = "#{suspect." Country}"="true">

    < f: selectItems value = "#{bindings." CountriesView1.items}"id ="si1"/ >

    < f: validator binding = "#{bindings." CountriesView1.validator} "/ >"

    < / af:selectManyChoice >

    < / af:gridCell >

    < / af:gridRow >

    < / af:panelGridLayout >

    < text af:button = "Button 1" id = "b1" action = "#{suspect.valide}" / >

    < / af:form >

    < / af:document >

    < / f: view >

    < / jsp:root >

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

    --------------------------------------------------------------------suspect.java-------------------------------------------------------------------

    package test.view;

    import com.sun.org.apache.xpath.internal.operations.String;

    Import oracle.adf.view.rich.component.rich.input.RichSelectManyChoice;

    public class suspect {}

    RichSelectManyChoice campaign private;

    String string = null;

    public suspect() {}

    ????????????????????????????????????????

    }

    public void valide() {}

    }

    {} public void setCountry (RichSelectManyChoice country)

    This.Country = country;

    }

    public RichSelectManyChoice {} getCountry()

    back country;

    }

    }

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


    Anyone has an idea please?

    Hello

    You can use

    JUCtrlListBinding listBindings = (JUCtrlListBinding) getBindings () .get ("CountriesView1");

    Object [] str = listBindings.getSelectedValues ();

    for (int i = 0; i)< str.length;="" i++)="">

    System.out.println (STR [i]);

    }

    in this loop, you will get all the values of selectManyChoice, for details see Ashish Awasthi (Jdev/ADF) Blog: using the selection Multiple (component selectManyListbox & selectManyCheckbox) in ADF

    hope it helps

  • Cannot get the value of the selection of OAMessageChoiceBean

    Hello

    Of our 11i to R12 upgrade, in the customer's advanced search page, we are unable to get the handle suitable for OAMessageChoiceBean (in extendedCO).

    The snippet for the bean handling is as follows:

    OAMessageChoiceBean PartyStatusFilter = (OAMessageChoiceBean) vOAPageContext.getRootWebBean () .findChildRecursive ("xxfeF426PartySearchStatus");
    String xxTest = PartyStatusFilter.getSelectionValue (vOAPageContext);

    The value of the above xxTest (in R12 approx.) is coming with a null value. Considering that the same code works in 11i environment and the xxTest output = "A".

    So we cannot get the value of the selection of the messagechoicebean in our environment of R12. I already looked in previous similar positions in this forum, also tried to use getSelectionText (vOAPageContext) or getSelectedValue(), however, it did not work.

    Pointers please?

    Thank you very much
    Zahid

    Hi Zahid,

    Try with this ID = HzPuiPartyStatus

    -Had

  • How to get the value if the function selection cursor?

    Hello, I have a problem with the cursor, I can't get the value, please help me
    example of
    declare
               bien varchar2(30000);
               cursor cs3 is SELECT DBMS_METADATA.GET_DDL('TABLE',TABLE_NAME) as structure FROM user_tables ;
    begin
     for w in cs3
      loop
            bien:=bien||*w.structure*||'+';  -- w.structure not run  or w.DBMS_METADATA.GET_DDL('TABLE',TABLE_NAME) not run too ?
      end loop;
    end;
    Thank you

    First of all do work, then make it fancy.

    First operate for a single table, before too much complication with LOOP for each table, the schema property.

    If you cannot get the results desired for a single table, then he fails for each table.

  • How to get the value of a selected character unicode?

    Hi all

    How to get the value of a selected character unicode?

    The content property of a 'Character' InDesign object is a simple Unicode string. For access to the various characters is a basic javascript operation, and a google gives this as a good first result: http://www.w3schools.com/jsref/jsref_charCodeAt.asp

    Therefore, the value of a selected character unicode is

    App.Selection [0]. Characters [0].contents.charCodeAt (0)

  • Get the value in the selection of message

    I need to read a value from a choice of message and when a button is clicked an event is triggered.

    I've coded this way but I can't get the value of the choice of the message.

    If (("ApplyBTN".equals (source)) & & (!)) » ». {Equals (source)))}

    OAMessageChoiceBean = dropDownAction

    WebBean.findChildRecursive ("DropDownList") (OAMessageChoiceBean);

    String valueSelected = dropDownAction.getSelectionText (pageContext);

    String valueSelected1 = (String) dropDownAction.getValue (pageContext);

    System.out.println ("valueSelected" + valueSelected);

    System.out.println ("valueSelected1" + valueSelected1);

    }

    Varun,

    In addition, for the choice of message, you can try the options below:

    1 try this code:

    String selValue = (String)pageContext.getParameter("DropDownList");
    

    2. for a choice of message, you need not specify pickListViewDef and pickListViewName. So just delete the pickListViewName.

    
    

    3. is there a particular reason that you have associated with the View object for this? If you do not need this to eliminate viewName and viewAttr also.

    
    

    See you soon

    AJ

  • How to get the value selected inside the forEach loop

    Hello
    I have foreach loop with a link inside command. It looks like in below:

    * < af:forEach items = "#{PagingBean.pages}" var = "item" > * "
    * < text af:commandLink = ' #{point} "id ="cl1. "
    * actionListener = "#{PagingBean.pageLinkClicked}" / > * "
    * < af:spacer width = "10" height = "10" id = "s1" / > *.
    * < / af:forEach > *.

    where PagingBean.pages is an array of integers.
    Now the links look like this * 1 2 3 4 5 * I want to get the value of the clicked link.
    Anyone please help me to get the value of commandlinks clicked in the bean

    Hello

    How about the text in the actionListener for the clicked commandLink and process accordingly?

    Ex:

     
                           
                           
    
    
        public void pageLinkClicked(ActionEvent actionEvent) {
            // Add event code here...
            System.out.println(((RichCommandLink)actionEvent.getSource()).getText());
        }
    

    Arun-

  • Cannot get the value of the session variable (using row wise initialization).

    Hi all

    I have a scenario where I'm trying to get the value of the variable session of two columns.

    Table of database consists of the name of USER, Country_Region, columns Country_SubRegion.

    For example: ChadraKanth, Americas, America West is the data.

    I wrote a Sql query in the block of session initialization:

    Select "CR", Country_Region, Country_SubRegion

    of row_wise_init

    where USERID = ": the USER"

    When I test the RPD code gives the result like this:

    CR WesternAmerica of Americas.

    In my report I have two columns, a region and an another subregion.

    When I try to filter with the session variable "CR" for the column region his error giving: session variable is not initialized with

    This is the default.

    Question:

    1. session variable is contains several values in the column?

    2. how to filter the report on columns of region and sub region?

    Please suggest me.

    Kind regards

    Chandra Khalil.

    Hello

    A session variable cannot store more than one column, 1 variable = 1 value (column 1), horizontal initialization allows to store several lines, multiple values in the same variable.

    If to a user, you have several lines with multiple values, you need horizontal initialization, but it cannot store in the variable the value of the region and subregion.

Maybe you are looking for