I will illustrate how to insert new rows in view object programatically.
ٍSuppose that I have EmpVO view object which have below attributes
a-EmpId
b-FirstName
c-LastName
We can do inserting rows by two ways in data model layer (Application Model or ViewObject classes)
I will write my code in ApplicationModuleImpl class
I prefer using second method createAndInitRow because it sets default values of attributes in view object but first method insertRow doesn't do this.
Mahmoud Ahmed El-Sayed
ٍSuppose that I have EmpVO view object which have below attributes
a-EmpId
b-FirstName
c-LastName
We can do inserting rows by two ways in data model layer (Application Model or ViewObject classes)
I will write my code in ApplicationModuleImpl class
1-createRow() method
2-createAndInitRow() method
I prefer using second method createAndInitRow because it sets default values of attributes in view object but first method insertRow doesn't do this.
Mahmoud Ahmed El-Sayed
The line
ReplyDeleteViewObjectImpl vo=this.EmpVO();
should be
ViewObjectImpl vo=this.getEmpVO();
Sorry about this errata.
Thanks a lot
ReplyDeleteRead this post, it may guide you
ReplyDeletehttp://mahmoudoracle.blogspot.com/2011/07/summary-functions-in-adf-business.html
"Did you mean that if I do not enter any value, the default value will be set?"
ReplyDeleteThe answer is yes.
"so, I did not find any difference between the two sentences."
There is difference as first method doesn't set default values but second method set default values in view object if they haven't value
You have two view object (Master and Detail)
ReplyDeletesuppose Master view Object is Dept, Detail view Object Emp
You should add transient attribute to master view object(Dept) and in default expression of attribute write the below groovy code
Emp.count("EmpNo")
Note that EmpNo is an attribute in Detail view object(Dept)
I think this link will guide you
http://mahmoudoracle.blogspot.com/2011/07/summary-functions-in-adf-business.html
Hey, Mahmoud A. ElSayed
ReplyDeleteIn ADF:-
Can I make Dynamic Database Connection with Oracle EBS at Run Time.If we have multiple Oracle Servers.So that I can Have a Desktop Form not Web ,From which I ask from user abot Server Information,Then Create connection and rest are same.
Thank you for ssharing
ReplyDelete