Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

WD Tut18: when to bind and when to addElement() ???

Hi All,

I am trying <b>Context Programming and Data Binding (18) tutorial</b>.

I am slight confused.. when to bind() and when to addElement()'s:

page 22>>

newCustomerNodeElement.nodeAddress().bind(newAddressNodeElement);

page 26>>

node.addElement(newOrderNodeElement);

page23 explanation >>

Note that, if you call the method bind (newCustomerNodeElement) instead of addElement(newCustomerNodeElement), only the last bound node element of the type Customer is contained in the list of node elements. That is, wdContext.nodeCustomers().bind(newCustomerNodeElement) overwrites the list of node elements of the type Customer.

Is it that .. when the cardinality is 0..1 (or) 1..1>> we have to <b>bind</b> elements and when cardinality 0..n (or) 1..n >> we have to <b>addElement();</b> ??

Also i didn't get the exact advantage of a supplyFunction.

Can any1 help me out ?? explain me .. more detailedly ???

Thank u very much in advance,

kanth.

Former Member
Not what you were looking for? View more on this topic or Ask a question