Thursday, December 14, 2017

Comparison of Files Created For HelloWorld Application in OAF and ADF

In this post, i would like to provide very basic level of files comparison between OAF and ADF

HelloWorld - OAF Application Requires the following :

Below are the bare minimum files, which are required to create HelloWorld Page in OAF.

Workspace - .jws file
Project  - .jpr file
Application Module : AM.xml , AMImpl.java
UI Page - HelloWorldPG.xml

Below are the files, which are required to create HelloWorld Page in ADF
Workspace - .jws file
Project- ViewController.jpr , Model.jpr
UI Page - HelloWorldPG.jspx
Config Files : adf-config.xml, weblogic-application.xml, adfc-config.xml, faces-config.xml, trinidad-config.xml, web.xml


Few Observations in this HelloWorld ADF Sample :

  • AM is not required to run HelloWorld PG in ADF
  • 2 Projects are created by Default in ADF
  • ADF runs on Embedded Weblogic Server(While Running from Desktop)
  • No DB connection is required






OAF - Code Snippet to get list of AM's Loaded in the page

             OAApplicationModule parentAM = pageContext.getRootApplicationModule() ;
             String[] nestedAMNames = parentAM.getApplicationModuleNames();
           
             // If you want to retrieve all currently loaded nested Application Modules
             ApplicationModule[] nestedAMs = new ApplicationModule[nestedAMNames.length];

             // oracle.apps.ar.hz.components.account.customer.server.HzPuiCustActAMImpl hzCustAccountAM = null;
             oracle.apps.ar.hz.components.account.contact.server.HzPuiActContRoleAMImpl  HzPuiActContRoleAM  = null;
             for (int i = 0; i < nestedAMNames.length && temp==0; i++)
             {
             nestedAMs[i] = parentAM.findApplicationModule(nestedAMNames[i]);
                 pageContext.writeDiagnostics(this,"nestedAMs["+i+"]" + nestedAMs[i],OAFwkConstants.STATEMENT);
              if(nestedAMs[i] instanceof HzPuiActContRoleAMImpl)
               {
                   temp = 1;
                   HzPuiActContRoleAM = (HzPuiActContRoleAMImpl)nestedAMs[i];
                   pageContext.writeDiagnostics(this,"Matching AM Found ; nestedAMs["+i+"]" + nestedAMs[i],OAFwkConstants.STATEMENT);
               }
             }

Wednesday, December 06, 2017

Oracle SCM - Lookups

mtl_txn_request_lines  -Line Status Lookup


select lookup_code, meaning
from mfg_lookups 
where lookup_type = 'MTL_TXN_REQUEST_STATUS' 

order by lookup_code