LinkToURL in table

Hi
I have a linkToURL in a table Col. It works fine, when clicked it opens a new window navigating to the correct link. The problem I have is that the selected row in the table is not updated e.g. If there are 5 rows in a table, Col 1 is a text col, Col 2 contains the linktoURL. if I click on row 1 col1, the row is highlighted as selected. if I click on the image, row 2, col2 then the link is opened but the row 2 is not highlighted as selected - the onLeadSelect Event is not triggered. Any suggestions how to display this row as highlighted.
ThanksAndrzej

Hi,
To change the leadSelection on click of the link, Follow the below procedure
Use LinkToAction instead of LinkToURL
Add a parameter of node element (currentUploadDataElement if UploadData is your node name) to the event handler
Do the parameter mapping for the LinkToAction UI element so that whenever link is clicked, the element (row) from which link is clicked is passed as parameter to the event handler
From the node element parameter of the event handler get the index of the row from which link is clicked and set the leadSelection to this index as
wdContext.nodeUploadData().setLeadSelection(currentUploadDataElement.index()-1);
This will solve your problem
Regards,
Amol

Similar Messages

  • How to create a column with link to an email?

    Hello,
    I have created a table UI with a certain column that contains email addresses. I would like to turn this column into a link that by pressing it will open new mail message with the default mail editor (In my case it is Outlook).
    How do I do that?

    1. To set a LinkToURL as table cell editor: In the <b>outline view</b>, select the table column, right-click to open the context menu and choose "Insert table cell editor" (or similar). This should open a dialog where you can select the type of table cell editor. Among these you will find LinkToURL.
    2. If you already have a context attribute that stores the mail address, you need an additional (calculated) attribute that returns mailto:<address>. In the get-method generated for this calculated attribute you simply return "mailto:" + <address> as described.
    Armin

  • Problem with LinkToURL in a table column

    Hi,
    let's say we have a LinkToURL element with a text and an image. Then a click on the text OR a click on the image navigates to the given URL.
    This behaviour changes if you put the LinkToURL element in a table column. In that case the link is executed only if you click on the text, nothing happens if you click on the image (I assume this is a bug, of have I missed a detail?). If you have a LinkToURL element without a text and with an image only, this becomes a problem.
    One column of my table contains a single image, and a click on that image shall open a link. Is there another way to do this except using a LinkToURL element?
    Thanks,
    Karsten

    Hi Valery,
    yes, this hint is exactly what I needed. I just changed the LinkToURL to a LinkToAction, and this can be activated by clicking the text OR the image.
    The necessary coding in the action handler would then look like this:
    WDWindow wnd = wdComponentAPI.getWindowManager()
         .createExternalWindow("http://www.sap.com",
         "SAP Global", false);
    wnd.open();
    Thank you very much,
    Karsten

  • LinkToUrl Element in a Table SP10

    Hy All,
    i have an LinkToUrl-Element in a Table (Cell).
    After the click on the link (or symbol) the next step (navigation to another view) was triggered. This works fine.
    After installation of SP10 this is not working. If the link was pressed, no action is fired. All properties for me are ok.
    I don't know, what can i do ?
    Any idea's ?
    Regards
    Jürgen

    Hy Armin,
    the URL is ok !
    If i click the right mouse button, Open Link or open link in a new window, the url is opened correctly. All is fine!
    the LinkToURL UI-Element is enabled.
    I hava a service function on that element, and checked (logged) the status of that property.
    Regards
    Jürgen

  • Table with linktourl

    i have a table
    itemno name price
    <u>0010</u> BMW 500
    <u>0020</u> BMX 350
    column itemno is link
    when i click the 0010 ..I want to link to another page that show the detail of the page...
    LinkToUrl....what should i set in linktourl properties..or create any node ?
    how to set the path?<u></u><u></u><u></u><u></u><b></b><b></b>
    Message was edited by:
            yzme yzme

    i have the same concept as you ,
    yet
    public void wdDoInit()
        //@@begin wdDoInit()
        String itemno=wdContext.currentPRJCOElement().getItem();
         wdContext.currentContextElement().setUrl("http://localhost:50100/webdynpro/dispatcher/sap.com/pr/PRapp?" +itemno);
        //@@end
    masterpage url : http://localhost:50100/webdynpro/dispatcher/sap.com/pr/PRapp
    detailpage url : http://localhost:50100/webdynpro/dispatcher/sap.com/pr/PRapp
    very weird is that masterpage url and detail page url is the same....
    SAPtestId=1 , 2 ,3 ,4, keep on growing...
    http://emi-sap:50100/webdynpro/dispatcher/sap.com/pr/PRapp?SAPtestId=8

  • Problem related to a column in a table?

    Hi All,
    I have a table and two webservices.On the basis of certain search criteria,the table will get populatedwith data.
    In the search screen i am passing values to both the webservices. Then in return my table is getting populated with data from both the webservices.
    For this sake I have created a value node with value attribites according to the number of fields required for the table.
    I have one column as a requirement as a link.I am binding this value node to the table and then the table is ready for the data incoming.
    But the column LINK is not related to any webservices.
    The LINK has the record "click to view".
    The text click to view should be disabled for the row or the data coming from one webservice and should be enabled for the other.
    While binding the table with the value node , I am setting the editor as linkToURL and binding property as enabled.
    Then in the program I am setting it false for one for loop which is responsible for one webservice and otherwise for the other.
    Kindly help me .Looking forward to you.
    Regards
    DK

    Hi,
    for(int i=0 ; i< this.wdContext.nodeA().size() ; i++){
                             IPrivateSearch_View.IInfoElement ele = wdContext.nodeInfo().createInfoElement();
                                       ele.setAmou(wdContext.nodeA().getAElementAt(i).getAMO());
                             ele.setCurr(wdContext.nodeA().getAElementAt(i).getCUR());     
    ele.setLink("Click to view");
    }//This is for One Webservice.
    //Like wise i do for the other webservice and the looping is done according to the other webservice struturesize.
    // Link is a local attribute as mentoned before of type string.

  • How to change Table Cell Field Type Dynamically?

    Hi All,
    I am fetching some news data from backend DB and displaying them in a WD Table. Now one News Item may or may not have a URL behind it. If I find the URL as null then I want to display the news as simple TextView otherwise as LinkToUrl. How can I change this input type dynamically for each row in the runtime?
    If I use LinkToUrl all the time then the items which has URL as null gets displayed as normal text, but they are of very faint color and I can not change the text design. Whether if I user TextView I can set some text design like Header2, Header 3 etc.
    Can anybody please help with some code block? My main requirement is how to change the table cell input type dynamically.
    Thanks in Advance.
    Shubhadip

    Hi Shubhadip,
    This is the sample code for creating and adding a table cell editor table dynamically.
    public static void wdDoModifyView
    (IPrivateDynamicTableCreationView wdThis, IPrivateDynamicTableCreationView.IContextNode wdContext, com.sap.tc.webdynpro.progmodel.api.IWDView view, boolean firstTime)
    //@@begin wdDoModifyView
    /*** 1.Create Table **/
    IWDTable table =
    (IWDTable) view.createElement(IWDTable.class, "table1");
    table.setWidth("100%");
    table.setVisibleRowCount(data.length);
    /*** 2.Create nameColumn **/
    IWDTableColumn nameColumn =
    (IWDTableColumn) view.createElement(IWDTableColumn.class, "Name");
    IWDCaption colHeader =
    (IWDCaption) view.createElement(IWDCaption.class, "NameHeader");
    colHeader.setText("–¼‘O");
    nameColumn.setHeader(colHeader);
    IWDTextView nameViewer =
    (IWDTextView) view.createElement(IWDTextView.class, "NameViewer");
    nameViewer.bindText(nameAtt);
    IWDTableCellEditor editor = (IWDTableCellEditor) nameViewer;
    nameColumn.setTableCellEditor(editor);
    table.addColumn(nameColumn);
    IWDTableColumn nationalityColumn =
    (IWDTableColumn) view.createElement(
    IWDTableColumn.class,
    "Nationality");
    IWDTableCellEditor nationalityEditor =
    (IWDTableCellEditor) nationalityViewer;
    nationalityColumn.setTableCellEditor(nationalityEditor);
    table.addColumn(nationalityColumn);
    /** 3. Bind context to table **/
    table.bindDataSource(nodeInfo);
    //@@end
    Bala
    Kindly reward appropriate points.

  • How to set two different UIE in one cell in ALV table

    Hi all,
    I have a hierachy ALV table. For some reason I want to have two UI elements in one column. For example, the text and a menu next to the text. Is it possiable to do that?
    best regards,
    Wenwen

    Hi,
    thank you for your answer. Yes, now I also find the class CL_SALV_WD_MULTI_CELL_EDITOR which could be used to set different UIE in one cell. But it is quite limited, just the following UIE could be used
    - LinkToAction 
    - LinkToURL    
    - FileDownload 
    - Button       
    - ToggleButton 
    best regards,
    Wenwen

  • How to make the fields of table clickable?

    Hi Experts,
    I have created one RFC based WD program. We are displaying data in a table. Now I have to make some of the fields of table clickable.
    When the user will click on some of the fields, another RFC should be called.
    How I can do so?
    Regards,
    Gary

    hi
    when you try to select the attributes of the table that has to be  populated
    you may have  to right click on the rootuicontainer and select apply template and select table
    and select the attributes from the node that has to be populated in the table and click next
      and you can find the attributes name and textview which is by default that would be shown inthe table
      instead you can  change the textview and select from the dropdown select the linktoaction and linktourl
      and or you can go other way as add a new column to the table and select buttons to the table .
      and for each each row and on click of the button you can call the RFC .
    Thanks

  • Hierarchy ALV and LinkToURL and row colors

    Hi!
    I've to implement a hierarchy ALV with two hierarchy columns, which should appear as LinktoURL (different URLs).
    The Hierarchy-header-line should be displayed in an other color then the other rows.
    Popins are not supported by ALV? This could help, but the displayed table must be printable (PDF), that's why I'm focused to ALV!
    Is this possible? If yes, please give me hints you to implement these functionality!
    Kind regards and thanks in advance!
    Peter

    Hi,
    to use Cancel button in dialog based on class cl_salv_table, define your own gui-status or use an existing from standard program, for example gui-status ST850 from program SAPLKKB.
    Look here for the complete example:
    [http://www.kerum.pl/infodepot/00003]
    regards,
    Kris

  • How to append parameter with URL for each record in table control?

    Hi,
    I have one table control which contains 5 columns.
    (tripno, startdate, destination, reason, activities)
    In 5th column, i need to display URL for each record.
    for ex:
    www.abc.com/test?tripno=1
    www.abc.com/test?tripno=2
    www.abc.com/test?tripno=3
    when user clicks a particular hyperlink, it navigates to another page/component thru URL with one key field(tripno) to retrieve related records in next page.
    1) i am not able to assign tripno to each record. when i assign tripno, its taking the last value which i assigned. ie. tripno=3 only.
    How to assign URL to Reference field of LINK_TO_URL element at run time?
    OR
    2) we can do like this.
    Simply assign url to reach record without key field.
    www.abc.com/test
    www.abc.com/test
    www.abc.com/test
    when user clicks a particular link, we can assign corresponding key field to the URL.
    Where should i write this event? Bcoz, LINK_TO_URL doesnot have event.
    how to do?

    Hi MOg.
    Not sure whether I understand you .. but in the 5th column you want to have the reference URL. Is this the activities columen from you example?
    Nevertheless, you need a attribute (String) in your context node which contains the URL. Bind this to the reference filed of linktourl. If you can not extend the structure you can create a sub node (cardinality 1:1)  which contains the refernce attribute.
    Then loop over all elements and concatenate www.abc.com/test?tripno= with the tripno of the current element into the reference field.
    Hope tis helps,
    Sascha.
    Bind the

  • Dynamic Tables: TableCellEditor depending on Context node value

    Dear community,
    I'm creating a dynamic table containing all the neccessary fields to display my context node in Java code but I have one requirement that I can not resolve by myself:
    Depending on the value of a cell the TableCellEditor should be of type IWDTextView or LinkToURL. So if the context node value is e.g. the String "abc" I want to display a LinkToUrl containing a Target - such as http://www.abc.com - depending on the value, if the context node value is "def" I want to do nothing but display the value in a TextView.
    As I am creating the dynamic table in advance and binding my Context node to it later, I don't know how to change the TableCellEditor at that point of time.
    Right now I have the choice to either display all cells of the column as LinkToUrl TableCellEditor or display all cells as TextView - the dynamic table generation itself is no problem for me.
    Does anyone have an idea on how to do that? Maybe it is not possible in WDJ right now?
    regards,
    Christian

    Hi Christian
    Try this:
    IWDTable theTable=(IWDTable)view.createElement(IWDTable.class,"table");
    IWD TableColumn aColumn=(IWDTableColumn)view.createElement(IWDTableColumn.class,"col");
    if(str.equal("abc"))
    IWDTextView aField=(IWDTextView)view.createElement(IWDTextView.class,"TextView");
    aField.bindText(str);
    aColumn.setTableCellEditor(aField);
    else if(str.equal("def"))
    IWDLinkToURL aField=(IWDLinkToURL)view.createElement(IWDLinkToURL.class,"LinkToURL");
    aField.bindtarget("http://www."str".com");
    aColumn.setTableCellEditor(aField);
    theTable.addColumn(aColumn);
    Best regards,
    Sangeeta

  • Unable to display text with image in a cell of web dynpro table.

    Hello,
    I am unable to display an image with the text inside a cell of web dynpro table. The image doesn't come at all. I am trying to display the image of an object and the object description alongside within the same cell.
    Thanks and Regards,
    Abhijnan

    Hi
    Pls check the below link
    http://help.sap.com/saphelp_nw70ehp2/helpdata/en/9b/46bb0d339b42cc8d30636ca0c9f5b6/frameset.htm
    The only problem is only the below UI elements are supported
    ■Button
    ■ToggleButton
    ■LinkToUrl
    ■LinkToAction
    ■FileDownload

  • Convert table columns to hyperlinks

    hi
       can anyone  plz tell me how to convert a data in a perticular column of a table into a hyperlink
    TIA

    Hi,
    Go to the table column that you want to make as link to action/url, remove it and in right click and select insert tablecelleditor and select linktoaction ot linktourl.
    Regards
         Vinod V

  • LinkToURL

    Hi All,
    I am using the LinkToURL element to send email to a user in a Web Dynpro Application. This is working fine.
    I have now a requirement to send emails to a group of users.
    I am trying to use the LinkToURL element to send emails to multiple users, the LinkToURL is mapped to an attribute in the Context Node and my problem is that I am not able to get all the emails. I am just getting the first email in the LinkToURL.
    If I map the attribute to a table I have multiple emails there.
    Please help or let me know how I can accomplish this?
    Thanks a lot.
    Regards,
    Ridouan

    Hi Taibi,
        With link to URL UI element you will have to generate the URL Link before hand. ie at rendering time the link will have to be constructed. I believe that you are using mailto syntax for sending mail. You will have to construct the URL will all the recipients.Since LinktoURL can accept only one source, mapping the LinkToURL to an attribute will only take the first element. What you have to do is in your wdDoModify first time you can construct the mailto URL string that has all the recipients and then set it to the LinkToURL. You can search google on how to create a mailto URL with multiple recipients.
    If you don't have all the email addresses at rendering time you can use LinkToAction UI Element which will run your code when you click it. LinkToURL is a client side event, no round trip will happen.
    Hope this Helps.
    Regards,
    Sanyev

Maybe you are looking for

  • Performance impact of using Web Services?

    As BEA and other vendors continue to add Web Services support to their enterprise software, what is your plan for quantifying the performance impact and the functional correctness of using web services before going live with the final application? Em

  • How to run JSP pages in weblogic 8.1 sp2

    hi frnzs, plese give me some idea about how to run JSP pages in weblogic server.

  • Javax.mail.SendFailedException

    HI all, I have an application which reads .csv file, picks up email ids and sends e-mail to mentioned 'to' address. There are 199 diffreent email ids. I could send upto 90 emails. But, after that, i got following error ! error message: javax.mail.Sen

  • App crush on book air 13in 2011

    When I open the app YouDao Notes for 10 seconds, it's crashed. Here is the report: Time Awake Since Boot: 210 seconds Crashed Thread:        0  Dispatch queue: com.apple.main-thread Exception Type:        EXC_CRASH (SIGABRT) Exception Codes:       0x

  • Prompts me for a Safe Mode Password and the reenter

    When I add a ADDS object powershell still prompts me for a Safe Mode Password and the reenter even thought I have the code below. Where am I going wrong? $SecurePassword = ConvertTo-SecureString "E#$rty1248" -Asplaintext -Force Install-ADDSForest ` -