cancel
Showing results for 
Search instead for 
Did you mean: 

Cardinality of the Context Node

Former Member
0 Kudos

Hi,

I have created a Parent node with a cardinality 0..n & i have added two more child nodes to this Parent node with same cardinality 0..n & one element. Also child nodes have multiple elments also.

I have written the code in DoInit Method...of my only iview...

public void wdDoInit()

{

wdContext.currentOrderDataElement().setFirstName("Smita");

wdContext.currentDataSourceElement().setSalutationText(salutationText);

wdContext.currentOrderDataElement().setCustomerID(2121);

wdContext.currentOrderDataElement().setOrderID(5245);

IPrivateDynamicFormView.IOrderItemsElement orderItemsElement = wdContext.createOrderItemsElement();

orderItemsElement.setProductID(90);

wdContext.nodeOrderData().addElement(orderItemsElement);

}

when i try to Run it i am getting following exception..........

<b>java.lang.NullPointerException</b>

at com.sap.tut.wd.dynamicform.DynamicFormView.wdDoInit(DynamicFormView.java:98)

at com.sap.tut.wd.dynamicform.wdp.InternalDynamicFormView.wdDoInit(InternalDynamicFormView.java:152)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.doInit(DelegatingView.java:61)

at com.sap.tc.webdynpro.progmodel.controller.Controller.initController(Controller.java:215)

at com.sap.tc.webdynpro.progmodel.view.View.initController(View.java:412)

... 31 more

can anyone suggest me what should be the proposed cardinality for parent node & Child nodes............??

Thanks in advance !!

Smita.

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hey Thanks a lot Kris!!

Former Member
0 Kudos

hi Smita

If the answer was helpful then please reward some points.

thanks,

kris

Answers (1)

Answers (1)

Former Member
0 Kudos

hi Smita,

The proposed cardinality for parent node should be 1:n & for Child nodes it should be 0:1.

Thanks,

kris