Saturday, November 21, 2009

OAF : Add New Row into OA Table :: Add Another Row

Put the below come into ProcessFormRequest
------------------------------------------------------

if(pageContext.getParameter("AddSiteRow") != null)
{
am.invokeMethod("insertEmptyRow");
}

Put the below come into xxxAMImpl.java
------------------------------------------------

public void insertEmptyRow()
{
EmployeesVOImpl empVo = getEmployeesVO1();
EmployeesVORowImpl emptyrow = (EmployeesVORowImpl)empVo.createRow();
empVo.last();
empVo.next();
empVo.insertRow(emptyrow,"ABC"); //'ABC' is HardCod value inserted based on the requirement in this example
siteVo.setCurrentRow(emptyrow);
emptyrow.setNewRowState(Row.STATUS_INITIALIZED);
}