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.
ٍ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.
No comments:
Post a Comment