on 2005 Jun 02 5:31 AM
At design time I create parent node FieldDescriptors (Singleton, cardinality - 0:n), and child nodes Test10, Test20. Bothe child nodes are singleton, and cardinality 0:n.
Get nullpointer exception when executing the following code. Please advise what is wrong with the code.
IWDNode node = wdContext.nodeFieldDescriptors().getChildNode("Test10",IWDNode.LEAD_SELECTION);
String test = node.getCurrentElement().getAttributeAsText("element1");
Thanks !
Hi srikanth,
I think you have not bound object to the node.
You have to create object of the node and bind this object to hte Node.
And one more question. What excatly you are trying to do with this coding?
Regards,
Bhavik
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
IWDNode nodeTest10 = wdContext.nodeFieldDescriptors().getChildNode("Test10",IWDNode.LEAD_SELECTION);
IWDNodeElement nodeElement = nodeTest10.createElement();
node.addElement(nodeElement);
nodeElement.setAttributeValue("element1","value");
String test = nodeTest10.getCurrentElememt().getAttributeAsText("element1");
Hope this helps.
have u created an instance of the node Test10 that u have created?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
66 | |
10 | |
10 | |
10 | |
10 | |
8 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.