How to get selected item uid

Hello
I want to get the uid of the item selected.is there any way through ISelectionManager? or is there any other way?
Thanks
Regards,
MS Choudry

Hi MS Choudry,<br /><br />this is not as simple as it seems.<br />You need to build your own "Selection", that means a "SelectLayoutCSB" and a "SelectASB".<br />Below I post the code of our sources, please refer to the documentation about CSB and ASB for more information.<br /><br />SelectLayoutCSB<br />===============<br />class IRSelectLayoutCSB : public CPMUnknown<IIRSelect><br />{<br />public:<br />     IRSelectLayoutCSB(IPMUnknown* boss);<br />     ~IRSelectLayoutCSB(void);<br />     virtual bool16 GetSelectedUID(UID& uid);<br />private:<br />};<br />CREATE_PMINTERFACE (IRSelectLayoutCSB,kIRSelectLayoutCSBImpl)<br />IRSelectLayoutCSB::IRSelectLayoutCSB(IPMUnknown* boss):CPMUnknown<IIRSelect>(boss)<br />{<br />}<br />IRSelectLayoutCSB::~IRSelectLayoutCSB(void)<br />{<br />}<br />bool16 IRSelectLayoutCSB::GetSelectedUID(UID& uid)<br />{<br />     uid = kInvalidUID;<br />     InterfacePtr<ILayoutTarget> iLayoutTarget(this, UseDefaultIID());<br />     if (iLayoutTarget == nil)<br />          return false;<br />     const UIDList selectedItems(iLayoutTarget->GetUIDList(kStripStandoffs));<br />     int32 iNbObjects = selectedItems.Length();<br />     if (iNbObjects != 1)<br />          return false;<br />     UIDRef uidref = selectedItems.GetRef(0);<br />     uid = uidref.GetUID();<br />     return true;<br />}<br /><br />SelectASB:<br />==========<br />class IRSelectASB : public CPMUnknown<IIRSelect><br />{<br />public:<br />     IRSelectASB(IPMUnknown* boss);     <br />     virtual ~IRSelectASB(void);<br />     virtual bool16 GetSelectedUID(UID& uid);<br />};<br />CREATE_PMINTERFACE (IRSelectASB,kIRSelectASBImpl)<br />IRSelectASB::IRSelectASB(IPMUnknown* boss):CPMUnknown<IIRSelect>(boss)<br />{<br />}<br />IRSelectASB::~IRSelectASB(void)<br />{<br />}<br />bool16 IRSelectASB::GetSelectedUID(UID& uid)<br />{<br />     return (Process (make_functor(&IIRSelect::GetSelectedUID, uid), this, IIRSelect::kDefaultIID));<br />}<br /><br />HTH,<br />Daniel

Similar Messages

  • 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 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;
        }

  • How to get  selected item page number?

    I am developing the plug-in for moving page item from one page to another page,for that i need selected item page number.i.e. i need the page number
    which the item is selected.

    Just access the 'currentCountry' property in the action method.
    public void submit() {
        System.out.println("JSF has already set the property: " + currentCountry);
        // Now do your thing with it. E.g. saving it or so.
        countryDAO.save(currentCountry);
    }

  • How to get select items from multi select in an array or list in jsp

    i have the following multi select which is basically an array coming from the database how can select couple of them and put them in an array in jsp and then save them in the session so when i click the next button they continue till i reach the last finish button of my wizard:
    <SELECT MULTIPLE SIZE=5>
    <OPTION VALUE="o1">Option 1
    <OPTION VALUE="o2">Option 2
    <OPTION VALUE="o3">Option 3
    <OPTION VALUE="o4">Option 4
    <OPTION VALUE="o5">Option 5
    <OPTION VALUE="o6">Option 6
    </SELECT>
    Option 1Option 2Option 3Option 4Option 5Option 6

    Hi,
    As you are tracking changes in ALV data you must define a event handler for ALV evenr ONDATA_CHECK.
    On defining an event handler you will be getting a structure called t_param.
    It contains an element called t_deleted rows.
    See this code to have an idea.
    method ONDATACHECK .
      DATA: x_delete_row LIKE LINE OF r_param->t_deleted_rows.
      "      i_addr_factr TYPE STANDARD TABLE OF ycot_addr_factr,
       "     x_addr_factr LIKE LINE OF i_addr_factr.
    TYPES t_proj_constr TYPE ycot_proj_constr.
      FIELD-SYMBOLS: <fs_row> TYPE t_proj_constr.
      IF wd_comp_controller->ya_optyp = 'DELETE'.
        LOOP AT r_param->t_deleted_rows INTO x_delete_row.
          "x_addr_factr ?= x_delete_row-r_value.
          ASSIGN x_delete_row-r_value->* TO <fs_row>.
        DELETE FROM ycot_proj_constr  WHERE plant = <fs_row>-plant
                                     AND   yr_nbr = <fs_row>-yr_nbr
                                     AND   period = <fs_row>-period
                                     AND  billback_pr_fmly = <fs_row>-billback_pr_fmly
                                     AND  prd_nm = <fs_row>-prd_nm.
      ENDLOOP.
    I hope it helps.
    Regards,
    Sumit Oberoi

  • How to get selected item from AutoSuggestBox in Windows Phone 8.1

    In CS File "SelectedItem" is not working what is the alternative to "SelectedItem" for AutoSuggestBox in WP8.1
    In XAML File:
    <AutoSuggestBox x:Name="tblkpersonname" Width="380" Margin="0,-7,0,0" ItemsSource="{Binding}" TextChanged="tblkpersonname_TextChanged">
    <AutoSuggestBox.ItemTemplate>
    <DataTemplate>
    <TextBlock Text="{Binding Name}"
    Tag="{Binding PersonID}"/>
    </DataTemplate>
    </AutoSuggestBox.ItemTemplate>
    </AutoSuggestBox>
    In Cs File:
    private void tblkpersonname_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
    try
    if (tblkpersonname.SelectedItem != null)
    tblkdes.Text = ((values)tblkpersonname.SelectedItem).Description;
    persononlineimg.Source = new BitmapImage(new Uri(((values)tblkpersonname.SelectedItem).FlickrPersonImageUrl, UriKind.RelativeOrAbsolute));
    catch (Exception ex)
    Exceptions.SaveOrSendExceptions("Exception in tblkpersonname_SelectionChanged_1 Method In AddCast.cs file.", ex);
    Devi Prasad.P

    Hi
    Not sure about the code you have mentioned here, there is no property named selecteditem in msdn. Please refer
    https://msdn.microsoft.com/en-us/library/windows.ui.xaml.controls.autosuggestbox.aspx
    <AutoSuggestBox x:Name="suggestions"HorizontalAlignment="Left" Margin="52,62,0,0"
    ItemsSource="{Binding }"VerticalAlignment="Top"
    Width="296" TextChanged="suggestions_TextChanged"
    SuggestionChosen="suggestions_SuggestionChosen"/>private void suggestions_TextChanged(AutoSuggestBox sender, AutoSuggestBoxTextChangedEventArgs args)
                if (args.Reason == AutoSuggestionBoxTextChangeReason.UserInput)
                    Suggestions.Clear();
                    Suggestions.Add(sender.Text + "Tea");
                    Suggestions.Add(sender.Text + "Tatt");
    private void suggestions_SuggestionChosen(AutoSuggestBox sender, AutoSuggestBoxSuggestionChosenEventArgs args)
                suggestions.Text = "Choosen";
    Something like this can be used
    Regards
    Varun Ravindranath Please 'Mark as Answer' if my post answers your question and 'Vote as Helpful' if it helps you.

  • How to get selected values from selectManyCheckbox ?

    Hi,
    I am a SOA developer and using 'Auto generated adf form' of Human Task. I did some customization in the form. I need to show one dynamic list (contains multiple string values) on a form, from which user will select desired values. For this I have used <af:selectManyCheckbox> adf component.
    It has generated code as follows...
    <af:selectManyCheckbox value="#{bindings.Response.inputValue}"
                                             label="#{bindings.Response.label}"
                                             id="smc1">
                        <f:selectItems value="#{bindings.Response.items}" id="si9"/>
    </af:selectManyCheckbox>
    I am able to show list on a form and can select multiple values also.
    Now, I want the multiple selected values back in my BPEL process. I need only those values which are selected by user.
    Currently I am getting complete list as it is back in BPEL process.
    Please help me out..!
    Thanks..
    Suraj

    Unwinding ADF: How to retrieve Selected Items from selectManyCheckbox using ValueChnageListener

  • How to get selected row keys from RichSelectManyCheckbox

    Adf Table has getSelectedRowKeys but SelectManyChekcbox does not has anything similar. Can you tell me how to get selected row keys programmatically for RichSelectManyCheckbox?

    Hi User,
    selectManyCheckbox component's value property holds the selected items values. Bind this property to some bean variable(of type list) so that you can get the selected values by accessing the bean property.
    Sireesha

  • How to get po item condition type according schema group

    hi experts,
    i want to get po item condition type according schema group.
    for example, in xk03, if the "schema group, vendor"in purchasing data view is set to 'Z3', in the purchase order which is made for this vendor, the po item's gross price condition type is hwxx.
    if the "schema group, vendor" is set to 'Z2', the po item's gross price condition type is pbxx.
    my question is : how to get po item condition type according schema group?
    hunger for ur advice and thanks a lot!

    several steps you need to go
    1. you need to get the purcahsing group schema against your purchasing group from table T024E.
    2. get the vendor group schema from vendor master data table LFxxxxxx
    3. get the pricing schema from table TMKS via the selection criteria purchasing group schema and vendor group schema
    4. go to the table T683S via inputing Usage, application and pricing determination procedure.
    5. now you got it.

  • How to get selected value from selectOneRadio ???

    Hi...i want to how to get selected value from selectOneRadio and use it in another page and in backing bean.
    Note i have about 10 selectOneRadio group in one page i want to know value of each one of them.
    Plzzzzzzzz i need help

    You have a datatable in which each row is a question, correct?
    Also in each row you have 5 possible answers that are in a radio, correct?
    So,
    You need to put in your datatable model, a question, and a list of answers (5 in yor case) and the selected one.
    So you will have a get to the question, an SelectItem[] list to populate the radios and another get/set to the selected question.
    ex:
    <h:selectOneRadio value="#{notas.selectedString}" id="rb">
    <f:selectItem itemValue="#{notas.valuesList}"/>
    </h:selectOneRadio>
    Search the web for examples like yours.

  • How to get selected value from OADefaultListBean.

    Hi All,
    How to get selected value from OADefaultListBean ?
    Thanks,

    Hi,
    To identify the user's selection(s) when the page is submitted, you would add the following logic to your processFormRequest() method:
    OADefaultListBean list =
    (OADefaultListBean)webBean.findChildRecursive("positionsList");
    String name = list.getName();
    String[] selectedValues = pageContext.getParameterValues(name);
    To retrieve all the values in the list box, call list.getOptionsData().
    --Prasanna                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • How to get selected  row index  of a Table ?

    hi gurus,I'm new  to Webdynpro for abap
    I'm displaying    just Flight details in a Table  so
    how to get selected  row index  of a  Table  and need  to be display in Message manager.

    Hi,
    For getting the row index use the following code.
    DATA lo_nd_node TYPE REF TO if_wd_context_node.
      DATA lo_el_node TYPE REF TO if_wd_context_element.
      DATA index TYPE i.
    * navigate from <CONTEXT> to <NODE> via lead selection
      lo_nd_node = wd_context->get_child_node( name = wd_this->wdctx_node ).
      lo_el_node = lo_nd_node->get_lead_selection(  ).
      index = lo_el_node->get_index( ).
    node is the name of the node which is binded to the table.
    For printing the message u can use code wizard.
    Press ctrl-F7. Now Select generate message.
    IN this select the method  REPORT_SUCCESS
    In the code now u can give index to Message text Exporting parameter. Comment receiving parameter.
    Write the whole code in onLeadSelect of the table.
    Regards,
    Pankaj Aggarwal

  • How to get line item net price and net value?

    I have using "BAPI_SALESORDER_SIMULATE" to SIMULATE to create SO,
    the return table
    ORDER_ITEMS_OUT-NET_VALUE is not equals than created by VA01 .
    how to get line item net price and net value?

    Hi,
    Can u elaborate ur query ?
    By this FM you cannot create a SO . Use FM --> BAPI_SALESORDER_CREATEFROMDAT2
    Regards,
    MAdhukar Shetty

  • How to get List Item attachments name without write any custom code or any database query?

    Hi,
    How to get List Items attachments name without write any custom code or any database query?

    You can get it from Rest,
    There are 2 options,
    1) create a 'Result Source' which has a search query for that List which has attachments 
     - Use rest query to get the 'Filename' , it will have the attachment file name 
    For example, if the result source id is : 73e6b573-abf8-4407-9e5f-8a85a4a95159 , then the query will be 
    http://[site URL]/_api/search/query?querytext='*'&selectproperties='Title,Path,FileExtension,SecondaryFileExtension,Filename'&sourceid='73e6b573-abf8-4407-9e5f-8a85a4a95159'&startrow=0&rowLimit=100
    You can refine the query, be giving proper 'querytext'
    2) Use the List rest api
    For example if your list guid is :38d524a1-e95c-439f-befd-9ede6ecd242e
    You can get he attachments for 1st item using this 
    http://[Site URL]/_api/lists(guid'38d524a1-e95c-439f-befd-9ede6ecd242e')/items(1)/AttachmentFiles
    get2pallav
    Please click "Propose As Answer" if this post solves your problem or "Vote As Helpful" if this post has been useful to you.

Maybe you are looking for

  • HT1338 USB

    ive got a problem with my USB port on my MacBook Pro. when i plug my usb cable from my phone to the laptop nothing happens. it doesnt charge

  • German quotation marks on iOS

    Hello, as a German I would like to use German quotation marks on iOS. In German they open at the bottom and close at the top. I find it very annoying having to go through all texts I wrote on my iPad just to correct all the quotation marks. Thanks in

  • Slow access to root file system

    For a quite a couple of days, my system has been lagging, which is manifested in long boot, program starting and file loading times. Today, I finally found the time to investigate on the issue a little bit. I've made a couple of observations but don'

  • Joining a Path

    I am having problems trying to join some objects. I have a smaller circle in a larger circle. and an arrow (just two lines) pointing right. I would like to join these objects, so that each end of the arrow will join to each the circles and make it on

  • Premiere Pro Export to Encore

    Hi would have to consider myself time poor in my experience with Premiere Pro but have managed to create some decent outcomes. I have a completed video and would basically would like to export my final project into Encore CS3 to finalise menus etc. I