cancel
Showing results for 
Search instead for 
Did you mean: 

How can I create an element in the model node?

Former Member
0 Kudos

Hi, Experts,

I create a model node that name is containerNode in the contxt. Cadinility is: 1..n

I write the code in the method:

private String getDataForOutputTable( IWDNode wageTypePayslip, IWDNode containerNode ){

String betrgSumStr = "";

int index = 0;

Vector containerVector = new Vector();

int size = wageTypePayslip.size();

IWDNodeElement element = containerNode.createElement();// The system report error when I run the application.

BigDecimal betrgSum = new BigDecimal( 0 );

...

I try to create a element in the containerNode, But the system report error when I run the application.

java.lang.IllegalArgumentException: model object must not be null

at com.sap.tc.webdynpro.progmodel.context.ModelNodeElement.<init>(ModelNodeElement.java:66)

at besuretech.com.wdp.IPrivatePayDataDispView$IOContainerElement.<init>(IPrivatePayDataDispView.java:1537)

at besuretech.com.wdp.IPrivatePayDataDispView$IContextNode.doCreateElement(IPrivatePayDataDispView.java:88)

at com.sap.tc.webdynpro.progmodel.context.NodeInfo.createElement(NodeInfo.java:884)

at com.sap.tc.webdynpro.progmodel.context.Node.createElementInternal(Node.java:1351)

at com.sap.tc.webdynpro.progmodel.context.Node.createElement(Node.java:1370)

at besuretech.com.PayDataDispView.getDataForOutputTable(PayDataDispView.java:251)

at besuretech.com.PayDataDispView.getAllData(PayDataDispView.java:196)

at besuretech.com.PayDataDispView.onPlugPayListViewIn(PayDataDispView.java:154)

at besuretech.com.wdp.InternalPayDataDispView.wdInvokeEventHandler(InternalPayDataDispView.java:391)

at com.sap.tc.webdynpro.progmodel.generation.DelegatingView.invokeEventHandler(DelegatingView.java:87)

at com.sap.tc.webdynpro.clientserver.cal.ClientApplication.navigate(ClientApplication.java:826)

at com.sap.tc.webdynpro.clientserver.cal.ClientComponent.navigate(ClientComponent.java:881)

at com.sap.tc.webdynpro.clientserver.window.WindowPhaseModel.doNavigation(WindowPhaseModel.java:498)

........

How can I create an element in the model node ?

Best regards,

tao

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

You need to execute the model before creating the element.

Regards

Ayyapparaj

Answers (0)