cancel
Showing results for 
Search instead for 
Did you mean: 

How to assign values to URL?

Former Member
0 Kudos

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.

<b>How to assign URL to Reference field of LINK_TO_URL element at run time?</b>

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.

<b>Where should i write this event? Bcoz, LINK_TO_URL doesnot have event.

how to do?</b>

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Mog,

You have 2 options:

1. In table node create additional attribute of type string and place here complete URL with parameter per every element:


final IWDNode node = wdContext.node<TableNodeName>();
for (int c = node.size(), i = 0; i < c; i++)
  node.get<TableNodeName>ElementAt(i).set<UrlWithParamAttr>("www.abc.com/test?tripno=" + i);

2. In table node create additional <b>calculated read-only</b> attribute of type String and place the following into generated getter method:


return "www.abc.com/test?tripno=" + element.index();

Then bind LinkToUrl to this new attribute

Valery Silaev

SaM Solutions

http://www.sam-solutions.net

Former Member
0 Kudos

Hi,

I am sorry. I want to do it in Web dynpro for ABAP.

If anyone knows, plz help me for the solution in WD4A.

Former Member
0 Kudos

Mog,

Then I suggest you to re-post your question to forum.

VS