Obtain a reference to the element at lead selection

I am trying to obtain a reference to the element at lead selection of a context node (Node name is Person) of component controller, i had a method initPerson() to initialize the values, so when i am writting
IPersonElement personEl = wdContext.nodePerson().currentPersonElement();
to obtain a reference , at IPersonElement  it is giving me an error
IPersonElement can not be ressolved or is not a type !
can anyone help me on this
Thanks in advance.
Rashmi.
Edited by: Rashmi Gupta on Nov 6, 2008 11:40 AM
Edited by: Rashmi Gupta on Nov 6, 2008 11:41 AM

Hi
Usse
view/controllerName.IPersonElement
Just like given example below
IPublicAllInOne.IFlight_List_1Element ELE = wdContext.nodeFlight_List_1().createFlight_List_1Element(new Bapisfldat());
PS: Orgine the import files. by pressing control+Spece button at time
or
controlSpeceO
Thanks

Similar Messages

  • What is the use of Lead selection?

    Hi Experts
    i am new to webdynpro.
    i would like to understand what is the use of lead selection and why do we need it?
    Thanks
    Abdul Hakim
    Moderator Message: Basic WDA question. Please search before posting
    Edited by: Suhas Saha on Aug 14, 2011 1:11 PM

    Lead selection is used to set the values to the context element.
    if you have a table and if you use lead selection , it will show that particular record highlighted.
    If you are using a drop down and used a set_lead_selection method for that, you can actually set the desired option in the list of entries.
    Basically you have an option , to set the desired entry in the list of options.
    if you are using a get_lead_selection method, you can get the selected value to the context element.

  • Getting the details of element in lead selection

    hi experts,
    please help me out with the following requirement.
    I have a table displayed in my table_view with 3 feilds.if i select a row in the table and click details, then it should get the details(ie all 8 fields) in the table_details view.
    I used the currentContextElement option but it gave me the details of the last row always..
    thanks in advance..
    jithin

    Hi,
    suppose if u have two node node1 and node2
    and u want to copy the selected element from node1 to node2,
    int lead=wdContext().nodeNode1.getLeadSelection();
    /////get attributes at lead selection
    IPrivateView.INode1Element elem1 = wdContext().nodeNode1().getInode1ElementAt(lead);
    String a =elem1.get<Attr1>();
    //////create an elemnt of the node2 and set the attributes
    IPrivateView.INode2Element elem2 = wdContext().nodeNode2().createNode2Element();
    wdContext().nodeNode2().bind(elem2);
    elem2.set<Attr1>(a);
    Regards,
    Satya.

  • Table: show the line of lead selection

    Hello,
    I have a table with 691 lines, showing 20 lines per page. Is it possible to change the lead selection for example to line 60 and also jump to line 60. So that the table automatically shows the 3rd page with the line 60 - 80.
    I can change the lead selection with:
    node_trefferliste->set_lead_selection_index( index = 60 ).
    Lead selection is set correctly to 60 but the table still shows the lines 1- 20.
    best regards
    Stefan

    Hi Stefan,
    What ever you have done is correct. One thing you need to change is whenever you change the lead selection for you table you need to scroll ALV also. For that get the lead selected entry and set it as frst_visible_row for you ALV table. Please do this coding in the respective view controller method WDDOMODIFYVIEW(). so that you will get exact result what you are expecting.
    I hope i make you clear.
    Warm Regards,
    Vijay

  • Obtain reference to the IPortalComponentRequest in TagLib

    Hi,
    I created a custom Taglib in a Portal Component according to the tutorial http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/40599e45-8cf9-2910-cbaa-d4cd8e15ff34?QuickLink=index&overridelayout=true.
    Now I need to obtain a reference to the IPortalComponentRequest in the doStartTag method.
    Does anybody know how to do this?
    Best regards,
    Dominik

    Hi,
    I found it by myself. To whom it may concern. You obtain a reference via:
    IPortalComponentRequest req= (IPortalComponentRequest) pageContext.getAttribute(javax.servlet.jsp.PageContext.REQUEST);
    Thanks and best regards,
    Dominik

  • Is it possible to get the element data type of a Queue from itself?

    Hi everyone,
    i have a Q that has a cluster as element data type.
    now when i want to enqueue
    i'll use bundle-by-name
    and for that i'd have to have my data-type present
    (long cable from whereever (possibly from where i obtained the Q).
    my question is,
    whether there is a method/property-node/something that allows me to
    wire the Queue Refnum into it and receive the element-data-type,
    so i can then input into the top of bundle-by-name?
    (i really dont want to have that cable all over the place)
    the reason i ask here is that
    the help for the outgoing Queue Refnum from the Obtain Queue method,
    shows the element-data-type and so i hope there might be a solution.
    thx for your time
    and cheers
    j
    Solved!
    Go to Solution.

    If I understand your question correctly, the answer is "Yes, it's very easy ..."
    The answer is "Preview Queue".  Here I create a Queue of some mysterious type (it's a cluster having a Thing and a Center, but you don't know that yet).  I take the Queue reference from whereever I can find it and pass it into Preview Queue Element.  I take the output and use it to define my cluster in Bundle by Name.
    Two caveats.  This copies the first element of the Queue into the cluster, so you probably need to be sure to define all of the elements of your cluster.  But what if the Queue is empty (as mine is, above, as I just Obtained it) -- well, that's why 0 is wired into the TimeOut input, since I do not want to wait "forever" (-1) for the empty Queue to have an element!  Turns out that even in this case, you still get the correct Cluster elements!
    Neat, huh?
    Bob Schor

  • 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.

  • Getting the selected index of a table (CL_WD_TABLE) without lead-selection

    Hi
    When I click in a table-UI (not alv-table) on a f4-help, I can search with se11-searchhelp on a field. After I choose something, I should also fill some other fields in the same row.
    In the table I have no lead-selection. So, I am searching for a method that gets me the selected index. The element-class for the table-UI is CL_WD_TABLE.
    Once I have the selected index, I could change the fields in the same row inside the WDDOMODIFYVIEW.
    With activated node-selection it can be, that the user selects one row, but he starts the f4-help on another row (the lead-selection doesn't change).
    I have seen this article, but i hope that for the table-UI it is different than with alv:
    [ON_CELL_ACTION triggered only by ENTER ?]

    Hi Lorenzo,
    I'm trying to do the same thing and came up with this solution. In WDDOMODIFYVIEW, since we cannot know in which table row the user clicked the search help, I simply loop through all the rows of the table. For each row, I delegate to a method in the Component Controller which sets the specified index as the table's lead selection then reads the selected table row from the context. I can then populate fields in the selected row as needed.
    METHOD wddomodifyview .
       DATA lo_componentcontroller TYPE REF TO ig_componentcontroller.
       DATA lo_nd_items TYPE REF TO if_wd_context_node.
       DATA lt_items TYPE wd_this->elements_items.
    * -- Upon return from the search help, populate table row details
       lo_componentcontroller = wd_this->get_componentcontroller_ctr( ).
       lo_nd_items = wd_context->get_child_node( name = wd_this->wdctx_items ).
       lo_nd_items->get_static_attributes_table( IMPORTING table = lt_items ).
    * Since we cannot know in which table row the user requested the search help,
    * loop through all table rows, populating table row details as needed.
       DESCRIBE TABLE lt_items LINES sy-tfill.
       DO sy-tfill TIMES.
    *   Delegate to the Component Controller
         lo_componentcontroller->get_table_row_detail( sy-index ).
       ENDDO.
    ENDMETHOD.

  • Obtaining activex reference from activex container

    I have a VI with an embedded MediaPlayer activex object inside an activex container.  Additionally, I have a seperately run VI which I want to be able to control the MediaPlayer obejct in the first VI.  These VIs are opened seperately, so I cannot pass information directly from one to another (i.e., I can't directly pass the MediaPlayer activex reference to the second VI directly).  Therefore, the second VI obtains a reference to the activex container object by searching the first VI's controls and filtering by label.  I can typecast the control reference to the level of activex container, but from there I have no way of obtaining a reference to the object embedded in it.  Is there are way to do this?  The "To more specific class" function does not accept activex references for typecasting, and the automation open does not accept activex container references.  I've searched through the forums, and while there is plenty on activex references and containers, there doesn't seem to be anything that addresses my issue.

    I'm not 100% about whether this will work, but give it a try. Once you have a reference to the container, use the 'Value' property. This will give you a variant. From here you can use Variant to Data, connect a MediaPlayer constant reference to the type input and you should get the correct reference out.
    Also, you could simply get a reference to the VI with the ActiveX control and use the method 'Control Value: Get[Variant]' to get the value of the control instead of getting a list of all the controls and searching for the one you want.

  • Getting a reference to the current Transaction

    In a session bean, I need to call enlistResource(XAResource), an instance method in interface javax.transaction.Transaction, in order to enlist my XAResource object with the current transaction (whether it's a bean-managed or container-managed transaction).
    In order to accomplish this, my code therefore needs to be able to obtain a reference to the current transaction, or to the transaction manager (since I could then call TransactionManager's getTransaction() method to obtain the transaction).
    Is there a way to do this in IPlanet? (I have found techniques that work for JBoss and BEA, but not IBM.)
    [Please note that a reference to a UserTransaction object is of no use, as it provides no enlistResource() method, nor any way to obtain the corresponding Transaction object or the TransactionManager.]

    Try
    InputStream is =
    ThisClass.class.getClassLoader().getResourceAsStream(resourceName);
    Note this will get a different classloader which uses
    the whole class-path.Just as an FYI, class.getResourceAsStream() delegates to the object's ClassLoader, so you can save some typing by omitting the call to getClassLoader(). :o)

  • Obtaining a reference to CURSOR LEGEND (Tree Control) of a graph (for purposes of compressin​g it)

    The Captain (Norm Kirchner) told me awhile back how to obtain a reference to the Cursor Legend of a Graph so as to be able to compress it (the cursor legend is a tree control that unexplainably likes to expand at times).  Norm, if you are still there or if someone else knows, please provide instructions for all to see.  Much obliged as I have searched everywhere in my email and notes and cannot find the correspondence.
    Thanks,
    Don

    If it is indeed impossible to create a reference to the cursor legend tree, then how was I able to do what I did in the attached VI?
    (Expand one or both of the cursor trees in the legend and then run the VI.)  See the block diagram.
    Note that I don't remember how I did it either (which is why I posted this originally).  I had notes on this in an email exchange with Norm Kirchner but I think during our change of email clients, it got deleted.
    Don
    Attachments:
    cursor_tree_legend_reference.vi ‏14 KB

  • Why does the elements 13 change resolution when going into the editor -- it is huge and unusable

    why does the elements 13 change resolution when going into the editor? -- it is huge and unusable

    Many mysteries...
    Which is your OS version ?
    Your screen is 1920 by 1080 pixels.
    The problem appeared after having worked normally.
    When we select a picture from the organizer (album) and click on the edit button.  The editor software changes the entire computer resolution from 1920 x 1080 to   640 x 480 (very unusable).
    That's not clear for me: did you click on the 'Edit' button on the bottom right part of the organizer, or did you use the menu or the right click popup menu to open the editor? In the second case, you are in the editor workspace.
    We tried right clicking on the Elements 13 icon, select properties and under compatibility we made sure that "run in 640 x 480 screen resolution" was de-selected, and it was.    Cannot find any properties window for the editor?  
    The editor has its properties in the 'Edit/preferences' menu, but there is nothing about resolution there.
    Just to be sure : when you are in the organizer with the left 'Folders' panel shown, you highlight one of those pictures to edit. Then you right click and choose to "go to folder". Do the images are shown as 'offline' ? If that is the case, the original are on an external drive which is not connected, and what you are seeing is a 'preview' copy on your computer with 640 x 480 resolution.

  • WDABAP: note of change of Lead Selection overall component

    Hi,
    I would like to build a similiar wd-application like wd-component 'wdt_master_detail'. There you will see a table with fly-data and below some details of the actual selected row of the table (by lead selection).
    The difference is that I want to seperate the data retrieval in a model-component(z_model) and for the table / details two seperate wd-components(z_table / z_detail) which mapps the fly-data. The wd-application instantiate a wd-component (z_container) which includes in its view z_table and z_detail.
    When the lead selection changes(by selecting a new row in the table of z_table) the details of z_detail should change to the details of the element with the lead selection. But this does not work! By node->get_lead_selection_index in z_detail I get only the inital lead-selection. node->get_lead_selection_index in z_table provides the right index.
    I tried also following: z_table calls z_model->set_lead_selection and this method set the lead selection of the original node new. But this does not help.
    Has someone an idee what I have to do that the component z_detail receive the information? Has the z_model to raise an event with the information of the new index? I hope not.
    Thanks a lot!
    Regards,
    Marcel
    added 1:
    I have an assumption why it does not work:
    Maybe z_table and z_detail instantiates two separate z_model.
    So a solution would be that z_container instantiates z_model and provide this instance to z_table and z_detail but I have absolutly no idee whether and how this could be working... Please kindly help.
    added 2:
    I thinking further a little bit loud...
    I have the idea that z_container mapps the context from z_model and set this these to input-node.
    z_table and z_detail mapps from z_container. ok, if I would like to create many application then I have to create related components(z_comp_appl_xx) and these components includes z_container. This would be maybe the solution if there is a instance problem(see added1) but I have tested and the details screen gets NOT the lead selection
    Message was edited by: Marcel Schreier

    Hi Marcel,
    to extend Thomas comments, here are some suggestions to turn it into code. Hope it helps.
    option A)
    assuming you name the usages in z_container "usage_z_model", "usage_Z_table", "usage_Z_detail":
    in componentcontroller of z_container methode wddoinit() do the following:
    DATA lr_model_usage    TYPE REF TO    if_wd_component_usage.
    lr_model_usage =   wd_this->wd_cpuse_usage_z_model( ).
    IF lr_model_usage->has_active_component( ) IS INITIAL.
      lr_model_usage->create_component( ).
    ENDIF.
    DATA lr_usage    TYPE REF TO    if_wd_component_usage.
    lr_usage =   wd_this->wd_cpuse_usage_z_table( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    lr_usage =   wd_this->wd_cpuse_usage_z_detail( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    Following this way, it is required to name the usages of z_model in component z_table and z_detail "MODEL_USAGE".
    option B)
    in componentcontroller of z_table and z_detail create an interface-methode set_usage() with one parameter ir_usage type if_wd_component_usage
      DATA lr_usage  TYPE REF TO  if_wd_component_usage.
      lr_usage = wd_this->wd_cpuse_usage_z_model( ).
      lr_usage->enter_referencing_mode( ir_usage ).
    in component z_container method wddoinit() do the following:
    DATA lr_usage    TYPE REF TO    if_wd_component_usage.
    DATA lr_if_ctr_z_table TYPE REF TO iwci_z_table.
    DATA lr_if_ctr_z_detail TYPE REF TO iwci_z_detail.
    DATA lr_model_usage    TYPE REF TO    if_wd_component_usage.
    *-- create instance of z_model
    lr_model_usage =   wd_this->wd_cpuse_usage_z_model( ).
    IF lr_model_usage->has_active_component( ) IS INITIAL.
      lr_model_usage->create_component( ).
    ENDIF.
    *-- create instance of z_table
    lr_usage =   wd_this->wd_cpuse_usage_z_table( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( ).
    ENDIF.
    *-- set usage
    lr_if_ctr_z_table =   wd_this->wd_cpifc_usgae_z_table( ).
    lr_if_ctr_z_table->set_usage( model_usage = lr_usage).
    *-- create instance of z_deatil
    lr_usage =   wd_this->wd_cpuse_usage_z_detail( ).
    IF lr_usage->has_active_component( ) IS INITIAL.
      lr_usage->create_component( model_usage = lr_model_usage ).
    ENDIF.
    *-- set usage
    lr_if_ctr_z_detail =   wd_this->wd_cpifc_usage_z_detail( ).
    lr_if_ctr_z_detail->set_usage( model_usage = lr_usage).
    regards, Ulli

  • How to write lead selection method for a  tree by nesting table column

    Hi,
    I have implemented a table with TreeByNestingTableColumn(To show the tree structure in the table).I am not able to get the selected row element in lead selection method.(I am able to get parent element.) .
    could anyone please tell me about this code?
    BR,
    Ashish

    Hi,
    Follow the below steps to the solution for your problem
    1. Create Action "LeadSelection" in View with parameter (name : 'seletedItem'
    and type : I<your node>Element
    2. Bind this action to Table property "onLeadSelec"
    3. In wdModify()
         IWDTable table = (IWDTable) view.getElement("Your table id");
         table.mappingOfOnLeadSelect().addSourceMapping("nodeElement", "selectedEle");
    4. In onActionLeadSelection()
         wdComponentAPI.getMessageManager().reportSuccess("Selected Item : "+selectedEle.get<Your Node Attribute>());
    Let me know if you need more clarification
    Thanks

  • EXPLAIN LEAD SELECTION WITH AN EXAMPLE? WHY IT IS IMPORTANT?

    HI ALL,
      please explian me lead selection with an example?  what is the significance of lead selection?

    This is something that is not well explained anywhere, and it probably won't be well explained by me, either, but maybe when the clever people finish correcting me, we will have a good story.
    Lead selection is a mechanism that WDA uses to define a default row in a multi-element (e.g. table) node in the context.
    For example, lets say you display a list of flights in a table in WDA.
    You put them into an internal table and bind them to a  context node. 
    If the user selects one (by clicking the button beside the row of the table) then your program would like to know which row was selected.  You could loop over the whole table looking for some indicator, but that is tedious and time consuming.
    Because of the lead selection mechanism, you can call GET_STATIC_ATTRIBUTES which gets the values for a single row of the table.  Which row?  Well, the row selected by the user, which is called the lead selection.  I think it is called 'lead selection' because if you select a range of rows, then the first or leading row is set as the lead selection and that is the one you will get if you ask for a single row.
    Of course, nodes don't have rows, they have elements, but if you promise not to say it out loud, you can think of them as rows.
    So lead selection is all about providing easy access to the selected element of a multi-element node  If you ask the table for just one row, it will give you the selected row.
    With lead selection, asking a table for one row without saying which one would probably be an error, but with lead selection, it makes sense.  There are many node functions that work on a element that use lead selection to choose the element when you call them for a node with cardinality > 1.
    There are a bunch of methods in IF_WD_CONTEXT_NODE that allow you to set and get the lead selection, and use it to do various things.  This is useful, because with a big list of data, the thing you are probably interested in is the one the user has clicked.
    For example you can write a program that displays spfli and a button that calls lr_node->GET_STATIC_ATTRIBUTES and displays the selected row's carrid and connid  in a message. You can then select a row of the table and your button will always know which one you have chosen.  It might be psychic, but it is probably really lead selection at work.
    Or you can have an input field where you enter a row number and click a button.  If you call
    .  lr_node = wd_context->get_child_node( 'SPFLI' ).
    .  lr_element = lr_node->get_element( index i ).
    .  lr_element->set_lead_selection( )
    in the button action method you will see the button for that row suck into the screen as if you had clicked it.
    I hope this does more good than harm.
    Edited by: Russell Day on Feb 16, 2008 1:47 PM

Maybe you are looking for

  • Nano 3rd Gen - Last run completely disappeared

    Today I had a problem - my 8 mile run disappeared!!! When I finished, it gave me my stats, time and distance. When I went to download it, it was gone. I looked at my history on the iPod and it said that nothing was saved. I've signed up for the virtu

  • How do I force my N95's video center to refresh?

    Using a N95 8GB at the moment. When I first got it, the video center was working perfectly, detecting any video that I load into the phone. However, it doesn't do that now. Tried formatting it but it didn't work. Any suggestions? Thanks

  • I have iPhone 4S I got a Video in my email how can I watch it?

    I got a video in my email I have iPhone 4S  how do I watch it

  • How to define own properties

    Hi, I would like to know how to create own properties of own iView which can be set on EP after deploying. For example: on URL iView can be set URL, request method, etc. How to create parameters like these?

  • Lightroom vs Bridge

    Someone please tell me the core difference between lightroom and bridge. Also, when I export a photo from lightroom to photoshop it cannot be opened in the raw converter in bridge. Why is this?