on 11-21-2008 5:34 AM
Hi,
I have a value node in my controller context which also has sub nodes inside it.
There is also a model node in controller context which has all the sub nodes and attributes same as the value node.
The cardinality of both the nodes as well of the sub nodes is same as well as the name of attributes also same.I want to bind the data present in the value node to the model node.
I tried to used the coding :
wdContext.node<model node name>.bind(wdContext.node<valuenode name>.getModelCollection());
But while running the appliation I am getting the error:
Cannot fill a ModelNode automatically. Change the cardinality or use a supply function
Can somebody help me with it.
Model node attributes cannot be directly mapped with value nodes. First we have to create the instance of model object and bind them to context.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
I am not sure about the mapping data with modelnode. But you can use supply function to bind the data
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Is the cardinality 1..n ?
Regards,
Anagha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
My model node cardinality is 1-n and its child node cardinality is 0-1. Can I change this cardinality directly from the property tab. Wont it affect the model structure. Can I make the singleton property false of the model node.
And I have about 50 Attributes in total in each node and there are two to three sub nodes. Cant I use the bind() method to bind node directly instead of checking the node size and using for loop and binding each single attribute.
Regards,
Ardhendu.
Hi Ardhendu Sarkar ,
Dont change any cardinality of model node.
Just create the Value node same as like Model node. [value attributes names should be same as model attributes names, same cardinality, same singleton property].
Don't map anything between model node and value node.
In the init() or any action, use WDCopyService to copy from the parent node from Model to Value node. After that, use WDCopyService to copy the child nodes.
Map the value nodes, to the required UI element.
Regards,
VJR.
User | Count |
---|---|
85 | |
10 | |
10 | |
10 | |
7 | |
6 | |
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.