Create Data Entry Page in OAF
Create Data Entry Page in OAF
--===================================================================
CreateEntryPage
--==============================================================
CREATE TABLE XX_INSERT_DATA_TL
( -- ---------------------
-- Data Columns
-- ---------------------
EMP_NO VARCHAR2(100),
FIRST_NAME VARCHAR2(100),
LAST_NAME VARCHAR2(100),
GRADE VARCHAR2(100),
MGR 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
)
select * from XX_INSERT_DATA_TL
--================================================================
Cancel:-
/oracle/apps/fnd/attributesets/Buttons/Cancel
Apply:-
/oracle/apps/fnd/attributesets/Buttons/Apply
--========================= CO Code =============================
import oracle.apps.fnd.framework.OAApplicationModule;
if (!pageContext.isFormSubmission())
{
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createNewRecord", null);
}
--========================= AM Code =============================
import oracle.jbo.Row;
import oracle.apps.fnd.framework.OAViewObject;
public void createNewRecord()
{
OAViewObject vo = (OAViewObject)getCreateFirstEntryPage_EOVO1
();
if (!vo.isPreparedForExecution())
{
vo.executeQuery();
}
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}
--========================= CO Code =============================
import oracle.jbo.domain.Number;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Apply") != null)
{
OAViewObject vo = (OAViewObject)am.findViewObject("CreateFirstEntryPage_EOVO1");
am.invokeMethod("SUBMIT_FOR_COMMIT");
pageContext.putDialogMessage(new OAException("!!!! Data Saved Successful ",OAException.WARNING));
}
--========================= AM Code =============================
import oracle.jbo.Transaction;
public void SUBMIT_FOR_COMMIT()
{
getTransaction().commit();
}
--===================================================================
CreateEntryPage
--==============================================================
CREATE TABLE XX_INSERT_DATA_TL
( -- ---------------------
-- Data Columns
-- ---------------------
EMP_NO VARCHAR2(100),
FIRST_NAME VARCHAR2(100),
LAST_NAME VARCHAR2(100),
GRADE VARCHAR2(100),
MGR 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
)
select * from XX_INSERT_DATA_TL
--================================================================
Cancel:-
/oracle/apps/fnd/attributesets/Buttons/Cancel
Apply:-
/oracle/apps/fnd/attributesets/Buttons/Apply
--========================= CO Code =============================
import oracle.apps.fnd.framework.OAApplicationModule;
if (!pageContext.isFormSubmission())
{
OAApplicationModule am = pageContext.getApplicationModule(webBean);
am.invokeMethod("createNewRecord", null);
}
--========================= AM Code =============================
import oracle.jbo.Row;
import oracle.apps.fnd.framework.OAViewObject;
public void createNewRecord()
{
OAViewObject vo = (OAViewObject)getCreateFirstEntryPage_EOVO1
();
if (!vo.isPreparedForExecution())
{
vo.executeQuery();
}
Row row = vo.createRow();
vo.insertRow(row);
row.setNewRowState(Row.STATUS_INITIALIZED);
}
--========================= CO Code =============================
import oracle.jbo.domain.Number;
import oracle.apps.fnd.common.MessageToken;
import oracle.apps.fnd.framework.OAException;
import oracle.apps.fnd.framework.OAViewObject;
import oracle.apps.fnd.framework.webui.OAWebBeanConstants;
OAApplicationModule am = pageContext.getApplicationModule(webBean);
if (pageContext.getParameter("Apply") != null)
{
OAViewObject vo = (OAViewObject)am.findViewObject("CreateFirstEntryPage_EOVO1");
am.invokeMethod("SUBMIT_FOR_COMMIT");
pageContext.putDialogMessage(new OAException("!!!! Data Saved Successful ",OAException.WARNING));
}
--========================= AM Code =============================
import oracle.jbo.Transaction;
public void SUBMIT_FOR_COMMIT()
{
getTransaction().commit();
}
Dear Sir,
ReplyDeleteIs the code which you used in your YouTube video tutorial ? Please answer. I am waiting for kind respose