on 10-21-2010 9:53 PM
Hello Everyone,
I need your help:
1) how to get and display the value from a Model attribute (i.e. mNode1.mNode2.mAttrib1) ?
2) how to assign / bind this Model attribute value to a Value attribute (i.e. vNode1.vNode2.vAttrib1)?
both are in the same component controller (i.e. aComp).
Could you please provide me the sample code.
Thank you very much in advance.
Jin
Hi,
For
1) use the code below
if(wdContext().nodemNode2() != null)
{
wdContext().currentmNode2Element().getmAttrib1();
}
2)
Create a structure in the context of the view / controller.
vnode1
---vnode2
-
mAttrib1 (the name & type of this attribute should match with the name & type of the model node attribute)
then use the following code to assign value:
IvNode1Element v1Element = wdContext().createAndAddvNode1Element();
WDCopyService.copyElements(wdContext().nodemNode2(), wdContext().nodevNode2());
This will copy all the value of mNode2 to vNode2
Regards,
Poojith MV
Edited by: Poojith M V on Oct 22, 2010 6:49 AM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
77 | |
9 | |
9 | |
7 | |
6 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.