OAF Useful Codes
OAF Useful Codes
OAF Useful Codes
//Adding whereclause in VO
String strWhereClause = new String();
strWhereClause = "PO_HEADER_ID=" + strPOHeaderId;
tableVO.setWhereClause(null);
tableVO.setWhereClauseParams(null);
tableVO.setWhereClause(strWhereClause);
tableVO.executeQuery();
//Getting next value of sequence
oracle.jbo.domain.Number dashboardId =
txn.getSequenceValue("_SEQUENCENAME_S");
//Creating handle of Bean and setting its properties
OASubmitButtonBean updateButton = (OASubmitButtonBean)oawebbean.findChildRecursi
ve("UpdateButton");
updateButton.setRendered(Boolean.FALSE);
//Getting value of profile
String strProfileValue =
pageContext.getProfile("PROFILE_NAME");
//Checking Addrow button click in Advanced Table
if ("PartnerDetailsAdvTbl".equals(pageContext.getParameter(SOURCE_PARAM)
) &&
ADD_ROWS_EVENT.equals(pageContext.getParameter(EVENT_PARAM))) { //Cu
stom Code }
//Checking LOV Event
if (pageContext.isLovEvent()) {
String strLovInputSource =
(String)pageContext.getLovInputSourceId();
if ((null != strLovInputSource) &&
((("LOV_BEAN_ID".equals(strLovInputSource)))) { //Custom Code }
}
//Checking PPR event like delete image click in Advanced Table And Getting handl
e of Row
if ("deletePartner".equals(pageContext.getParameter(EVENT_PARAM))) {
//Getting row reference
String strRowReference =
pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REF
ERENCE);
PartnerDetailsREFVORowImpl partnerRow =
(PartnerDetailsREFVORowImpl)((OAApplicationModule)documentAM).fi
ndRowByRef(strRowReference);
partnerRow.remove();
}
//Setting Org context
oadbtransaction.setMultiOrgPolicyContext("S",
new Long(strOrgId).longValue())
;
//Callable statement Example
OADBTransaction txn =
((OAApplicationModuleImpl)documentAM).getOADBTransaction();
String strValueBasis = null;
String strSQLQuery =