- Follow the post "How to create an Oracle ADF Fusion Web Application?", to create an application, change the application name and suffix.
- Now start creating view object.
Right click on the model project and select the view
object from gallery.
- Now give the name of view object, Lets say "CustomSqlViewObject" and select the Data source as Custom SQL Query. Click next.
- Now here write the select sql query or use query builder option to write query to fetch the data from db. and click next.
- Now specify the bind variable for where clause in above query.
Here we are not using any bind variable and click next.
- Following db employee table column is mapped to view object attribute. Click next.
- Here we will create new attribute or delete any attribute from view object, and click next.
- Now for each attribute specify the constraints.
Query Column section shows the db employee table column
name which is mapped to this view object attribute.
click next.
- Now following option shown to create java class:-
View Object
Class :-
this class is used to work programmatically with view object, this class
overrides the method of ViewObjectImpl class, that works to perform result on
view object.
View Row
Class :-
This class is used when work with only one row, it implements the ViewRowImpl class.
Service Data Objects :- If want to use view object as a
service, then create this class.
Here we are not doing any customization so unselect all
checkbox.
and click next.
- If want to work with this view object on view layer then create view object instance on Application module impl xml file.
click next.
- Following structure of view object, and click finish.
0 comments:
Post a Comment