on 09-01-2005 1:24 PM
Hi all,
I have dynamically created a node in a view and mapped it to some model node in the component controller (Thanks to Vijith kumar, see last thread created by me).
Also i created UI elements dynamically and binded it to the same dynamically created node in View controller.
All of this code is in wdModifyView().
Now when i access this node thru this
IWDNode node =wdContext.wdGetAPI().getRootNode().getChildNode("Activity",IWDNode.LEAD_SELECTION);
//node has the correct value "Activity" i checked thru debugging
And bind a collection of Activity objects thru this
<b>node.bind(colact);</b> // throw NullPointerException
i get the NullPointerException
i think 'node' should be instantiated first then i must call bind method.But i don't know how.
Anyone has some idea.
plz help
Rgds,
Vilish
Obviously the variable
node
is NULL when the bind-statement is exectued.
Where do you call this code? Is the new node already created at this point in time?
Instead of
wdContext.wdGetAPI().getRootNode()
you can simply use
wdContext
And again: Do you really need to create nodes, UI elements and data bindings at runtime? Can you please write a few words about your use case?
Armin
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 | |
10 | |
7 | |
6 | |
6 | |
6 | |
6 | |
6 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.