How to get selected item value and display text in selectOneChoice ?

Hi
Thank you for reading my post
I bind the a selectOneChoice component to my backing bean so i have an object which represent this component in the backing bean.
now i need to find which item is selected by use , i know that i can use
getSelect_service().getValue.toString() , but it will return the value of the selected item, how about its display text ?
I should say that i create an static list for selectOneChoice items.
thanks

Using JDeveloper 10.1.3.1, freshly downloaded off OTN. I used the following code to try and identify the problem you are encountering. I attempted to use a valueChangeListener in combination with af:selectOneChoice components that use SelectItems and the singular SelectItem. I could not reproduce the error in either case. Please post more information about your development environment.
          <af:selectOneChoice label="Label 1"
                              binding="#{backing_test.selectOneChoice1}"
                              id="selectOneChoice1"
                              valueChangeListener="#{backing_test.valueChangeListener}"
                              autoSubmit="true" immediate="true">
            <af:selectItem label="1" value="1"
                           binding="#{backing_test.selectItem1}"
                           id="selectItem1"/>
            <af:selectItem label="2" value="2"
                           binding="#{backing_test.selectItem2}"
                           id="selectItem2"/>
            <af:selectItem label="3" value="3"
                           binding="#{backing_test.selectItem3}"
                           id="selectItem3"/>
          </af:selectOneChoice>
          <af:selectOneChoice label="Label 2"
                              binding="#{backing_test.selectOneChoice2}"
                              id="selectOneChoice2"                              valueChangeListener="#{backing_test.valueChangeListener}"
                              autoSubmit="true" immediate="true">
            <f:selectItems value="#{backing_test.items}"
                           binding="#{backing_test.selectItems1}"
                           id="selectItems1"/>
          </af:selectOneChoice>
    public void valueChangeListener(ValueChangeEvent evt){
        // returns a UISelectOneChoice object
        System.out.println(evt.getSource().getClass().getName());
        // returns a string
        System.out.println(evt.getNewValue().getClass().getName());
    public Map getItems(){
        items = new HashMap();
        items.put("11","11");
        items.put("12","12");
        items.put("13","13");
        return items;
    }

Similar Messages

  • How to get the kerning value and set it to back use script?

    hi,guys
    I come back again.
    I encountered a kerning problem.
    how to get the kerning value and set it to back use script?
    Thanks very much!

    For both cases, the filename can be found on the FILE.ReceivedFileName Context Property.  You can access this Property in a Pipeline Component or Orchestration and take any action you want, such as apply to a database.
    The value is accessed by: MyReceivedMessage(FILE.ReceivedFileName)
    In the case of a duplicate EDI Interchange, you would use the Failed Message Routing feature to capture the error message with either an Orchestration or Send Port.

  • How to get selected items from a tree in backing bean without adfbc

    Hi ADF Experts,
    Below is my code for af:tree. My question is how can I get selected Items from the selectionListener (without adf bc) this uses formation of tree from backing bean.
    Using Jdev 11.1.1.7.0
    <af:tree var="node" value="#{pageFlowScope.MerchandizeBean.model}"
                      binding="#{pageFlowScope.MerchandizeBean.treeModel}"     id="tree" immediate="true" autoHeightRows="0"
                           styleClass="AFStretchWidth" rowSelection="multiple"
                           selectionListener="#{pageFlowScope.MerchandizeBean.treeNodeSelection}">
                    <f:facet name="nodeStamp">
                      <af:commandLink text="#{node.classDescription}"
                           actionListener="#{pageFlowScope.MerchandizeBean.createListManyItemForMerchandise}"           id="displayTable" partialSubmit="true">
                      </af:commandLink>
                    </f:facet>
                  </af:tree>
        public void treeNodeSelection(SelectionEvent selectionEvent) {
            // Add event code here...
            RichTree tree = (RichTree)selectionEvent.getSource();
                    TreeModel model = (TreeModel)tree.getValue();
                    //get selected value
    Thanks
    Roy

    Hi,
    in a multi select case, try
    RowKeySet rks = tree.getSelectedRowKeys();
    Iterator iter = rks.iterator();
    while(iterator.hasNext()){
    Object aKey = iterator.next();
    tree. setRowKey(aKey);
    Object rowData ? tree.getRowData();
      .... do something with the data here ...
    Frank

  • SRM 7 SOCO enhancement - from step1 to step2, how to get selected items?

    Hi all gurus,
    I'm enhancing the WD /SAPSRM/WDC_DO_SOCO_GAF_1, specifically my requirement is to block FPM navigation if certain conditions based on the selection are met.
    Example:
    An user searches for some PR in sourcing cockpit's step 1, select just a subset from the search result (say, he selects item 1 and item 3, leaving item 2 unselected).
    Then press the NEXT STEP button (which is, as far as I understood, an element managed by the COMPONENTCONTROLLER)..
    Let's suppose the condition we talked about is that each position of a specific PR should be selected; the example above does not meet that condition (only positions 1 and 3 are selected).
    What I'd like to implement is as follows:
    - if the user presses the NEXT_STEP, navigation to the newt WD is cancelled (user remains in STEP 1) and an explicative error message is raised in the message area (e.g. "all positions must be selected").
    Looking for the best, effective way to do this... In particular, I have to:
    -1- identify which positions have been selected when the NEXT_STEP button is pressed;
    -2- implement the check based on positions (that's the easy job);
    -3- raise a message into the messagearea (easy one) and STOP the process so that the user still remains into STEP 1 view (obviously, until his selection meets the specifics).
    I actually overwrote via enhancement the standard PROCESS_EVENT method in the COMPONENTCONTROLLER of that Webdynpro (/SAPSRM/WDC_DO_SOCO_GAF_1), and I'm trying to get the selected lines.
    IF  io_event->mv_event_id = 'FPM_NEXT_STEP'.
        DATA: test           TYPE REF TO /sapsrm/cl_ch_wd_ao_soco.
        DATA: gaf1           TYPE REF TO /sapsrm/if_cll_dom_soco_gaf1.
        DATA: selected_items TYPE WDR_CONTEXT_ELEMENT_SET.
        DATA: selected_item  TYPE /sapsrm/s_cll_wd_soco_workarea.
        test ?= wd_this->ig_componentcontroller~mo_aom_soco.
        CALL METHOD test->/sapsrm/if_cll_ao_soco~get_dom_soco_gaf1
    *  EXPORTING
    *    ion_wd_set                 =
    *    io_wd_view_controller      =
    *    io_wd_component_controller =
          RECEIVING
            ro_dom_soco_gaf1           = gaf1.
        DATA: tabselected  TYPE /SAPSRM/T_CLL_WD_SOCO_SEARCH.
        CALL METHOD gaf1->ZR7_IF_CLL_DOM_SOCO_GAF1~GET_SELECTED_ITEMS
          IMPORTING
            SELECTED_ITEMS = tabselected.
    where ZR7_IF_CLL_DOM_SOCO_GAF1~GET_SELECTED_ITEMS returns the SEARCH_RESULT node of the view GAF1.  This however returns the SEARCH_RESULTS table which contains ALL the positions in the Search table and not just the selected ones... I basically have to modify the get_selected_items, in order to get the selected lines, but actually don't know how and if it's possible; as far as I've seen in debug, there's no way to get the selection ... maybe it has already been cleared at this point?
    Any help provided on these 3 task is highly appreciated and welcome

    Solved! Quite a tricky solution, but it works.

  • How to get selection screen elements and its table reference of a report ?

    halo experts
    How can I get selection screen elements and its table reference of a report ? . I tried rs_refresh_from_select_options. But I am unable to get the table and field it is referring to
    For eg if my selection screen 1000 is
    parameters: p_carrid type spfli-carrid,
    select-options :s-_connid type sflight-connid.
    is there any Fm or method which gives me what are the screen elements( p_carrid and s_connid ) and what table( splfi and sflight ) and field ( carrid and conid )it is referring to ?

    The following code is an example of how you might dynamically determine all your PARAMETERS and SELECT-OPTIONS variables at run time.  The PARAMETERS and SELECT-OPTIONS only point to a dictionary element--not a specific table.  Even though you may say "spfli-carrid" or "sflight-connid", the data type really references the dictionary type and not a specific table/structure.
    REPORT  ZTEST_PROG.
    TABLES sflight.
    DATA:
           screen_tab TYPE STANDARD TABLE OF screen,
           wa_screen TYPE screen,
           scrn_nm TYPE string,
           scrn_leftover TYPE string,
           l_type TYPE REF TO cl_abap_typedescr,
           typ_nm TYPE string,
           typ_pre TYPE string.
    FIELD-SYMBOLS <fs_data> TYPE ANY.
    PARAMETERS p_carrid TYPE spfli-carrid.
    SELECT-OPTIONS s_connid FOR sflight-connid.
    INITIALIZATION.
      LOOP AT SCREEN.
        IF screen-group3 = 'PAR'
          OR screen-group3 = 'LOW'.
            APPEND screen TO screen_tab.
        ENDIF.
      ENDLOOP.
    START-OF-SELECTION.
      LOOP AT screen_tab INTO wa_screen.
        ASSIGN (wa_screen-name) TO <fs_data>.
        l_type = cl_abap_typedescr=>describe_by_data( <fs_data> ).
        IF wa_screen-group3 = 'LOW'.
          SPLIT wa_screen-name AT '-' INTO scrn_nm scrn_leftover.
          TRANSLATE scrn_nm TO UPPER CASE.
        ELSE.
          scrn_nm = wa_screen-name.
        ENDIF.
        SPLIT l_type->absolute_name AT '=' INTO typ_pre typ_nm.
        WRITE:
                 / 'Screen Name:  ', scrn_nm,
                 / 'DDIC Type:    ', typ_nm.
      ENDLOOP.
    When you get into defining internal tables you can determine those at run time with cl_abap_structdescr.  The following is an example of how you might do that.  You can loop through the "components_table" and evaluate each field of the structure in this way.
    DATA: structure_reference TYPE REF TO cl_abap_structdescr,
          components_table TYPE abap_compdescr_tab,
          components_structure LIKE LINE OF components_table.
    structure_reference ?= cl_abap_structdescr=>describe_by_data( any_structure ).
    components_table = structure_reference->components.
    I don't know if this answers any of your questions but I hope that some of it is useful.

  • When we run query how it gets the characteristic values and attributes.

    Hi,
    When we load transaction data it chacks characteristic values then SIDs then DIM IDs then insert  DIM IDs into fact table but when we run the query how it checks and gets the characteristic values and attributes.
    Bye
    GK

    when we run the query how it checks and gets the characteristic values and attributes.
    Just the opposite way you have described. It gets from the corresponding masterdata tables, with the connected SID.

  • How To Get Deleted Item Count and Associated Item Count And LastLogOn and LogOff Time For A Mailbox In Exchange Using EWS

    Using Powershell cmdlet i get  all the details..But i want to get these Details by using EWS Managed Api.Is It Possible to do???
    Powershell Cmdlet,
    Get-MailboxStatistics -Identity Username, Using this cmdlets all the details will get displayed.
    DeletedItemCount:5 //Here how this count comes.In My OutlookWebApp the deleteditems folder contains 13 items in it..But the count shows only 5.
    TotalDeletedItemSize:5.465 Kb//Even this value too does not match with DeletedItems Folder size in owa.
    AssociatedItemCount:12
    LastLogOnTime:11/11/11 12:43PM
    LastLogOff Time:11/11/11 2:43PM
    In EWS,
    By Looping through all folders i can get the total item count and total item size.Even i can get deleteditems  count .But that value does not match  With the powershell value.Even the TotalDeletedItemSize
    Doesnt match.
    Using EWS Managed Api ,Looping through folders i can get ItemCount,TotalitemSize,(DeletedItems,TotalDeleteditemSize(These TwoValues Does not match with values comes from powershell))
    Now how to get the Associated item count and lastlogoff and logon time using EWS managed Api.Is it Possible???
    And even y the deleteditems count and size values varies between EWS and powershell.

    What happens if you execute the below code?
    Get-MailboxFolderStatistics [email protected] | where {$_.FolderPath -like "/Deleted Items"}
    Refer this blog. You may get some dice
    http://exchangepedia.com/blog/2008/09/configuring-deleted-item-retention.html
    Regards Chen V [MCTS SharePoint 2010]

  • How to get selection criteria value in method IF_POWL_FEEDER~HANDLE_ACTION

    hi:
    As you know, we could get the leading selected POWL result data through parameter  c_selected and  c_selected in this method.
    but moreever, I want to get the selection criterai values in this method too just like the paramter i_selcrit_values in the method IF_POWL_FEEDER~GET_OBJECTS, how to do it?
    I have tried to define a attribute in my POWL class and save i_selcrit_values into this attribute in the method IF_POWL_FEEDERGET_OBJECTS, but in method IF_POWL_FEEDERHANDLE_ACTION, this attribute is still empty, so this workaround failed.
    thanks.

    hi guys:
    I have founded how to do it:
    METHOD get_selcrit.
      DATA ls_query TYPE powl_query_sty.
      DATA lt_selcrit TYPE rsparams_tt.
      FIELD-SYMBOLS <ls_selcrit> LIKE LINE OF lt_selcrit.
      CALL METHOD cl_powl_runtime_services=>get_current_query
        RECEIVING
          rs_query = ls_query.
      CALL METHOD cl_powl_query_accessor=>get_cached_selcrit
        EXPORTING
          i_query     = ls_query-query
        IMPORTING
          e_crit_para = lt_selcrit.
      READ TABLE lt_selcrit WITH KEY selname = iv_selname
        ASSIGNING <ls_selcrit>.
      IF <ls_selcrit> IS ASSIGNED.
        ev_selcrit = <ls_selcrit>-low.
      ENDIF.
    ENDMETHOD.

  • How to Get Input From User and Display Result

    Hi ,
    I need to get 2 inputs from user and to display it's Mutilple Value.
    The Below Code is working fine to get 2 Input's from user,but it display a Junk value as a Result .How to
    overcome this Problem. I need to display it's Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws IOException{
    BufferedReader br =new BufferedReader(new InputStreamReader(System.in));
    do{
    a=(char)br.read();
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);
    }

    Hi ,
    I need to get 2 inputs from user and to display it's
    Mutilple Value.
    The Below Code is working fine to get 2 Input's from
    user,but it display a Junk value as a Result .How
    to
    overcome this Problem. I need to display it's
    Mutilple(a*b) value of "a " and " b".
    import java.io.*;
    class Mul{
    static int a=0;
    static int b=0;
    static int Count=0;
    public static void main(String args[])throws
    IOException{
    BufferedReader br =new BufferedReader(new
    InputStreamReader(System.in));
    do{
    a=(char)br.read();This line will get you the ascii-value of the typed character.
    This line will not get you the value typed in.
    Try looking for Integer.parseInt()...
    Count++;
    b=(char)br.read();
    if(Count==2)
    System.out.println("The Multiplied Value is "+a*b);
    }while(Count<2);

  • How to read selected item value from DropDownList?

    Hi,
    The DropDownList component has a selectedItem property that is supposed to return a ListBase.
    But what I want is just the "String" that is supposed to be the selected Item in the DropDownList.
    How can I read this value?
    thanks
    -Malena

    Thank, yes, I realized that right after I posted my question -:)
    I casted the selectedItem property to String and voila.
    Best
    -Malena

  • How to get selected Cell value in datagrid?

    Hi guys, I have a datagrid that is editable. I was wondering if it's possible to retreive the cell value after user edits the single cell.
    My datagrid will trigger griditemEditorSessionSave event if users finish the editing, but I don't know how to get the new cell value.
    //script
    protected function dg_gridItemEditorSessionSaveHandler(event:GridItemEditorEvent):void
         //I can only get the columnIndex but not the value
          Alert.show (event.columnIndex);
    //mxml
    <s:DataGrid id="dg" editable="true" x="5" y="3" width="734" height="153"
                      gridItemEditorSessionSave="dg_gridItemEditorSessionSaveHandler(event)"
    >
    </Datagrid>
    Any thoughts? Thanks a lot.

    Hi,
    Please go through following link :
    http://corlan.org/2008/08/31/retrieving-the-new-values-while-editing-data-inside-the-data- grids/
    Hope it helps you
    Thanks and Regards,
    Vibhuti Gosavi | [email protected] | www.infocepts.com

  • Any Pointers on how to get object list values and component values in iw32

    Hi,
    I have a requirement where whenever a user enters a creates(iw31) or changes(iw32) an order then we have to validate the materials entered by the user before saving the order.We have en interface structure for the transaction 'CAUFVD'.Which gives us the values of functional location and equipment entered under the Reference object.But we need to validate all the object list functional locations and also Order components enetered by the user.Can any one tell me how to get the values of all these fields entered by the user?
    And also I need to query Equipment Bill of Material.What does this equipment BOM refers to .Is it the equipments under Object list or something else.
    Please Help.
    Thanks

    Hi Anu
    There is a user exit that gets trigerred when you try to save a work order . The exit is 'EXIT_SAPLCOIH_009' . This exit has the structure CAUFVD_IMP which will give you all the order header values entered by the user.
    User exit 'EXIT_SAPLCOBT_001' will give all the values entered by the user including order components. Also check the package CO  amd see if there is any other function group suiting your requirement.
    hope this helps you.
    cheers
    shivika

  • How to get po delivered value and po invoived value?

    HI experts,
    i need to create bex query with PO total value,  PO NET VALUE Item wise, po delivered value,
    po still remaining value and po invoiced value.
    AFter extensive search i got 0net_po_val for PO net value item wise.
    Remaining 4. Fields am unable to search in bw targets. So how to proceed?? Any inputs?
    Thanx in advance.
    br,
    Ravi kiran

    Hi Ravi,
    Please find the logic for the same:
    PO Delivered Value
    EKBE (BEWTP = E and SHKZG) SHKZG = S   is positive  and
    SHKZG = H is negative.
    PO Still Remaining Value
    PO Value- PO  Delivered Value
    PO Invoiced Value
    EKBE(BEWTP = Q and SHKZG) SHKZG = S   is positive  and
    SHKZG = H is negative.

  • How to get PO DELIVERED VALUE AND PO INVOICED VALUE

    HI experts,
    how to get po delivered and po invoiced valued in
    order currency. Am unable find out in my bw targets and data sources. We hav 2lis_scl nd generic ds for purchase rEquisitions.
    br,
    RAvi

    Kindly once check datsouce 0FI_GL_4.
    In that field DMSHB (Deb/cred amt) is for Invoice and NETWR (Net value) is for PO value.
    Further please check with ECC guys and get confirmation.
    Thanks,
    Jitender.

  • How to change selected item color and the selected area size of listview

    What i really need to do is change the following things in XMAL.
    1. Changing the selection color
    2. Size of selected area 
    Thanks in advance.
    Dileepa S. Rajapaksa
    Trainee Developer
    Microsoft, Sri Lanka
    Twitter : @dsrajapaksa
    Blog : http://www.dileepatech.net

    Hi Dileepa,
    It is possible by customize the control by its template, see this for more information:
    ListViewItem styles and templates.
    By changing the selected visual state, you can change the color of the ListView item background, also the size of the selected item.
    --James
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

Maybe you are looking for

  • How to append a character using UTL_FILE pkg

    A table with student_id, student_name and date_of_join. create table student(std_id varchar2(10),std_name varchar2(20),std_doj date);I am loading the data from the below flat file using UTL_FILE package 101   ron   04081999 101   ron   01081996 102  

  • JCO timeout handling

    hi JCO experts, I am connecting to a really slow back end system using Jco. Lets say a) JCO Client.execute takes 5 minutes. b) I want to run this execution in a seperate thread Is there a way I can kill the JCO connection itself after 2 minutes? (Ima

  • How to make an anchored line for a sign-up sheet?

    I work for a small non-profit, and, as such, I wear many (too many?) hats.  I have no other experience with Adobe products (except for a very short intro class to InDesign), so I apologize in advance if this is an obvious question! SO, I often need t

  • Bridge loads automatically when I connect a device (iPhone...SD card

    How can I stop Bridge from loading automatically when I connect a device (iPhone...SD card

  • Download error - stopped er -100000

    When trying to download a purchase I continually get the message shown in the subject line. Any ideas what to do???