This is one important step in OAF page
development. Initializing the view object and storing values in to it from the
page field. The steps are given below in the following code.
OAViewObjectImpl var1 =
(OAViewObjectImpl)am.findViewObject("XXVO");
if (!var1.isPreparedForExecution())
{
var1.executeQuery();
}
var1.last();
var1.next();
OARow Row = (OARow)var1.createRow();
var1.insertRow(Row);
Row.setNewRowState(OARow.STATUS_INITIALIZED);