on 2005 Nov 19 6:06 PM
Hello,
When creating a WD app using Adaptive RFC Model (or any model I assume), it is necessary to create a data link between the Model and Component Controller. Visually, the fields of the nodes of the Model and the fields of the model nodes of the Controller are linked. Why, then, is it necessary to again bind the model node of the Controller to the model object using the ".bind" method?
Code as shown here is a classic example:
Bapi_Usr01Dohr_Getemployee_Input bapiInput = new Bapi_Usr01Dohr_Getemployee_Input();
wdContext.nodeBapi_Usr01Dohr_Getemployee_Input().bind(bapiInput);
bapiInput.setId("MY_USERID");
try {
bapiInput.execute();
} catch (Exception exc) {
IWDMessageManager msgManager = wdComponentAPI.getMessageManager();
msgManager.raiseException(exc.getMessage(), true);
}
Clearly the visual binding in the diagram view of the component controller and the programmatic binding using the .bind method of the model node are doing different things. My question is, what is the difference? Why are both required?
Request clarification before answering.
Michael,
There are actually 3 activity types, and sadly one of them has not the best name:
1. Map at run-time / design-time model to context node (make metadata structure, that mimics model structure, possibly with renaming of target attributes / sub-nodes)
2. Map at run-time / design-time (or as you say "link") 2 nodes in different controllers (make metadata structure, that mimics structure of node's metadata in another controller, possibly with renaming of target attributes / sub-nodes)
3. "Bind" at run-time-only data to node, that was previously described as metadata either using IDE at design-time or at run-time.
So, there is no repetition: you create metadata once (ok, more logically "once" then physically), then you may assign different data to resulted node via bind several times.
Valery Silaev
EPAM Systems
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Michael,
As per my understanding
Model Binding between Model and Controller defines the data flow between the Web Dynpro model and the processing Web Dynpro application.
What we do in the code you wrote is to create the instance of the Model Class and attach this instance to the Node so that we can use the same.
Hope this helps.
Regards,
Shubham
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
73 | |
30 | |
8 | |
8 | |
7 | |
6 | |
6 | |
4 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.