日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

OAF_OAF增删改-新增的实现(案例)

發布時間:2024/4/13 编程问答 25 豆豆
生活随笔 收集整理的這篇文章主要介紹了 OAF_OAF增删改-新增的实现(案例) 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

2014-09-14 Created By BaoXinjian

一、匯總


????1.建立SearchInvoicePG對應的Create按鈕以跳轉到Create頁面

????2.?SearchInvoiceCO.java中添加如下方法

????3.?建立CreateInvoicePG,設定Button Region和Main Region

????4.?CreateInvoiceCO.java中添加如下方法

????5. 在InvoiceAM中添加如下方法

????6.?CreateInvoiceCO.java中添加如下方法

????7. 在InvoiceAM中添加如下方法

????8.?SearchInvoiceCO.java中添加如下方法

?

二、分步解析


1.建立SearchInvoicePG對應的Create按鈕以跳轉到Create頁面

????

?

2.?SearchInvoiceCO.java中添加如下方法

public void processFormRequest(OAPageContext pageContext,OAWebBean webBean) { super.processFormRequest(pageContext, webBean);/**按下創建發票Button,頁面跳轉至創建發票頁面**/if (pageContext.getParameter("Create") != null) {pageContext.setForwardURL("OA.jsp?page=/oracle/apps/bxj/ap/invoice/webui/CreateInvoicePG",null,OAWebBeanConstants.KEEP_MENU_CONTEXT,null, null, true,OAWebBeanConstants.ADD_BREAD_CRUMB_YES,OAWebBeanConstants.IGNORE_MESSAGES);}}

?

?

3.?建立CreateInvoicePG,設定Button Region和Main Region

????

?

4.?CreateInvoiceCO.java中添加如下方法

public void processRequest(OAPageContext pageContext, OAWebBean webBean) {super.processRequest(pageContext, webBean);/**初始化頁面,調用創建Row的方式**/if (!pageContext.isBackNavigationFired(false)) {TransactionUnitHelper.startTransactionUnit(pageContext, "CreateInvoiceTxn");if (!pageContext.isFormSubmission()) {OAApplicationModule am = pageContext.getApplicationModule(webBean);am.invokeMethod("AmCreateInvoice");}} else {if (!TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"CreateInvoiceTxn",true)) {OADialogPage dialogPage = new OADialogPage(NAVIGATION_ERROR);pageContext.redirectToDialogPage(dialogPage);}}OAApplicationModule am = pageContext.getApplicationModule(webBean);am.invokeMethod("AmCreateInvoice", null);}

?
?

5. 在InvoiceAM中添加如下方法

/**創建Invoice,初始化頁面創建Row以存放資料**/public void AmCreateInvoice() {OAViewObject vo = (OAViewObject)getInvoiceCreateVO1();vo.setMaxFetchSize(0);vo.executeQuery();Row row = vo.createRow();vo.insertRow(row);row.setNewRowState(Row.STATUS_INITIALIZED);}

?

?

6.?CreateInvoiceCO.java中添加如下方法

public void processFormRequest(OAPageContext pageContext,OAWebBean webBean) {super.processFormRequest(pageContext, webBean);/**按下確定Button后,調用創建Invoice的AM 方法**/OAApplicationModule am = pageContext.getApplicationModule(webBean);if (pageContext.getParameter("Apply") != null) {OAViewObject vo = (OAViewObject)am.findViewObject("CreateInvoiceVO1");am.invokeMethod("AmCreateApply", null);TransactionUnitHelper.endTransactionUnit(pageContext,"CreateInvoiceTxn");pageContext.forwardImmediately("OA.jsp?page=/oracle/apps/bxj/ap/invoice/webui/SearchInvoicePG",null,OAWebBeanConstants.KEEP_MENU_CONTEXT,null, null, true,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);} else if (pageContext.getParameter("Cancel") != null) {am.invokeMethod("AmCreateRollback", null);TransactionUnitHelper.endTransactionUnit(pageContext, "CreateInvoiceTxn");pageContext.forwardImmediately("OA.jsp?page=/oracle/apps/bxj/ap/invoice/webui/SearchInvoicePG",null,OAWebBeanConstants.KEEP_MENU_CONTEXT,null,null,true,OAWebBeanConstants.ADD_BREAD_CRUMB_NO);} }

?

?

7. 在InvoiceAM中添加如下方法

/**創建Invoice,將資料做Commit**/public void AmCreateApply() {getTransaction().commit();}

?

?

8. SearchInvoiceCO.java中添加如下方法

public void processRequest(OAPageContext pageContext, OAWebBean webBean) {super.processRequest(pageContext, webBean);/**從創建Invoice頁面跳轉至查詢Invoice頁面時,檢查Create Invoice資料是否被Commit**/OAApplicationModule am = pageContext.getApplicationModule(webBean);if (TransactionUnitHelper.isTransactionUnitInProgress(pageContext,"CreateInvoice",false)) {am.invokeMethod("AmCreateRollback");TransactionUnitHelper.endTransactionUnit(pageContext, "CreateInvoiceTxn");}}

?

Thanks and Regards

?

總結

以上是生活随笔為你收集整理的OAF_OAF增删改-新增的实现(案例)的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。