cancel
Showing results for 
Search instead for 
Did you mean: 

Lead selection query

Former Member
0 Kudos

Hi All,

I have two tables. In the first table I have the headers.And in the second table I have the datils.

The first view has a "Get Detail" button.

So, on Lead selection of any row in the first table and on the click event of the Button, I should get the details in the second table.

I have written this code.

"onActionGetDetail"

int n = wdContext.nodeDUNNING_HEADER().size();

int leadselection = wdContext.nodeDUNNING_HEADER().getLeadSelection();

for (int i = n-1 ; i>=0 ; --i)

{

if (leadselection == i){

}

}

wdThis.wdFirePlugHeaderOut1();

I have the doubt that what is that piece of code that will fetch me the result.

And , where exactly should I write.

Is any thing to be written in the init() of the second view.

I am using two different views.

Kindly, provide me with solution ASAP.

Looking forward to you.

Regards

Dipendra

Accepted Solutions (0)

Answers (4)

Answers (4)

MG3
Contributor
0 Kudos

lets assume:

1. u have 2 nodes: HeaderNode and DetailsNode.

2. there is a primary key in the headernode called HeaderID and the same HeaderID is present in the Details node as well.

3. on click of a row in the headernode, you must display the details corresponding to that headerID in the DetailsTable.

You can try doing this:

String headerID = wdContext.nodeHeaderNode().getCurrentHeaderNodeElement().getHeaderID;

iterate through the Detials node, obtain the headerID in the DetailsNode, check if it matches the headerID. if it does, create the element of the node bound to the table and set the values.

hope it helps.

oj

Former Member
0 Kudos

Hi,

You can try this:

1. Create an action

2. Go to table property Events->OnLeadSelect. Assign that action you have created to this.

3.Write this code to get the selected lead element.

IPrivate<view name>View.I<node name> elementLead=wdContext.node<node name>().current<node name>Element();

hope this will help you.

Regards,

Rajeev Ranjan

Former Member
0 Kudos

I suggest reading Chris Whealy's book "Inside Web Dynpro for Java".

It explains the concepts of lead selection, supply functions, singleton vs. non-singleton, master-detail etc. very clearly.

Armin

former_member85655
Active Participant
0 Kudos

Goto the node of the header -> right click properties and look for "Supply Function" in the properties window. Now write your code in this newly defined supply function. This function will get invoked every time the lead selection on the header changes.

Hope that helps.

Regards,

Arun