on 03-10-2009 8:12 AM
Hi there,
This is my current way of doing editing of an existing order:
1. Search the order and store ALL the data into value node.
2. Transfer all the value node's values into model node. These model node are Context Bound to the UI so that one the click of "Save", all these values will be changed/saved successful.
Any comments on this way of doing? Is the transferring of all the data into value node first then transferring to model node redundant? It is abit troublesome because the node needs to contain lots of data due to the number of fields an Order has.
Thanks!
Hello Jackson
Further u can do
1. Search the order object
2. For Transfer all the value node's values into model node.
//IWDNode source and target
WDCopyService.copyElements(source, target);
3. As you said these model node are Context Bound to the UI so that one the click of "Save", all these values will be changed/saved successful.
We can achieve the same thiing with follow the standard practices that Model and Value Node both should be use for its own concern (for example model node is there for carries the data and provide the data from database ,not for binding the UI Element )
Try to implement both activity (Create and Save ) in one action with uses of the flag (CREATEMODE and EDITMODE)
and since for the cases input will be same (coming from value node) so doesn't need further retrieval of the data for create and edit , and bind these value node attributes to the UI.
Best Regards
Satish Kumar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Jackson,
Yes you are correct. Not just the names of the attribute of the nodes, but also the complete structure and the attribute datatype should be same.
Check these links for more reference:
https://help.sap.com/javadocs/NW04s/current/wd/com/sap/tc/webdynpro/progmodel/api/WDCopyService.html
Also you can use:
copyCorresponding(Object source, Object target)
Where the source and target can be node objects.
I hope this helps you!!
Thanks and Regards,
Pravesh
User | Count |
---|---|
87 | |
10 | |
10 | |
9 | |
7 | |
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.