cancel
Showing results for 
Search instead for 
Did you mean: 

Context nodes

gill367
Active Contributor
0 Kudos

Could anybody please explain me the difference between Singleton and Non-Singleton Context nodes.

Accepted Solutions (1)

Accepted Solutions (1)

piyush_kumar6
Active Contributor
0 Kudos

Hi sarbjeet ,

In general, dependent nodes are represented by a single node instance, whose content u2013 that is, its data collection - changes each time the lead selection of the parent node changes. This is known as a singleton node. The representation of a single node instance reduces the required resources considerably. This improves the performance of the application significantly. However, the use of singleton nodes also results in programming restrictions. This means that the user can only access data of child nodes whose parent nodes have the lead selection. Consequently, you cannot read - for example - the address fields of a business partner X if the business partner Y is selected. Each modification of the parent node lead selection causes a data modification of the singleton child node.

Therefore, Web Dynpro allows you to define additional non-singleton nodes. Each non-singleton node has one node instance for each node element of the parent collection at runtime. The advantage is that each instance can be accessed directly. When using non-singleton nodes, the nodes are only created when the node values are retrieved. This can save resources that otherwise would slow down the performance of the application.

Note that singleton nodes should only be considered singleton in relation to their parent nodes but not in relation to the context. Each instance of a non-singleton parent node has exactly one instance of the singleton node.

Regards,

Piyush

Answers (1)

Answers (1)

Former Member