1. 程式人生 > >OAF 供應商門戶添加功能標簽後獲取當前供應商VendorId的方法

OAF 供應商門戶添加功能標簽後獲取當前供應商VendorId的方法

管理 method cin ppi ray 方法 user number text

一種是參考管理頁面

/oracle/apps/pos/supplier/webui/SuppDtPG

在目標頁面的AM中添加VO實例,oracle.apps.pos.supplier.server.SuppDtVO

參考SuppAM中的實現方法,實現以下方法

    String str1 = Integer.toString(paramOAPageContext.getUserId());
    Serializable[] arrayOfSerializable1 = { str1 };
    String str2 = (String)localOAApplicationModule.invokeMethod("getPartyIdStr", arrayOfSerializable1);
    String str3 
= (String)localOAApplicationModule.invokeMethod("getVendorIdStr", arrayOfSerializable1); String str4 = (String)localOAApplicationModule.invokeMethod("getMappingIdStr", arrayOfSerializable1); String str5 = (String)localOAApplicationModule.invokeMethod("getSupplierName", arrayOfSerializable1); String str6
= (String)localOAApplicationModule.invokeMethod("getSupplierNumber", arrayOfSerializable1); SupplierUtil.setSupplierUser(paramOAPageContext, true); if (str2 != null) { paramOAPageContext.putSessionValue("PosSuppPartyId", str2); } if (str3 != null) { paramOAPageContext.putSessionValue(
"PosSuppVendorId", str3); } if (str4 != null) { paramOAPageContext.putSessionValue("PosSuppMappingId", str4); } if (str5 != null) paramOAPageContext.putSessionValue("PosSupplierName", str5); if (str6 != null) { paramOAPageContext.putSessionValue("PosSupplierNumber", str6); }

另一種方便的方式是在目標頁面的AM中添加oracle.apps.pon.util.server.UserInfoVO並命名為UserInfoVO。

然後在CO裏面即可直接調用

import oracle.apps.pon.util.webui.SourcingUtil;
int VendorId = SourcingUtil.getVendorId(pageContext, webBean);

還可以獲取供應商的其他參數,具體請查看

oracle.apps.pon.util.webui.SourcingUtil方法。

OAF 供應商門戶添加功能標簽後獲取當前供應商VendorId的方法