cancel
Showing results for 
Search instead for 
Did you mean: 

wdContext .curentContextElement.get/set

Former Member
0 Kudos

Hi

In statement "wdContext.currentContextElement.get/set ", i was looking for "currentContextElement" in WD Java API (http://help.sap.com/javadocs/nwce/current/wdr/index.html) , but i didnt find.

Can anyone let me know where to get "currentContextElement" from?

Thanks....

Accepted Solutions (1)

Accepted Solutions (1)

pravesh_verma
Active Contributor
0 Kudos

Hi Harpal,

This is the API which comes as the part of the node property. For every node you will get this kind of get and set . In this particular case the node which you are accessing is wdcontext which is the context of the view controller.

So in this case : wdContext.currentContextElement, gives you the current element which is selected under context node. Please note that the Cardinality of the context node is always 1:1 therefore whenever you access this line of code (wdContext.currentContextElement) it will always gives you the only element under this node.

I hope this helps. I would say that for such kind of API you just type this and take your cursor to this API (i.e.: In this case take your cursor to currentContextElement) and then press the F3 button. You will get the JAVA doc directly opened in the NWDS itself. OR you can Press CTRL and Click on currentContextElement.

I hope this solves the issue. If you want any further information please let me know.

Thanks and Regards,

Pravesh

Former Member
0 Kudos

Thanks Paresh.It solved my problem.... Thanks.......

Former Member
0 Kudos

That's not correct. Even in a node with cardinality 1:1 the lead-selection may be NULL. Only if the selection cardinality is 1:1 too you can always assume that current<Node>Element() != NULL.

Armin

Former Member
0 Kudos

Got it. Thanks Armin.

Answers (0)