on 01-20-2010 7:35 AM
Hi
I have below context elements.
Root Context
-
Node Test
-
Value T1
Now there are 2 ways I can access to value attribute t1.
1.
wdContext.currentTestElement().getT1()
2.
wdContext.nodeTest().currentTestElement().getT1();
What is difference.
There is no difference, wdContext.currentXXXElement is just a shortcut and easier to use for the developer. What really happens in the background is "get the node, then the current element (the element with the active index)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks for comments,
But after working on it now as I find is :
If your elements are subject to exist n times at runtime, in that case currentcontextelement automatically gives you access to active context node. Wereas, nodexxx() gives access to the node element as a group, after which you can access to any elemt inside that node group. e.g.
wdContext.nodeTest().getElementAt(n)
Thanks
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.