Skip to Content
avatar image
Former Member

Passing paramter to a URL on Table column select...

Hi,

I have created a Webdynpro that displays data from a RFC in Tableview.My requirement is to provide one of the columns as Link to a external URL and pass that column value as paramter to the URL.

I have created a LinkToURL for that column and specified the URL under reference property.

When I run the application I am able to see the column with link and when I click it I am being taken to the website also.But how do I pass the column value as paramter to the URL..?

Any help is greatly apperciated and points will be rewarded.

Thanks,

Vasu.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Best Answer
    avatar image
    Former Member
    Dec 15, 2005 at 11:11 AM

    Vasudevarao,

    After 2 (or more?) years of existence, SDN accumulate a lot of usefull information. Use "Search" functionality -this way you'll find an answers much quicker.

    Regarding your question:

    See tutorial: Dynamic Links in a Web Dynpro Table (Apr 25, 2005)

    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/8080487b-0301-0010-3f96-dcc9a3682448

    Valery Silaev

    EPAM Systems

    http://www.NetWeaverTeam.com

    Add comment
    10|10000 characters needed characters exceeded

  • Dec 15, 2005 at 07:41 AM

    Hi Vasu,

    define a calculated attribute in the value node that is bound to your table control. Bind this attribute to your LinkToURL contol.

    In the getter method of the attribute write:

    return "http://myurl?" + myparameter;

    If you are dealing with a model node (not value node) you have to add a value node of cardinality 1..1 to your model node and define the attribute there. I think this depends on the SP level you are using and therefore may not be necessary.

    Regards

    Helmut

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Dec 15, 2005 at 07:55 AM

    hi vasu

    instead of using link to url try using link to action.in eventhandler of the action of the link to action

    you may give the following code which tries to open the url in a external window.you create a context attribute of type string say myurl and set it to the respective url

    in the onaction eventhandler

    {

    String url=wdcontext.currentcontextelement.getmyurl();

    String title=wdcontext.currenttablenodeelement.get<column>();

    IWDWindow win=wdComponentAPI.getWindowManager().createexternalWindow(String url,String title ,Boolean modal);

    win.open();

    }

    the method createexternalwindow has three parameters

    a String url this can be your reference to the url.

    a string title this can be the data you want to pass

    you retrieve the column data from the respective table element

    and the third is whether you want it to be a modal window or not.

    hope this helps

    regards

    saravana.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Saravana and Helmut,

      Thanks for your quick responses but my problem has not been resolved yet.

      I declared a value attribute link and had set it in the wdInit() like wdContext.currentXXXElement().setLink("http://www.abc.com/cgi-bin/tracking?action=track⟨uage=english&cntry_code=us∈itial=x∓s=y&tno=xyz");>

      In the event handler of LinkToAction , I wrote something like this..

      String url=wdcontext.currentcontextelement.getmyurl();

      String title=wdcontext.currenttablenodeelement.get<column>();

      IWDWindow win=wdComponentAPI.getWindowManager().createexternalWindow(String url,String title ,Boolean modal);

      win.open();

      I want the the string <b>title</b> to be passed as paramter in the URL inplace of <b>xyz</b>.

      How can this be acheived??

      Thanks,

      Vasu.