Skip to Content

Adding data to node with cardinality 0..n

Hi All,

I am working on an example that requires data to be populated to the controller context node(cardinality 0..n) with information. This controller context is used in multiple views. I collect some data in one view and some data in another view. This context node is has the following structure

|-Context

|-ToModel

|-BusinessPartner (cardinality 0..n - structure ZBUPA)

- BusinessPartnerRole

- BusinessPartnerNo

I am expecting the following result in the node:

BusinessPartnerRole BusinessPartnerNo

1 -


115

2 -


115

3 -


115

I tried using the following piece of code. It didn't work

ZBUPA partner = new ZBUPA();

partner.BusinessPartnerRole("1");

partner.setBusinessPartner("115");

IPrivatePartnerInformation.IBusinessPartnerElement newPartnerNodeElement;

newPartnerNodeElement = wdContext.createIBusinessPartnerElement(partner);

wdContext.nodeToModel().nodeIBusinessPartner().addElement(newPartnerNodeElement);

Any guidance will be greatly appreciated.

Thanks and regards,

Hemanth

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 03:06 AM

    Hi Hemanth

    Try this

    IPrivatePartnerInformation.IBusinessPartnerElement newPartnerNodeElement; 
    newPartnerNodeElement = wdContext.createIBusinessPartnerElement();
    newPartnerNodeElement.setBusinessPartnerRole("1");
    newPartnerNodeElement.setBusinessPartner("115");
    
    wdContext.nodeToModel().nodeIBusinessPartner().addElement(newPartnerNodeElement);

    Regards

    Pran

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2005 at 10:22 AM

    It seems (according your code) that

    1. BusinessPartner is child node of ToModel node

    2. BusinessPartner is singleton node

    Probably you have to make BusinessPartner node non-singleton?

    VS

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.