on 12-09-2009 3:01 PM
I have a view containing an input form. This view has two buttons:
1. "Verify": it calls an RFC which verifies the consistency of the input data.
2. "Create": it calls an RFC which insert the input data in the db.
By importing the two RFC, I got two different Model Objects.
Consequently, in the component controller context I created two
different Model Bound Nodes.
Here is the problem: I have ONE view with its context which should be mapped
to TWO different Model Bound Nodes.
Do you have any suggestion on how to solve this?
Thanks in advance and best regards.
Hi Livio,
Directly using the model node for binding to UI element is always not recommended.
What you can do is copy all the context nodes and attributes which need to be passed to the model structure or used from the model structure from the view to the component controller and map them. Create two model nodes for two seperate models in this component controller and bind them to the model and execute them in the component controller itself. This way you can use all the values on the screen(view via component controller) and pass them on to the model. Same can be done when model is executed. if the model retrns some structure or value, you can always set that to the context of the component controller and hence the view via mapping.
Regards,
Tushar Sinha
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Friend,
Exactly that has to be done manually (Passing The Data to model node). Or if you can manage to create the local node from where you have to pass the data to model node with exactly same structure as model node you can use wdCopyService.
To Use wdCopyService() You can Take reference of this thread
Regards
Jeetendra
Yes my Friend,
Since the Context Value Node structure and Model Node Structure are independent, you manually using
String str = wdContext.current<ValueNode>Element().get<Attr1>();
<Bapi's Input Structure>.set<BapiAttr>(str);
wdContext.node<ModelNode>.bind(<Bapi's Input Structure>);
Regards,
Tushar Sinha
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.