on 02-25-2008 10:00 AM
hai all,
I need to map the context attribute which was created dynamically to another view inorder to get the selected values of checkboxes.how this can be done.
Thanks n Regards
Sharanya.R
Hi,
Use the following code
wdContext.node<YourNode>().getNodeInfo().addMappedAttribute(name, mappedName);
Examples from the doc
mappedNode.addMappedAttribute("mapped1", "value1")
This assumes that mappedNode</code> is a mapped node with an origin
node that has an attribute named "value1". It creates a attribute named
"mapped1" taking its value of the attribute "value1" of the origin
element.
node.addMappedAttribute("mapped2", ".CustomContext.Some.Node.value2
This adds a mapped attribute named "mapped2" to <code>node</code>. The
attribute maps to another attribute in the context named "CustomContext"
of the current component. Its path within the component is "Some.Node.value2".
Note that <code>mappedName</code> starts with a dot. This is because the
first entry in the path is the name of an embedded component. Here the
name is empty meaning the context is in the same component.
<li><code>IWDNodeInfo node = parent.createMappedNode("MappedNode" ... ".Context.Another.Node",...)<br>
node.addMappedAttribute("mapped3", ".Context.Another.Node.Child.value3")</code>
In this case the node is mapped and the attribute is mapped, but not to
an attribute of the node itself. The mapping target of the attribute
actually is in a child node of the node's mapping target.
Now, if you have an element of <code>MappedNode</code> and read its
attribute <code>mapped3</code>, the contexts starts at the data node of
<code>MappedNode</code> and descends to the child <code>Child</code>,
takes its element at the lead selection and reads the attribute
<code>value3</code>.
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 |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.