cancel
Showing results for 
Search instead for 
Did you mean: 

Populate group of context values nodes

Former Member
0 Kudos

Hi,

I need to populate a group of similar context value nodes of a view. Node structure is as follows:

NodeA (value node)

-- child1

-- child2

-- child3

-- child4 ( child value node)

The group of nodes differ in their Parent and child value node names.

In order to populate the nodes, I am creating objects for the parent and child value nodes as follows:

<1> IPrivateMainView.INodeAElement objNodeA = wdContext.createNodeAElement();

<2> IPrivateMainView.Ichild4Element objchild4 = wdContext.createchild4Element();

Objects are created to populate the nodes dynamically.

I am looking at a way to dynamically generate statements <1> and <2> based on the nodes names.

Do let me know if this is possible, or if there is any better way this could be done.

Thanks!

Sri

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Use the generic context API (IWDNode, IWDNodeElement etc.) instead of the generated methods.

Armin

Former Member
0 Kudos

Thanks for you response. Could you please elaborate ?

For example I am trying to populate the folliwng nodes.....

Node#1

BrandCode (values node)

-- required

-- BrandCodeSet (child value node)

Node#2

Division (value node)

-- required

-- DivisionSet (child value node)

As you can see, node#1 and node#2 are of the same structure except for the parent node and child node names.

Can you please elaborate on the code to populate these nodes dynamically ?

Thanks in advance !

Sri