In my oaf project I am having one textInput for EmpNo, according to given EmpNo it will fetch the data from the DB table and it displaying the particular EmpNo's details, for that I had created VO on emp and in page one table region, in that table region for fields like Empno,Ename,Sal I had set properties in property inspector. And xxSearch() method in AMImpl.java, in that Search() I am having code like....
After executing the xxSearch method the data is populating into my page.
Now, my doubt is after processing the vo.executeQuery() how the data will sit into that particular fields from the ViewObject's cache.
Thanks in advance
Edited by: 997952 on May 23, 2013 11:05 PM
Hey hi there ,
My Understanding ,
Every attribute in the table region is associated with the view instance and vo attribute, when the vo.executeQuery( )
is issued by framework it holds the data in midtier then pass to getter and setter method in VORowImpl.java , since every field is mapped
with VO attribute in table region , based on the attribute the value is fetched and gets displayed on the screen .
When you perform executeQuery(), VO cache gets populated with that result set. As your fields on the page are mapped to VO attributes, you will see the results.
And in case when your VO is based on EO and you are submitting the form, the values from the screen fields are transferred to the VO cache. As VO is based on EO, changes are further transferred into the EO cache. Later when you issue a commit in PFR method, the data changes are transferred from the cache to the database table.
Hi there ,
'Bind variable Accessors' are generated implicitly by framework , when you create a java file (voImpl.java / VORowImpl.java ) it only allows you you to over ride
them in vo row class .
You can varify , right click on view object - > edit - > select java tab - >there you can see Bind variable Accessors for both VOImpl and VORowImpl
read the instruction give on the top of the window .
More over only with View objects we can set the values to our beans in UI part to display in screen ,this is taken care to enforce the MVC design pattern .
If the beans are not associated to any view object / view attribute ( a plain message text input) then it can not be handle through setter and getter methods .