Skip to Content
author's profile photo Former Member
Former Member

WebDynpro Context

Hello,

I need some clarifications regarding the contexts in webdynpro developer Studio.

The method documentation says

/**

  • Root node of this controller's context. </p>

*

  • Provides typed access not only to the elements of the root node

  • but also to all nodes in the context (methods nodeXYZ()),

  • to their currently selected element (methods currentXYZElement())

  • and facilitates the creation of new elements for all nodes

  • (methods createXYZElement()). </p>

*

  • @see com.sap.suresh.test.wdp.IPrivateUser.IContextNode for more details.

*/

If I have a node called Orders....then

what is the difference between nodeOrders( ) and

currentOrdersElement( ) and

createOrdersElement( ).

I am really confused. Could anybody explain to me please.....

Thanks,

Suresh

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • author's profile photo Former Member
    Former Member
    Posted on Oct 23, 2003 at 05:11 PM

    Hi Folks,

    I figured this out while playing in the NetWeaver Developer Studio. This concept is simple.

    1. Assume Orders in my previous posting is the Internal Table returned by the Function Module(using Java Proxy).

    2. We have to create Context Model node refering to the the class for the Orders table generated by the proxy in the Controller Context.

    3. If you want to refer to the node in the context then address using nodeOrders().

    4. Since the Internal table could have many records in it, each record is considered as an element(instance) for the Orders , the current instance is addressed with currentOrdersElement( ). then use getter and setter methods to get the value or set the value for the attribute for that instance which will affect the corresponding field of the record in the internal table. The records can be selected using leadSelect method.

    5. If new data record need to added then create an instance of Orders and fill the values in the attributes, then use createOrdersElement( ) and supply the orders instance just created .

    Hope this helps......if any questions I will be happy to help.

    Suresh

    Add a comment
    10|10000 characters needed characters exceeded

    • Hallo Suresh,

      you got the picture. In this context I want to point out the existance of a Web Dynpro Tutorial called 'Application of Context Programming and Data Binding' (Master-Detail-Viewer for Customers and Orders). You can have a look at this tutorial by opening the SAP NetWeaver Help (node SAP Web AS for Web Applications - Development Manual - Developing Web Applications - Web Dynpro - Tutorials for Web Dynpro Applications - Application of Context Programming and Data Binding).

      There you can find detailed informations (illustrated by charts) about how to understand the concepts of controller contexts (declaration at designtime, context at runtime), terminology (value nodes, node collection, cardinality, node elements, lead selection, supply functions) or the related context-API for programmatically filling contexts with data etc. The tutorial is based on value nodes, not model nodes.

      Best wishes,

      Bertram Ganz, Web Dynpro team

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.