on 01-10-2007 10:48 AM
Hi,
I am trying to copy values from the cutom controller context to the view controller using WDCopyService.copyElements(srcNode, destNode).
I can see the values in the custom controller in debug mode.
But some the attribute values are not present in the view controller after doing
WDCopyService.copyElements
I would need your expert advice.
Thanks
Asif
The method WDCopyService.copyElements copies only those attributes from "source" which are present in "target" and if they match (the names equal case-sensitive and the types are compatible).
Please check if your contexts nodes have the same sets of attributes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks Dimitri and Rajit,
I just recreated the attribute and it worked i guess there was some generation problem of the WD classes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Rajit,
I want to avoid doing that as i am creating new value attributes in the view and if i map it i wont be allowed to make new value attributes.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Then check the types of the attributes in view context & controller context. They must be the same for WDCopyService to work.
copyElements works only if you have both nodes bound to same structure/class (meaning same number of attributes)
copyCorresponding compares the attribute names & their types (types should be compatible) and do this in a loop for every element.
Since your node in the view has a different structure to context's node, may be u shud use copyCorresponding. As said earlier, check the attribute types.
Thanks,
Rajit
Message was edited by:
Rajit Srinivas
Hi
Do a context mapping from Controller context to View context.
Thanks,
Rajit
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
91 | |
10 | |
10 | |
9 | |
9 | |
7 | |
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.