4. Create Test Table in which we will insert data (For Testing Purpose)
CREATE TABLE xx_insert_demo
( -- ---------------------
-- Data Columns
-- ---------------------
column1 VARCHAR2(100),
column2 VARCHAR2(100),
-- ---------------------
-- Who Columns
-- ---------------------
last_update_date DATE NOT NULL,
last_updated_by NUMBER NOT NULL,
creation_date DATE NOT NULL,
created_by NUMBER NOT NULL,
last_update_login NUMBER
);
Note – By default ROWID will be the primary key if we will not make any column to be
primary key.
Check the Accessors, Create Method, Validation Method and Remove Method
9. Select the InsertPG and go to the strcuture pane where a default region has been created
if (!vo.isPreparedForExecution())
{
vo.executeQuery();
}
if (!pageContext.isFormSubmission())
{
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createRecord", null);
}
}
17. Add below method in InsertAMImpl Class to handle Apply Button action
import oracle.jbo.Transaction;
...
{super.processFormRequest(pageContext, webBean);
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Apply") != null)
{
OAViewObject vo = (OAViewObject)am.findViewObject("InsertVO1");
am.invokeMethod("apply");
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);