cancel
Showing results for 
Search instead for 
Did you mean: 

Retrieving current context element

Former Member
0 Kudos

I have a table UI element bound to a context model node called Subst.

Is there any difference between the following statements:

Integer substRecno = wdContext.nodeSubst().currentSubstElement().getRecno();

Integer substRecno = wdContext.currentSubstElement().getRecno();

My application showed the wrong Subst elements using the first statement, using the second statement it worked. But when debugging now I can't see any difference. Has this anything to do with the singleton property?

And the second question is: If I have a master and a detail node, when do I need to write

wdContext.nodeMaster().nodeDetail().currentDetailElement();

and when

wdContext.nodeDetail().currentDetailElement();

Thanks in advance

Josef

Accepted Solutions (0)

Answers (4)

Answers (4)

Former Member
0 Kudos

Hi,

thanks for your answers.

Is it wrong to write the long form

wdContext.nodeMaster().nodeDetail().currentDetailElement();

in both cases (singleton or not)?

Should I get a build error if detail is non-singleton and I write

wdContext.nodeDetail().currentDetailElement();

or do I get possibly wrong data?

Regards,

Josef

Former Member
0 Kudos

Hi ,

can u give me the idea how to increase the width and increase the gap in roadsteps in roadmap with in web dynpro abap.

former_member197348
Active Contributor
0 Kudos

Hi Josef,

There is no difference between the following statements:

Integer substRecno = wdContext.nodeSubst().currentSubstElement().getRecno();

Integer substRecno = wdContext.currentSubstElement().getRecno();

I both the cases, it returns the Recno for the <b>element under lead selection</b>.

Second question,

If for the node Detail singleton is false then write

wdContext.nodeMaster().nodeDetail().currentDetailElement();

If for the node Detail singleton is true then write

wdContext.nodeDetail().currentDetailElement();

Regards,

Siva

former_member485701
Active Participant
0 Kudos

Hi ,

I am giving second questions answer:

In your MasterNode , for each masterElement there will be a DetailNode.

And this will give you Detail Node for currentMasterElement.

wdContext.nodeMaster().nodeDetail().currentDetailElement();

for a particular Detail Node, you can find current selected Element.

wdContext.nodeDetail().currentDetailElement();

Regards,

Praveen