cancel
Showing results for 
Search instead for 
Did you mean: 

Element Vs Instance

Former Member
0 Kudos

Hi

can anyone explain about the difference between element and instance with respect to both singelton and non-singelton node.

also plz tell me how 2 create instances of non-singelton node.

thanks.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

Singleton gives the relationship between a Parent Node and Child Node.

( assume parent node is singleton and child node is non-singleton)

Node is abstraction of elements. ( like table contains many rows ). In case of

Non-singleton( child node), each node is associated with one parent node element.

If you have 10 parent node elements then 10 child nodes(instances, not elements).

In case of Non-Singleton node creation you have to attach the child node to Parent Node element.

Thanks

Sreeni

Former Member
0 Kudos

Hi Sreeni

Thanks for ur reply.

so can we say that in singelton node there is one instance and all the elements are in that instance whereas in non-singelton(child node) each element is in seperate instance. so if there are 10 elements of singelton(parent node) , it means all the 10 elements will be in single instance. now if we create non-singelton (child node) of this node then 10 instances will be created corresponding to 10 elements in parent node with each instance holding an element of non-singelton (child node).

plz correct me if i m wrong.

points awarded.

Answers (2)

Answers (2)

Former Member
0 Kudos

Yes, you are right.

Because of that performance issue with Non-singleton. Its recommended do not go for non-singleton ( if you have the requirement you can go for that).

Singleton:

While showing parent and child tables in a Form, you have to code in such a way that for selected parent row you need to populate corresponding child rows.

This coding you can do in SupplyFunction of child node.Whenever parent row selection changes automatically child rows will change.

This is becuase all child rows store in one Node.

Non-Singleton:

SupplyFunctions are not needed. But I am not sure how exactly handle the child data based on parent row selection changes.

Thanks,

Sreeni

Former Member
0 Kudos

Hi Krishan,

Assuming that by instance over here you mean the instance of the node.

Look at the cardinality property of the node which is defines the relation between

IWDNode and IWDNodeElement class.

In the case of a non-singleton node multiple instances of the IWDNode which can exist at runtime.You can simply instanciate 2 instances of the non singleton node

in relation to the nodeElement.

This functionality is very useful in implementing the tree structures and mastercolumn where you need multiple instances of the node itself also look at the recursive node in Netweaver Documentation for more details on the same.

Regards

Amit