Thursday, October 15, 2015

How to solve issues Developer Mode Error: Stale Data Error

In PR method i wrote this :

-----------

OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("initializeInsertDetails"); 
-------------



in AM 

----


public void initializeInsertDetails(){

OAViewObject insertVO = getInsertDeviceDetailsEOView1();

if (!insertVO.isPreparedForExecution()) 
{ 
insertVO.executeQuery(); 
} 

//Create a blank Row
Row row = insertVO.createRow();
//insertVO.createRow();
//Attach that blank row to the VO. Data will be fed into this row, when the user types into the fields
insertVO.insertRow(row);
//Set the status of the blank row to initialized. This tells OA Framework that record is blank and must not be included in DML 
//Operations until changes are made to its underlying VO [via screen fields]
row.setNewRowState(Row.STATUS_INITIALIZED);



}// end initializeInsertDetails ()

No comments:

Post a Comment