Saturday 30 June 2018

Create row in oaf

Create row in oaf

Create row is the method in OAF to create or insert news rows in the VO of the OAF Page. If we want to insert any row in the OAF page VO , then we must need to use 'createrow' object of OAF to convert the VO of OAF page in to Insert mode so that user can insert the record in the OAF page. To use the VO in OAF page we must need to assign that VO to the Application module(AM) of the page so we need to write the code to create row for the VO under the application module.
 

Here below I am sharing the code to create row in the OAF

 
Put the following code in the Application Module
 
  public void insertRecord()
   {
     OAViewObject vo = (OAViewObject)getInsertRecordXXTESTVO();
    
     if (!vo.isPreparedForExecution())
     {
           vo.executeQuery();
     }
    
     Row row = vo.createRow();
     vo.insertRow(row);
     row.setNewRowState(Row.STATUS_INITIALIZED);
   }
 
So we want when page load in the application then automatically , page should be in the Insert mode so for this we need to put the code under the Process Request method of the controller. Under this method , we are calling the 'insertrecord' to convert the Page in the Insert mode.
 
     if (!pageContext.isFormSubmission())
       {
        OAApplicationModule am = pageContext.getApplicationModule(webBean);
        am.invokeMethod("insertRecord", null);
       }
Create row in oaf
 
 

1 comments:

Rifath said...

Splendid blog I visit this blog it's unimaginably great. Inquisitively, in this blog substance shaped without a doubt and reasonable. The substance of data is useful.
Oracle Fusion HCM Online Training
Oracle Fusion Financials Online Training

Post a Comment

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

Name

Email *

Message *