How to retrieve Current row value
ü using Row Reference
//Getting selected Emp Id-----------------------------------
OAApplicationModule am= pageContext.getApplicationModule(webBean);
OAViewObject vo3 = (OAViewObject)am.findViewObject("DataEntryVO1");
//Get Row Refrence
String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
//Get current Row using Row Reference
OARow currRow = (OARow)am.findRowByRef(rowReference);
//Get attribute value from current row
String lv_emp_id = (String)currRow.getAttribute("EmpId").toString();
throw new OAException(" Selected Emp id is : !!!"+lv_emp_id ,OAException.CONFIRMATION);
// end-----------------------------------
ü using VO.currentRecord
vo3.last(); --retrieving last row
String lv_emp_id =vo3.currRow().getAttribute("EmpId").toString();
ü using OAMessageStyle Bean
//CustomerNameTxt
OAMessageStyledTextBean CustomerNameTxt =
(OAMessageStyledTextBean)webBean.findIndexedChildRecursive("CustomerNameTxt");
System.out.println("CustomerNameTxt" +
CustomerNameTxt.getValue(pageContext));
How to Button/fields value using PageContext.getParameter
(pageContext.getParameter("CreatePage")!=null)
How to print Message
System.out.println("Process Request Starts****");
pageContext.writeDiagnostics(this, "Unable to get DeliveryId" + e.getMessage().toString(), 6);
How to use Link button
Create an item and change the following property
Item Style |
Link |
Destination URI |
Link
of the calling page OA.jsp?page=/pk/oracle/apps/fnd/dataentry/server/EntryPG Passing
Parameter
|
Target Frame |
_blank Note:-
It will Open the Target Page in New Window Page |
How to use ComparetoIgnore method
if ("Order Confirmation".compareToIgnoreCase(pageContext.getParameter("ProgramShortName").toString()) ==
0) {
System.out.println("Order Confirmation is chsen to be run");
//Run Order Confirmation Report
getOutput(pageContext, webBean, "XXMOMRPT55555OAF");
}
How to use Date Format and get Current date
SimpleDateFormat format =
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss.S");
oracle.jbo.domain.Date convertDate =
am3.getOADBTransaction().getCurrentDBDate();
java.util.Date date = null;
try {
date = format.parse(convertDate.toString());
} catch (ParseException e) {
// TODO
}
SimpleDateFormat formatDate =
new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
String convStr = formatDate.format(date);
System.out.println(convStr);
//2015/03/13 00:00:00
SimpleDateFormat formatDate2 =
new SimpleDateFormat("yyyy/MM/dd hh:mm:ss");
String currentDate = formatDate.format(date);
System.out.println(currentDate);
No comments:
Post a Comment