on 02-22-2006 2:44 PM
Hi,
My Context attribute structure is as follows -
Context
-<b>OrderRequest</b>
-item (which has item no ,qty ...)
- OrderHeader (order header attributes)
When I try to get the Item attribute values with
<b>wdContext.currentItemElement().getItemNumber()</b> - It always returns a null value .
<b>wdContext.currentItemElement().setItemNumber("10");</b> - This does not set the value either.
How do I access the sub elements - of <b>item</b> and <b>OrderHeader</b> nodes of the current context?
- Ashwini.
Hi Ashwini,
Could you please give more info about your context structure: cardinality for nodes, singleton property for subnodes.
Best regards, Maksim Rashchynski.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
Thanks for the help..but im still not able to access it.
My context is mapped to a model and it takes the node and elements defined in it.
Im not able to access the node context attributes from my code.
my context is like this:
NodeA
|-NodeB
|-NodeC
|-Item1
|-Item2
|-Item3
The properties for Context Node A are:
Cardinality : 0...n
Collection Type: list
initialleadselection:true
selection:0..1
singleton: true
typedaccessrequired: true
The properties of Node B are:
Cardinality : 0...1
Collection Type: list
initialleadselection:true
singleton: true
selection:0..1
typedaccessrequired: true
The properties of Node C are:
Cardinality : 0...n
Collection Type: list
initialleadselection:true
singleton: true
selection:0..1
typedaccessrequired: true
So I try to use this piece of code in my implementation class:
wdContext.NodeA().NodeB().NodeC().currentNodeCElement().getItem1();
I enter a value in the field and click on 'Go' button. It should pop up a confirmation dialog box showing me the value in the Item1 field.
When I click, it reurns me the value 'null'. why?
Thanks
Ashwini
The cardinality of your node C is 0:n. I believe you have not created an element before acceesing it.
Please try to create an element under the node i.e.
IPrivate<View>.I<Node>Element ele= wdcontext.createnodeCElement();
ele.setItem1(<value>);
wdcontext.nodeC.addElement(ele);
Please check the code for syntax. I hope this should solve your problem.
Noufal
User | Count |
---|---|
93 | |
11 | |
10 | |
9 | |
9 | |
7 | |
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.