on 01-31-2008 10:53 PM
Hello!
I don't understand the necessity of -> bind() as below
stated. Why is it needed. In which cases must it
be used and when can it be ignored?
Maybe always if you create a Nodeelement ?????
Regards
sas
IPrivateTestViewInteractivePDFForm.IAddressNodeElement element = wdContext.nodeAddressNode().createAddressNodeElement();
element.setFirstName("Will");
element.setName("Smith");
wdContext.nodeAddressNode().bind(element);
Hi,
Based on the code what you have posted
IPrivateTestViewInteractivePDFForm.IAddressNodeElement element = wdContext.nodeAddressNode().createAddressNodeElement();
element.setFirstName("Will");
element.setName("Smith");
wdContext.nodeAddressNode().bind(element);
In the above code first you are trying to create an element of the node "AddressNode", Which will be stored in a variable called "element."
But this element and the node "AddressNode" doesnt have any relation other than the structure.
Now if you want to make this element part of this node you need to add that to node "AddressNode" . To do this their are two ways
Either you can use the one currently used , or else while creating it self you can make use of the method createAndAddElement() for the node.
One thing you have to note here is when you bind your previous values will be overridden. So if you want to add multiple elements add them to an List and then bind the list.
Hope its clear to you.
Regards
Ayyapparaj.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
78 | |
9 | |
9 | |
7 | |
7 | |
6 | |
6 | |
5 | |
5 | |
5 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.