Saturday, 23 June 2018

Dynamic vo in oaf

Dynamic VO in oaf

 
Dynamic VO means the sql query of the View will not static. All the VO will be dynamic and will be create during run time of the OAF Page. To create Dynamic VO used in Oaf, we need to write the Code in the OAF Page controller, which helps to create the Dynamic VO for that Page and later, we can use this Dynamic VO in our OAF Page. The good part of the Dynamic VO is this, we can change the Column structure and where condition of the VO during run time of the Page. Here below I will show the Controller code needs to be written to create the Dynamic VO in the OAF page.
 
Controller code: -
String query = "SELECT A1.SUPPLIER_NAME,A2.SITE_CODE"+"FROM AP_SUPPLIERS A1, AP_SUPPLIER_SITES_ALL A2" +"WHERE A1.SUPPLIER_ID=A2.SUPPLIER_ID";
 try
 
       {
     OAApplicationModule oam = pageContext.getApplicationModule(webBean);
      OAViewObject vo = (OAViewObject)oam.findViewObject("XXSUPVO");
         vo.setFullSqlMode(vo.FULLSQL_MODE_AUGMENTATION);
         vo.setQuery(query);
         // setQuery only sets the new query to the View Object, in order to effect the changes of the query we need to execute the equery using below statement.
 vo.executeQuery();
         }
         catch (Exception e)
         {
          null;
         }     
 

2 comments:

Anonymous said...

Excellent blog I visit this blog it's really awesome. The important thing is that in this blog content written clearly and understandable. The content of information is very informative.
Oracle Fusion Financials Online Training

dharani said...

Nice informative content. Thanks for sharing such worthy information.
MVC Training in Chennai
Primavera Training in Chennai
MVC Classes in Chennai
Primavera Course in Chennai
MVC Course in Chennai
Primavera Software Training in Chennai
Best Primavera Training in Chennai

Post a Comment

Contact us for any Collaboration, Project Support & On Job Support Work

Name

Email *

Message *