cancel
Showing results for 
Search instead for 
Did you mean: 

Node with subnoce problem

Former Member
0 Kudos

Hi,

I have a simple problem but can't seem to find the sollution.

I have a PO node with a subnode Approver. Both have attributes an PO node has initializeLeadSelection set to false, the Approver node is set to true.

I start by creating a PO node and adding it to the context:

IPrivateMainComponentView.IPOElement poEle = wdContext.nodePO().createPOElement();
wdContext.nodePO().addElement(poEle);

Then i loop through the approvers and add the approverElements to the just created poEle:

IPrivateMainComponentView.IApproverElement approversElement = wdContext.nodeApprover().createApproverElement();
approversElement.setApprover(approverName.toLowerCase());
((IPrivateMainComponentView.IPONode)aPOEle.node()).nodeApprover().addElement(approversElement);

The problem is I get the following error when adding the approverElement:


Exception(com.sap.tc.webdynpro.progmodel.context.ContextException: Node(MainComponentView.PO.Approver): cannot bind or add elements because the node has no valid parent) during processing a Web Dynpro Application.

Can anyone help me out here?

Much thanks & regards,

Hugo

Accepted Solutions (0)

Answers (1)

Answers (1)

abhimanyu_lagishetti7
Active Contributor
0 Kudos

Hi

Use supplyFunction property of the Context node Approve to fill values.

for more information http://help.sap.com/saphelp_nw04s/helpdata/en/dc/f1783fe3263042e10000000a114084/frameset.htm

Regards

Abhimanyu L

Former Member
0 Kudos

Abhimanyu,

I doesnt seem to make a difference when using bind instead of addElement

regards,

hugo

Former Member
0 Kudos

Hi Hugo,

Set the PO node initializeLeadSelection to true.It will work.

regards

Sumit