OAF Apply Method

You might also like

Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 2

public void rollback() {

getOADBTransaction().rollback();

-------------------------
else if (pageContext.getParameter("Cancel") != null)
{
am.invokeMethod("rollback");
pageContext.forwardImmediately("OA.jsp?
page=/search/oracle/apps/PO/searchdemoPRJ/webui/searchPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
false, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);

}
}
------------------------------------------------------------

public void remove()


{ super.remove();
} // end remove()

public void apply()


{
getTransaction().commit();
}
----------------------------------------------------------
if (pageContext.getParameter("Apply") != null)
{
OAApplicationModule am = pageContext.getRootApplicationModule();
//No need for any special exception handling. You can just display the
//confirmation message because the OAF won't reach this code if the post/commit
//fails.
am.invokeMethod("apply");
OAException confirmMessage =
new OAException("ICX", "FWK_TBX_T_SUPPLIER_CREATE_CONF", null,
OAException.CONFIRMATION, null);
pageContext.putDialogMessage(confirmMessage);
}

------------------------------------------------------------

// Pressing the “Apply” button means the transaction should be validated


// and committed.
if (pageContext.getParameter(“Apply”) != null)
{
OAViewObject vo =
(OAViewObject)am.findViewObject(“InsertVO1”);
String column1 =
(String)vo.getCurrentRow().getAttribute(“Column1”);
String column2 =
(String)vo.getCurrentRow().getAttribute(“Column2”);

am.invokeMethod(“apply”);

// Create a FND Message with name “TEST_CREATE_CONFIRM”

MessageToken[] tokens = { new MessageToken(“COLUMN1”,


column1),
new MessageToken(“COLUMN2”, column2) };

OAException confirmMessage = new OAException(“FND”,


“TEST_CREATE_CONFIRM”, tokens,
OAException.CONFIRMATION, null);

pageContext.putDialogMessage(confirmMessage);
pageContext.forwardImmediately(“OA.jsp?
page=/prajkumar/oracle/apps/fnd/insertdemo/webui/InsertPG”,
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true, // retain AM
OAWebBeanConstants.ADD_BREAD_CRUMB_NO);
}

-------------------------------------------------------

public void deleteRecord(String Column1)


{ OAViewObject vo = (OAViewObject)getMatloobSearchVO1();
SearchVORowImpl row = null;
int fetchedRowCount = vo.getFetchedRowCount();
RowSetIterator deleteIter = vo.createRowSetIterator("deleteIter");
if (fetchedRowCount > 0)
{ deleteIter.setRangeStart(0);
deleteIter.setRangeSize(fetchedRowCount);
for (int i = 0; i < fetchedRowCount; i++)
{
row = (SearchVORowImpl)deleteIter.getRowAtRangeIndex(i);
row.remove();
getTransaction().commit();
break;
}
}
deleteIter.closeRowSetIterator();
} // end deleteRecord

---------------------------------

You might also like