Reusable Code For OAF
Reusable Code For OAF
processRequist
//Capturing the item in the page.
OAMessageTextInputBean name
=(OAMessageTextInputBean)webBean.findChildRecursive("FullName");
�
To get the value of a field write the following code
OAMessageTextInputBean msc =
(OAMessageTextInputBean)webBean.findChildRecursive("EmployeeName");
msc = msc.getValue(pageContext).toString();
OAMessageTextInputBean manager
= (OAMessageTextInputBean)webBean.findChildRecursive("ManagerId");
manager.setRendered(false);
if(pageContext.getParameter("Clear")!=null)
OAMessageTextInputBean mstb
= (OAMessageTextInputBean)webBean.findChildRecursive("item1");
mstb.setValue(pageContext,null);
OAMessageTextInputBean mstb1
=(OAMessageTextInputBean)webBean.findChildRecursive("item2");
mstb1.setValue(pageContext,null);
pageContext.forwardImmediatelyToCurrentPage(null,false,null);
� For message choice item to display LOV set the following in item property
DATA--->
BC4J--->
if(pageContext.getParameter("item8")!=null)
pageContext.setForwardURL("OA.jsp?
page=/ascon/oracle/apps/po/MyprojectPRJ/webui/Emplo yeedetailsPG",
null,
OAWebBeanConstants.KEEP_MENU_CONTEXT,
null,
null,
true,
OAWebBeanConstants.ADD_BREAD_CRUMB_YES,
OAWebBeanConstants.IGNORE_MESSAGES);
//form:APPLICATION_SHORT_NAME:RESPONSIBILITY_KEY:DATA_GROUP_NAME
//:FORM_FUNCTION_NAME
String destination =
"form:SYSADMIN:SYSTEM_ADMINISTRATOR:STANDARD:FND_FNDSCAUS";
pageContext.forwardImmediatelyToForm(destination);
� For single select in radio button write the following code in processRequest of
the controller
OAMessageRadioButtonBean var1
= (OAMessageRadioButtonBean)webBean.findChildRecursive("Male");
var1.setValue("Male");
OAMessageRadioButtonBean var2
= (OAMessageRadioButtonBean)webBean.findChildRecursive("Female");
var2.setName("Gender");
var2.setValue("Female");
�While registering our project to the server we have to import the files (xml
import)
C:\dev\oaf\r1211\jdevbin\oaext\bin
import
C:\dev\oaf\r1211\jdevhome\jdev\myprojects\ascon\oracle\apps\po\MasterDetailPRJ\webu
i\MasterDetailPG.xml -rootdir C:\dev\oaf\r1211\jdevhome\jdev\myprojects -username
apps - password apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=focusthreadr12.com)(PORT=1521))
(CONNECT_DATA=(SID=visr12)))"
if(eventName.equalsIgnoreCase("saveEvent"))
if(empname.contains("@"))
if("".equalsIgnoreCase(pageContext.getParameter("StartDate").trim()))
if(!exc.isEmpty())
OAException.raiseBundledOAException(exc);
Code:-
Application Name:-
Language:-
Text:- //Employee (&EMPNO) has been created
successfully.
Apply it.
String eno=pageContext.getParameter("EmployeeId")
�TO Get The Sequence Value write the following in the create Attribute set in EO.
super.create(attributeList);
Number supplierId =
transaction.getSequenceValue("FWK_TBX_SUPPLIERS_S");
setSupplierId(supplierId);
} // end create()