on 01-21-2009 12:27 AM
I need to instantitate the non-singleton node which has the following properties
Collection cardinallity of 0..n
and
Selection Cardinallity of 0..1
But when I try to get this node using wdContext.nodeA().nodeB()
where
nodeA is singleton
nodeB is non-singleton whose properties are given below
I always get nodeB as null . it seems nodes are initialized only if set to singleton
I need non-singleton node for using the TableRowGrouping element
If any one can please help that will be great
A non-singleton child node exists for every element of its parent node. Thus you have to specify the parent element:
INodeAElement parent = wdContext.nodeA().getNodeAElementAt(some_index);
INodeB childNode = parent.nodeB();
Armin
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi All
Thanks for the reply
the cardinality property of my (non-singleton )node is 0..n
wherever in code if I try to get the handle of my non-singleton node
INode nodeB = wdContext.nodeB()
nodeB comes as null
Edited by: Gaurav Singh on Jan 21, 2009 6:50 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please look at the below link
http://help.sap.com/saphelp_nw70/helpdata/en/c2/815540b8cdcd01e10000000a155106/content.htm
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Gaurav,
You have not mentioned nodeA properties.If it's cardinality is 1..x then no need to initialize A otherwise you must initialize A first then initialize nodeB.
Try like this:
//If cardinality of A is not 1...1
IPrivateTrstView.IAElement ele = wdContext.createAElement();
//Set if there are any attributes
ele.setXXX();
.....
wdContext.nodeA().addElement(ele);
IPrivateTrstView.IBElement ele = wdContext.createBElement();
ele.setXXX();
.....
wdContext.nodeB().addElement(ele);
The singleton property refers the relationship between the node and its parent but not between the node its child as for as I know.
Regards,
Siva
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.