Lead Selection

hi
   I have created a dropdown menu(by Key).I have populated the values by binding the "texts" property to an attribute "num" that i have defined to be of simple type string.
How can I set the lead selection for this dropdown.
Plz Help

hi......
well dynamically you can do it
public void wdDoInit()
    //@@begin wdDoInit()
     IPrivateViewDropkey1.IDropKeyElement ele = wdContext.createDropKeyElement();
       ISimpleTypeModifiable myType=wdThis.wdGetAPI().getContext().getModifiableTypeOf("DropKey.Key");
       IModifiableSimpleValueSet val = myType.getSVServices().getModifiableSimpleValueSet();
       val.put("1" ,"product1");
       val.put("2" ,"product2");
    //@@end
Now in the wdModifyView
public static void wdDoModifyView(IPrivateViewDropkey1 wdThis, IPrivateViewDropkey1.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    //@@begin wdDoModifyView
     if(firstTime)
//            creating tranparent container
          IWDTransparentContainer tc = (IWDTransparentContainer)view.createElement(IWDTransparentContainer.class,"TransparentContainer");
//               creating dropdownkey
                    IWDDropDownByKey key = (IWDDropDownByKey)view.createElement(IWDDropDownByKey.class,"Dropkey");
                         key.bindSelectedKey("DropKey.Key");
                         key.setWidth("60");
                         key.setVisible(WDVisibility.VISIBLE);
//setting the selection to the first value
                         key.setSelectedKey("1");
                    tc.addChild(key);
                    IWDTransparentContainer root = (IWDTransparentContainer)view.getElement("RootUIElementContainer");
                    root.addChild(tc);
//create an action called Click in the view
               IWDAction action = wdThis.wdCreateAction(IPrivateViewDropkey1.WDActionEventHandler.CLICK, "");
          key.setOnSelect(action);
    //@@end
regards,
pinki

Similar Messages

  • ECATT abends during recording when lead selection is set to 0 on web dynpro

    We have a web dynpro application that works ok when running by itself.   When we tried to record ECATT testing on it, it abended after we click on a selection from a list of values.    The error on the browser indicated an error on the "lead select".   After reviewing the dump, we found that it abends on an exception when the lead selection on the ALV is not set.   When we changed our code to set the lead selection to 1, the ECATT recording worked.
    We have a requirement to set the lead selection of ALV to 0 so we need to change back our code.   We just did the setting to 1 just to get ECATT recording to work for now.    Does anybody know why ECATT requires this?   Is there a support packs that fixes this?
    Here is a snippet from ST22 for more details on this:
    Runtime Errors         UNCAUGHT_EXCEPTION
    Exception              CX_WD_CONTEXT
    Date and Time          2007/02/07 14:50:06
    Short text
    An exception occurred that was not caught.
    What happened?
    The exception 'CX_WD_CONTEXT' was raised, but it was not caught anywhere along
    the call hierarchy.
    Since exceptions represent error situations and this error was not
    adequately responded to, the running ABAP program
    'CL_WDR_CONTEXT_NODE===========CP' has to be
    terminated.
    What can you do?
    Note down which actions and inputs caused the error.
    To process the problem further, contact you SAP system
    administrator.
    Using Transaction ST22 for ABAP Dump Analysis, you can look
    at and manage termination messages, and you can also
    keep them for a long time.
    Error analysis
    An exception occurred which is explained in detail below.
    The exception, which is assigned to class 'CX_WD_CONTEXT', was not caught and
    therefore caused a runtime error.
    The reason for the exception is:
    The lead selection has not been set. VIEW_TABLE
    How to correct the error
    If the error occures in a non-modified SAP program, you may be able to
    find an interim solution in an SAP Note.
    If you have access to SAP Notes, carry out a search with the following
    keywords:
    "UNCAUGHT_EXCEPTION" "CX_WD_CONTEXT"
    "CL_WDR_CONTEXT_NODE===========CP" or "CL_WDR_CONTEXT_NODE===========CM00V"
    "_RAISE_ELEMENT_NOT_FOUND"
    If you cannot solve the problem yourself and want to send an error
    notification to SAP, include the following information:
    1. The description of the current problem (short dump)
    To save the description, choose "System->List->Save->Local File
    (Unconverted)".
    2. Corresponding system log
    Display the system log by calling transaction SM21.
    Restrict the time interval to 10 minutes before and five minutes
    after the short dump. Then choose "System->List->Save->Local File
    (Unconverted)".
    3. If the problem occurs in a problem of your own or a modified SAP
    program: The source code of the program
    In the editor, choose "Utilities->More
    Utilities->Upload/Download->Download".
    4. Details about the conditions under which the error occurred or which
    actions and input led to the error.
    System environment
    SAP-Release 700
    Application server... "torsapd01"
    Network address...... "10.2.75.183"
    Operating system..... "Windows NT"
    Release.............. "5.2"
    Hardware type........ "4x AMD64 Level"
    Character length.... 8 Bits
    Pointer length....... 64 Bits
    Work process number.. 0
    Shortdump setting.... "full"
    Database server... "TORSAPD01"
    Database type..... "MSSQL"
    Database name..... "PR3"
    Database user ID.. "dbo"
    Char.set.... "English_United State"
    SAP kernel....... 700
    created (date)... "Aug 28 2006 22:20:27"
    create on........ "NT 5.2 3790 Service Pack 1 x86 MS VC++ 14.00"
    Database version. "SQL_Server_8.00 "
    Patch level. 75
    Patch text.. " "
    Database............. "MSSQL 7.00.699 or higher, MSSQL 8.00.194"
    SAP database version. 700
    Operating system..... "Windows NT 5.0, Windows NT 5.1, Windows NT 5.2"
    Memory consumption
    Roll.... 16128
    EM...... 16759616
    Heap.... 0
    Page.... 0
    MM Used. 12713776
    MM Free. 4042608
    User and Transaction
    Client.............. 200
    User................ "SIC0010"
    Language Key........ "E"
    Transaction......... " "
    Program............. "CL_WDR_CONTEXT_NODE===========CP"
    Screen.............. "SAPMHTTP 0010"
    Screen Line......... 2
    Information on Caller ofr "HTTP" Connection:
    Plug-in Type.......... "HTTP"
    Caller IP............. "10.49.77.47"
    Caller Port........... 8000
    Universal Resource Id. "/sap/bc/webdynpro/sap/zpr3_base_price/"
    Information on where terminated
    Termination occurred in the ABAP program "CL_WDR_CONTEXT_NODE===========CP" -
    in "_RAISE_ELEMENT_NOT_FOUND".
    The main program was "SAPMHTTP ".
    In the source code you have the termination point in line 11
    of the (Include) program "CL_WDR_CONTEXT_NODE===========CM00V".
    Source Code Extract
    Line
    SourceCde
    1
    method RAISEELEMENT_NOT_FOUND.
    2
    data: l_count type I,
    3
    l_node_name type string.
    4
    5
    l_node_name = if_wd_context_node~get_path( ).
    6
    7
    l_count = if_wd_context_node~get_element_count( ).
    8
    if l_count = 0.
    9
    raise exception type cx_wd_context exporting textid = cx_wd_context=>NODE_EMPTY node_nam
    10
    elseif element_index = if_wd_context_node=>use_lead_selection.
    >>>>>
    raise exception type cx_wd_context exporting textid = cx_wd_context=>NO_LEAD_SELECTION n
    12
    else.
    13
    raise exception type cx_wd_context exporting textid = cx_wd_context=>ELEMENT_NOT_FOUND n
    14
    endif.
    15
    endmethod.
    Contents of system fields
    Name
    Val.
    SY-SUBRC
    0
    SY-INDEX
    1
    SY-TABIX
    0
    SY-DBCNT
    2
    SY-FDPOS
    0
    SY-LSIND
    0
    SY-PAGNO
    0
    SY-LINNO
    1
    SY-COLNO
    1
    SY-PFKEY
    SY-UCOMM
    SY-TITLE
    HTTP Control
    SY-MSGTY
    E
    SY-MSGID
    TD
    SY-MSGNO
    600
    SY-MSGV1
    000003587101
    SY-MSGV2
    0001
    SY-MSGV3
    EN
    SY-MSGV4
    SY-MODNO
    0
    SY-DATUM
    20070207
    SY-UZEIT
    145005
    SY-XPROG
    SAPCNVE
    SY-XFORM
    CONVERSION_EXIT

    Hi Eugene,
    i suggest you raise an SMP ticket for these.
    Looks like a bug at first glance.
    regards
    Phil

  • Lead Selection does not work after setting filter for ALV.

    Hi, Can you please suggest on below scenario :
    I have a Node with a sub node in it .
    I am using the supply function on Sub Node to retrieve the date based on Parent Node.
    There are two ALV's to display parent and item data. The issue is when a filter(user defined filter) is done on Parent table, the supply function does not work. The value is that of the selected row before setting the filter. Even after removing the filter, the item data is stuck and does not change on Lead Selection.
    One thing I noticed is if the child table is a table UI, there is no issue. The only problem is when the second table is ALV
    Thanks In Advance

    Hi Prashanthi,
    Your issue can be resolved as below
    Create an event handler method 'set_alv_data'  for the event 'ON_LEAD_SELECT' of parent alv
    Write the below code inside the event handler method
    METHOD set_alv_data.
      DATA lo_node TYPE REF TO if_wd_context_node.
      DATA lv_path TYPE string.
      DATA lv_index TYPE string.
      lv_index = r_param->index.
      CONDENSE lv_index.
      CONCATENATE wd_this->wdctx_my_parent_node
      lv_index
      wd_this->wdctx_my_child_node
      INTO lv_path SEPARATED BY '.'.
      lo_node = wd_context->path_get_node(
          path                          = lv_path
      DATA lo_interface TYPE REF TO iwci_salv_wd_table.
      lo_interface = wd_this->wd_cpifc_alv_child( ). "get the ref of alv comp of child
      lo_interface->set_data(
        EXPORTING
    *    only_if_new_descr =
          r_node_data       = lo_node
    ENDMETHOD.
    The above code sets the data node of child alv based on lead selection of parent alv data.
    Note: Replace 'parent_node', 'child_node'  with your nodes & 'alv_child' with your alv component name of child alv.
    If you want to control the data of child alv on filter function, you can use the event ON_STD_FUNCTION_AFTE and once you define the filter you get the r_param->id = 'SALV_WD_FILTER_DEFINE'  & now you can clear data of child alv.
    Hope this helps you.
    Regards,
    Rama

  • How to disable a lead selected item in a radio button group ?

    Hi,
    I have a radio button group and there are entries to create radio buttons dynamically. means there is only one radio button group in the UI design and in runtime I will be having two radio buttons (For ex: Yes and No ) . Now If I want to disable either Yes or No radio button, I am unable to do so. because If I disable the radio button group it disables both.  So, I can have lead selected item for ex: Yes which I want to disable. I want to know specifically how this Yes button to be disabled by taking lead selected index item.
    Please help.
    Thanks
    Praveen

    Try setting the radio button value of the lead selected button to abap_false/space.

  • How to delete the record in the table without using lead selection?

    hi,
    I have added the separate column "delete" to the table uielement and so for each record or row of the table the appropriate "delete" link to action will be there................the code below works when the particular row is selected through lead selection only.......
    help me how to delete without using lead selection.....
      DATA:
      NODE_MODULE                         TYPE REF TO IF_WD_CONTEXT_NODE,
      ELEM_MODULE                         TYPE REF TO IF_WD_CONTEXT_ELEMENT,
      STRU_MODULE                         TYPE IF_V_MODULE=>ELEMENT_MODULE .
       data itab TYPE TABLE OF zac_modules.
      navigate from <CONTEXT> to <MODULE> via lead selection
      NODE_MODULE = WD_CONTEXT->GET_CHILD_NODE( NAME = `MODULE` ).
      get element via lead selection
      ELEM_MODULE = NODE_MODULE->GET_ELEMENT(  ).
      get all declared attributes
      ELEM_MODULE->GET_STATIC_ATTRIBUTES(
        IMPORTING
          STATIC_ATTRIBUTES = STRU_MODULE ).
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
        IMPORTING
         TABLE  = itab )
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id.
    CALL METHOD NODE_MODULE->BIND_TABLE
        EXPORTING
          NEW_ITEMS            = itab
       SET_INITIAL_ELEMENTS = ABAP_TRUE
       INDEX                =
    ENDMETHOD.

    Hi  ,
    The onclick event provides you with a standard paramater "CONTEXT_ELEMENT" which has the element from which the event is triggered.
    so you can declare this in the handler(if it is not there) and use it as follows.
    CONTEXT_ELEMENT  TYPE REF TO IF_WD_CONTEXT_ELEMENT  an importing paramater.
    DATA:
    NODE_MODULE TYPE REF TO IF_WD_CONTEXT_NODE,
    ELEM_MODULE TYPE REF TO IF_WD_CONTEXT_ELEMENT,
    STRU_MODULE TYPE IF_V_MODULE=>ELEMENT_MODULE .
    data itab TYPE TABLE OF zac_modules.
    CONTEXT_ELEMENT->GET_STATIC_ATTRIBUTES(
    IMPORTING
    STATIC_ATTRIBUTES = STRU_MODULE ). "Using the context_element paramater to get the static attributes.
    NODE_MODULE->GET_STATIC_ATTRIBUTES_TABLE(
    IMPORTING
    TABLE = itab )   "getting all the data.
    DELETE itab WHERE zmodule_id = STRU_MODULE-zmodule_id. "deleting the particular row from the table and binding it.
    CALL METHOD NODE_MODULE->BIND_TABLE
    EXPORTING
    NEW_ITEMS = itab
    * SET_INITIAL_ELEMENTS = ABAP_TRUE
    * INDEX =
    thanks,
    Aditya.

  • Opening a new window on lead select in a table

    Hi,
      I want to open a window on Lead Select ...i have written the below code in the ActionLeadSelect
    ************************Begin Code******************************************************
    message.reportSuccess("came inside LeadSelect");
    IWDWindow window = wdComponentAPI.getWindowManager().createExternalWindow("www.yahoo.com","",false);
    message.reportSuccess("came 1");
    window.open();
    message.reportSuccess("came 2");
    ***************************end code********************************************************
    but On selecting a particular row in a table , window is not being opened..but the message I gave are displayed .Can u gimme  a solution
    Thanks,
    Shiny

    Hi, 
         It helped abijeet.Pop Up window is  opened.
    Now, I also tried opening another pop up window. I created a view called 'PopUp'. now.On selecting a row in the table I want to open this window(PopUp) .I tried the below code:
    IWDWindowInfo wInfo =wdComponentAPI.getComponentInfo().findInWindows("PopUp");
        IWDWindow window   =  wdComponentAPI.getWindowManager().createModalWindow(wInfo);
    message.reportSuccess("came 1");
    window.show();
    message.reportSuccess("came 2");
    window.setWindowPosition(WDWindowPos.CENTER);
    window.setWindowSize(100, 100);
    message.reportSuccess("came 3");
    I get the below  exception on executing:
    com.sap.tc.webdynpro.services.exceptions.WDRuntimeException: Parameter windowInfo must not be null.
    what else should i set. Can u gimme a solution??
    Thanks,
    Shiny

  • Error "Lead selection not set for context node"

    Hi everyone,
    I've got a Tree control in WebDynpro ABAP and I've implemented an "expand all" button.
    Here's the coding:
    METHOD expand_node_rec.
      DATA lo_el_child TYPE REF TO if_wd_context_element.
      DATA lo_node_children TYPE  wdr_context_child_map.
      DATA wa_lo_node_children LIKE LINE OF lo_node_children.
      DATA lo_nd_child TYPE REF TO if_wd_context_node.
      DATA lo_kschl TYPE klschl.
      DATA lv_has_children TYPE boolean.
      lo_el_child = node->get_element( ).
      lo_node_children = node->get_child_nodes( ).
      node->get_attribute( EXPORTING name = 'KSCHL' IMPORTING value = lo_kschl ).
      node->get_attribute( EXPORTING name = 'HAS_CHILDREN' IMPORTING value = lv_has_children ).
      IF lv_has_children = abap_true.
        node->set_attribute( name = 'IS_EXPANDED' value = abap_true ).
      ENDIF.
      LOOP AT lo_node_children INTO wa_lo_node_children.
        lo_nd_child = wa_lo_node_children-node.
        me->expand_node_rec( node = lo_nd_child  ).
      ENDLOOP.
    ENDMETHOD.
    However I'm getting the error above: "Lead selection not set for context node".
    Any suggestions?
    Edited by: DEVELOPMENT THEMIS on Jul 7, 2011 6:34 PM

    hi developement Themis,
    I think u didn't diclare "node" as context node. So declare it as a context node before using as a context node..as below
    DATA node  TYPE REF TO if_wd_context_node.
    or u can use  "lo_nd_child " as ur context node in ur program in place of "node"
    then I think this error will be removed.
    thanks,
    simadri

  • Lead Selection takes a long time

    Hi Experts,
        I have an ALV table in my component that has a lot of fields i,e 82. When ever i try to do a lead selection on the alv the system takes a lot of time to do the action even though there is no code that was written to run on that action (and i have implemented the first time check in modify view so there is no chance of this running either). Someone please let me know how i can reduce the time of lead selection in my ALV.
    Thanks In Advance,
    Chaitanya.

    Solved on my own , it is a result of large no. of attributes in the node.

  • How to go for lead selection

    Hi All,
    I have three views.The first is the search view and the other two are the tables view.
    In the second view..I have to display the data from the BAPI in to the table..and on the lead selection of any row and after pressing the Get Detail button I should get the Details from the BAPI for the particular row in the Third view or Table.
    Kindly provide me the logic to make it working.
    Thanks in advance.
    Regards
    Dipendra

    Hello Dipendra,
    View1 -> View2 -> View3
    Navigation through this views can be achieved by navigation plugs as you may already be aware of.
    Sample code available in the location
    <a href="http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d">http://sdn.sap.comhttp://www.sdn.sap.comhttp://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/49f2ea90-0201-0010-ce8e-de18b94aee2d</a>
    See samples '1 | 2 | 10 | 15 | 40 '
    So after navigation logic is implemented, next step is to pass lead selection data from view2 to view3. This can be done by storing leadselection index in the Contoller context and access the same from view3. So just get the index and get the nodeElement and display the details.
    Regards,
    Sudeep.

  • Problem with table cell editors - Dropdown by Index, getting lead selection

    Hi experts,
    I have a table editor with 5 columns
    1st column is a Drop Down byIndex.
    My contex looks like this
    AS_DATA(Parent Node cardinality 1.1, selection 0-1)
          HEADER (NODE)
          DETAILS(NODE cardinality 0..n, selection 0-1)
             ACTIVITY_TYPES (NODE cardinality 0..n selection 0-1 ) "node for drop down
             description - attribute
             unit
             quantity
    i have bound details node to table data source.
    i have a tool bar button 'Add Line item' which will add a new line item to the table.
    (i am adding a blank line to the table that is bound to table )
    Its working fine. but when ever i add more than one row, the selection made in the previous rows drop down is lost.
    its initializing. where could be the problem.
    My code
    data LO_ND_INV_TYPE type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_TYPE type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE.
      data LV_INV_TYPE type WD_THIS->ELEMENT_INV_TYPE-INV_TYPE.
      data LO_ND_DETAILS type ref to IF_WD_CONTEXT_NODE.
      data LT_DETAILS type WD_THIS->ELEMENTS_DETAILS.
      data LS_DETAILS like line of LT_DETAILS.
      data:  WD_NODE type ref to IF_WD_CONTEXT_NODE,
            LR_ELEMENT type ref to IF_WD_CONTEXT_ELEMENT.
      data LO_ND_INV_PATTERN type ref to IF_WD_CONTEXT_NODE.
      data LO_EL_INV_PATTERN type ref to IF_WD_CONTEXT_ELEMENT.
      data LS_INV_PATTERN type WD_THIS->ELEMENT_INV_PATTERN.
      data LV_INV_PAT type WD_THIS->ELEMENT_INV_PATTERN-INV_TYPE.
      data LO_ND_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_NODE.
      data LT_ACTIVITY_TYPES type WD_THIS->ELEMENTS_ACTIVITY_TYPES.
      data LW_ACTIVITY_TYPES type WD_THIS->ELEMENT_ACTIVITY_TYPES.
        data LO_EL_ACTIVITY_TYPES type ref to IF_WD_CONTEXT_ELEMENT.
    *     navigate from <CONTEXT> to <DETAILS> via lead selection
        LO_ND_DETAILS = WD_CONTEXT->PATH_GET_NODE( PATH = `AS_DATA.DETAILS` ).
        LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(
          importing TABLE = LT_DETAILS ).
    * Append an empty row to lt_details
        append LS_DETAILS to LT_DETAILS.
        LO_ND_DETAILS->BIND_TABLE(
        NEW_ITEMS = LT_DETAILS ).
    * Get values for dropdown
    call method WD_ASSIST->GET_ACTIVITY_TYPE
          exporting
            I_INV_CAT_ID     = LV_INV_PAT
          importing
            ET_ACTIVITY_TYPE = LT_ACTIVITY_TYPES.
        LW_ACTIVITY_TYPES-ID = 'Select a Activity type'.
        LW_ACTIVITY_TYPES-TEXT = 'Select a Activity type'.
        insert LW_ACTIVITY_TYPES into LT_ACTIVITY_TYPES index 1.
        loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
    *lv_index = wd_node->get_lead_selection_index( ). " it is dumping at this statement when i try to get lead selection
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
        endloop.
    any clue on what am i missing will be appreciated.
    I am getting dump when i try to get the lead selection
    Ajay

    You only have only one option in the DDI to display in the example. when you have multiple values
    i assume that by adding an empty row like this will lose the SELECTION MADE in DDI. (Correct me If i am wrong)
    somehow i believe that we need to bind the DD values using  SET LEAD SELECTION INDEX METHOD FOR THE DDI when they are already selected and trying to BIND.
    *LO_ND_DETAILS->GET_STATIC_ATTRIBUTES_TABLE(*
          *importing TABLE = LT_DETAILS ).*
    ** Append an empty row to lt_details*
        *append LS_DETAILS to LT_DETAILS.*
        *LO_ND_DETAILS->BIND_TABLE(*
        *NEW_ITEMS = LT_DETAILS ).*
    even though the above code will have the selected value, the SELECTIONS MADE will be initialize.
    you need to bind it explicitly.
    you have to create an element and bind the DDI values for adding an row as SARAVANAN said.
    or i guess you can continue with you code but need to use SET LEAD to display the correct SELECTIONS MADE
    loop at LT_DETAILS into LS_DETAILS.
          LV_TABIX = SY-TABIX.
          LR_ELEMENT = LO_ND_DETAILS->GET_ELEMENT( LV_TABIX ).
          WD_NODE = LR_ELEMENT->GET_CHILD_NODE( 'ACTIVITY_TYPES' ).
          WD_NODE->BIND_TABLE( NEW_ITEMS =  LT_ACTIVITY_TYPES ). " data for dropdown
    *" try to set the desired value in the DDI when you have multiple values using SET LEAD*
        endloop.

  • How to identify the current lead selection is child or parent in rec node

    Hi
    I am using a recursive node to populate a table with TreeByNestingTableColumn as master column. Now my problem is how do I identify if the current selected row in the table is a child or parent? When I get the lead selection value, I find that its the same for the parent and the child. I am setting the isLeaf and hasChildren boolean properties appropriately as false and true for parent and true and false for child. But since the lead selection is returning the same the below rsTableElement always gives me the parent, I always get those parameter values as that of parent. I am writing this inside the onleadSelect event of the table.
    IRsTableElement rsTableElement = (IRsTableElement) wdContext.nodeRsTable().getElementAt(wdContext.nodeRsTable().getLeadSelection());
    In this scenario how do I know if the current selection is made on a child?
    Appreciate for all help and any code snippets.
    Thanks,
    KN.

    Hi KN,
    I guess you want to check if the node that you selected is parent or child.. This can be achieved by using getTreeSelection() method of IWDNode.
    If you write following code in your lead selection action, you can determine the if it is a parent or child node.
    wdComponentAPI.getMessageManager().reportSuccess(wdContext.nodeRsTable().getTreeSelection() +"");
    the output will be something like
    <ViewName>.RsTable.0.ChildRsTable.1.ChildRsTable.0.. depending upon which node you have selected.
    That way you can find out if it is a parent or child node.
    Abhinav

  • How to block lead selection change in a tree ?

    Hi Guys,
    <u>Scenario</u>
    I have MasterTree - DetailEditor pair. <i>MasterTree</i> is used to visit some tree-structured data and <i>DetailEditor</i> is used to edit currently selected tree node.
    <u>Requirement</u>
    If currently selected node data is updated through <i>DetailEditor</i> and needs to be saved, than on a subsequent tree selection change the user should be warned about unsaved data.
    <u>Implementation</u>
    In <b>onAction</b> event handler of <i>MasterTree</i> I check whether last selected node data is updated and needs to be saved and if this is the case rollback <i>treeSelection</i> to that node. On the time <b>onAction</b> event handler is called the tree selection is changed from the node that needs save to the newly selected node. In order to rollback <i>treeSelection</i> I need to introduce variable referencing last selected tree node.
    <u>Question</u>
    Is there any other technique to implement above scenario without using additional variable and manually rollback <i>treeSelection</i> ? For example, to plug in WDP framework on validation step just before lead selection is changed.
    Thanks in advance

    Alex,
    Here is a link to the phase model of WD:
    http://help.sap.com/saphelp_nw04/helpdata/en/b8/cd96edb9c8794aa362e6e8b4236a1f/frameset.htm
    There aren't any hooks provided prior to the event handlers being called. As far as I can tell, the way you are handling it is the only way that will work.
    -Cindy

  • Index of the Table control - No lead selection activated

    Hi guys,
    I have a table control where there is no lead selection.... One colum of the table contains push button on all rows and I need to find the row id based on the click of the which row button... How to do this???
    regards,
    Prabhu

    Hi Prabhu ,
    write the below piece of code in the button Action .
    DATA lo_nd_node_table TYPE REF TO if_wd_context_node.
      DATA lo_el_node_table TYPE REF TO if_wd_context_element.
      DATA ls_node_table TYPE wd_this->Element_node_table.
    *   navigate from <CONTEXT> to <NODE_TABLE> via lead selection
      lo_nd_node_table = wd_context->get_child_node( name = wd_this->wdctx_node_table ).
      CALL METHOD wdevent->get_context_element
        EXPORTING
          name  = 'CONTEXT_ELEMENT'
        RECEIVING
          value = lo_el_node_table.  " getting the clicked line
      CALL METHOD lo_nd_node_table->SET_LEAD_SELECTION
        EXPORTING
          ELEMENT = lo_el_node_table.  " Setting the lead
      data lv_index type i.
      CALL METHOD lo_nd_node_table->GET_LEAD_SELECTION_INDEX
        RECEIVING
          INDEX = lv_index. " getting the index of the lead line
    Hope it will Helpfull .
    Regards
    Chinnaiya P
    Edited by: chinnaiya pandiyan on Jun 28, 2010 12:04 PM

  • How to read the Lead Selection in Search UIBB

    Hello,
    I have a Search UIBB implementation with the list from Search UIBB.
    When the user double click any line in the List we want to call another program.  Not sure how to read the Lead selection. I see the event ID FPM_RESULT_LEAD_SEL  in Process_Event method and GET_DATA method but not sure how to get the actual line.
    Thanks in advance for any help.
    Regards,
    PK

    Hi ,
    method IF_FPM_GUIBB_SEARCH~PROCESS_EVENT.
    CASE IO_EVENT->MV_EVENT_ID.
    WHEN  IF_FPM_GUIBB_SEARCH=>FPM_RESULT_LEAD_SEL.
      READ TABLE   IT_RESULT_LIST  into  IS_RESULT_LIST index IV_LEAD_INDEX.
    ENDCASE.
    Where  IT_RESULT_LIST -> is the internal table of   ET_RESULT_LIST( This can be declared in attributes section and assigned value in GET_DATA method )
      IS_RESULT_LIST-> is a structure of type  table  IT_RESULT_LIST.
    IV_LEAD_INDEX has to be created at attributes section and the value of the selected row of type I can be assigned in IF_FPM_GUIBB_SEARCH~FLUSH method for the same event.
    Regards,
    Harsha

  • How to make a row enabled for lead selection and make other Rows disabled?

    Hi,
    What I require is:
    In a webdynpro table , which can have multiple rows, I want to make the rows which are retrieved fom backend as disabled for selection.
    And when I add a new row (using an ADD functionality) , this newly added row should only be enabled for lead selection.
    The Table property "enabled" can be assigned a context , and can be used to control the disabling of whole table.But then if I add the new row to this table, even this will be disabled.
    I can set lead selection to a the new row, but if the whole table is disabled, this won't work.
    Please suggest a solution for this.
    Thanks,
    Richa

    Do not set the enabled flag to the whole table but to the editors of each column. Bind the enabled property to a calculated boolean flag in the data source node. In the get method of this flag add a code that will make the editor enabled only if it belongs to the lead selection element.
    Now do not allow the selection of rows in the table (there is a property for this, perhaps is named rows selection I don't remember well now), but change the lead selection of the data source node to the desired element when you add the element programatically.
    Hope it helps.

  • How to prevent action (lead selection change) with popup (confirmation)?

    Hello all,
    I have an application where I want the user to confirm when he selects a new line in a table. When the user selects a new line in the table an other used component reloads its data based on the new line selected. If the user has not pressed the save button before selecting a new line, any changes in the used component will be lost.
    Currently I use onLeadSelect action on the table to call the load_data method(id=xxx) on the used component in order to display data relevant for id=xxx based the new line.
    I can open a popup to confirm from the onLeadSelect-action or the WDDoBeforeAction, but the action still happens; it doesn't wait for the user to respond. And then any changes are lost...
    I may have to store the parameters sent to the onLeadSelect method in context and continue when the button action from the pop-up returns via subscribed method, but I think this is an unelegant way of doing this.
    There must be a better way...? Any ideas?
    Regards,
    Christian Frier

    on the lead select event handler you can show the popup and no other logic. Move your logic to the ok and cancel button handlers of the pop up.

Maybe you are looking for

  • Question about Memory Slots on Equium notebook

    I am putting in more Memory and the Manufacturer tells me to put the largest capacity Memory module in Socket No "0" Can somebody please tell me how I will know which one is "0" and which is "1" I have taken 512 MB module out of right hand stack and

  • TS4000 I can't see my reminders in my Calendar app on my Mac (10.8.5)

    Am I going mad??? Or do reminder lists not display in Calendar like they used to? I have looked on various discussions.... They suggest that reminders lists are displayable on the Calendar app But they seem separate apps now. I know I can see a calen

  • Self assigned ip address-Could someone help me?

    There are two Powerbooks in my house which connects wirelessly to the internet and an airport express that joins the existing wireless connection. When I'am using mine, I can connect without any problem, but when my girlfriend uses her mac we both ge

  • How to I save to an external hard drive that is used on a PC also?

    I have a Iomega hard drive that i have lots of stuff on from my laptop (windows) at home. I need to be able to se it both on mac and pc as I don't have mac at home. Annoyingly the when it is plugged into the mac the external hard drive becomes read o

  • Unreadable format when reading from iphone 4

    Hi Ive just purchased a new Imac i5 1Tb (I have 750G free space)...8GRam OSX 10.7.5 ( I was told not to update to 10.8 from mac shop saying its not ready wait for a couple of releases)  Iphoto  version 9.4.1. I ran the update from (10.X not sure what