RADIO GROUP EVENT
view plainprint?
1. import [Link];
2. import [Link];
3. import [Link];
4.
5. //If you want your radio buttons to behave as a group, you must programmatically assign
them all the same name by calling setName() for each radio button.
6.
7. public void processRequest(OAPageContext pageContext, OAWebBean webBean)
8. {
9. [Link](pageContext, webBean);
10.
11.
12. OAMessageRadioButtonBean appleButton =
13. (OAMessageRadioButtonBean)[Link]("GroupButtonOne"); //First
Radio Button
14. [Link]("fruitRadioGroup");
15. [Link]("APPLES");
16.
17. OAMessageRadioButtonBean orangeButton =
18. (OAMessageRadioButtonBean)[Link]("GroupButtonTwo"); //
Second Radio Button
19. [Link]("fruitRadioGroup");
20. [Link]("ORANGES");
21. }
22.
23.
24. public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
25. {
26. [Link](pageContext, webBean);
27. OAApplicationModule am = [Link](webBean);
28.
29. //You can then obtain the selected radio button in your processFormRequest() as follows:
30.
31. String radioGroupValue = [Link]("fruitRadioGroup");
32. }
A know issue comes while implementing Radio Group refer to below link for more details:
Value that you need to set declaratively
Posted by Anil Sharma at 8:52 PM 0 comments
Reactions:
Links to this post
Wednesday, April 29, 2009
TO Find @ in column
if ([Link]("item1") != null)
{
OAViewObject oaviewobject1 = (OAViewObject)[Link]("NewEmployeeVO1");
if (oaviewobject1 != null)
{
[Link]("Inside");
[Link](); //New line added
[Link](); //new line added
OARow row = (OARow)[Link]();
String email = [Link]("Attribute1")+"";
[Link]("Attribute1"+ email);
if( [Link]("@")<0)
throw new OAException("Invalid Email Entered", [Link]) ;
}
}
Posted by Anil Sharma at 8:48 PM 0 comments
Reactions:
Links to this post
Thursday, April 16, 2009
Setting WhereClause in VOImpl
public class XXOAViewObjectImpl
{
/**This is the default constructor (do not remove)
*/
public XXVOImpl() {
}
public void initMajorList(String categoryID){
setWhereClauseParams(null); // Always reset
setWhereClauseParam(0, orgId);
setWhereClauseParam(1, categoryID);
setWhereClauseParam(2, compPlanId);
executeQuery();
}
Posted by Anil Sharma at 8:06 PM 0 comments
Reactions:
Links to this post
The JDBC Tutorial: Chapter 3 - Advanced Tutorial
[Link]
JDBCTutorial/
Posted by Anil Sharma at 8:06 PM 0 comments
Reactions:
Links to this post
Important Profile Options in OAF
FND_Diagnostics
Setting the FND : Diagnostics (FND_DIAGNOSTICS) profile option to "Yes" will enable the
diagnostics global button to be rendered on the screen. Pressing this button brings the user to an
interface where the user can choose what type of logged messages to display.
Personalization Levels
Personalizations can be enabled at the function, site, operating unit or responsibility level.
Personalizations at lower levels override personalizations at higher levels. Values inherit the
definition from the level immediately above unless changed.
FND: Personalization Region Link Enabled :
Valid values: Yes - renders the "Personalize Region" links above each region in a page. Each
link takes you first to the Choose Personalization Context page, then to the Page Hierarchy
Personalization page with focus on the region node from which you selected the "Personalize
Region" link.
Personalize Self-Service Defn – Set this profile to Yes to allow personalizations.
Disable Self-Service Personalization - Yes will disable all personalizations at any level.
FND: Personalization Document Root Path (new in 11.5.10) - Set this profile option to a tmp
directory with open (777) permissions for migrating personalizations between instances.
How to See Log on Page
Enable profile Option FND_Diagnostics to "Yes" at User OR Site Level.
In Controller write this code:-
[Link](this, "Checking profile options", 1);
In Application Module write this code
getOADBTransaction().writeDiagnostics(this, "Checking Profile Option", 1);
Now to see log on screen Click on “Diagnostics” on Page [Top right on page]
Then Choose Show Log on Screen from the picklist and choose log level as Statement Level and
Click on Go
Posted by Anil Sharma at 8:01 PM 0 comments
Reactions:
Links to this post
Onion Architecture of OA Framework
OA Framework can be extracted into a series of concentric layers, like an onion.
Each layer only “knows”about the layers below [Link] core layer represents the database and the
surface layer represents the application pages. In between is a number of business logic and user
interface layers. This layering allows for generic code and components to be implemented at the
inner layers to maximize their reuse across the outer layers.
For example, attribute validation is implemented at the Entity Object (a BC4J object-oriented
representation of a database table in the middle tier) level.
Posted by Anil Sharma at 7:58 PM 0 comments
Reactions:
Links to this post
How to capute current row in Table Region
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
[Link](pageContext, webBean); OAApplicationModule am =
(OAApplicationModule)[Link](webBean);
String event = [Link]("event");
if ("").equals(event))
{
// Get the identifier of the PPR event source row
String rowReference =
[Link](OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);
Serializable[] parameters = { rowReference };
// Pass the rowReference to a "handler" method in the application module.
[Link]("", parameters);
}
}
In your application module's "handler" method, add the following code to access the
source row:
OARow row = (OARow)findRowByRef(rowReference);
if (row != null)
{
...
}
Posted by Anil Sharma at 7:53 PM 1 comments
Reactions:
Links to this post
How to compare two dates
import [Link];
Date scoStartDate = null;
Date scoEndDate = null;
scoStartDate = (Date)[Link](); // Capturing dates from RowImpl
scoEndDate = (Date)[Link](); // Capturing dates from RowImpl
[Link] javaSqlDate = [Link]();
if ([Link]().before(javaSqlDate))
{
//throw Exception
}
Posted by Anil Sharma at 7:53 PM 0 comments
Reactions:
Links to this post
Prepared Statement - Controller
Controller - ProcessFormRequest Code
view plainprint?
1. import [Link];
2. import [Link];
3. import [Link];
4.
5. try
6.
7. {
8.
9.
10. Connection conn = [Link](webBean).getOADBTransaction(
).getJdbcConnection();
11.
12. String Query = "SELECT count(*) count from XX_PA_SCO_V where project_id=:1 and
CI_ID is not null";
13.
14. PreparedStatement stmt = [Link](Query);
15. [Link](1, project_id);
16. for(ResultSet resultset = [Link](); [Link]();)
17. {
18. [Link](this, "Query Executed", 1);
19. result = [Link]("count");;
20. [Link](this, "Query Executed"+ result, 1);
21. }
22. }
23.
24. catch(Exception exception)
25.
26. {
27. throw new OAException("Error in Staffing Query"+exception, [Link]);
28. }
29.
30. if(result >0)
31. {
32. throw new OAException("One or more Scope Change Order is existing on this project",
[Link]);
33. }
Posted by Anil Sharma at 7:52 PM 1 comments
Reactions:
Links to this post
Callable Statement in Controller
view plainprint?
1. import [Link];
2.
3. import [Link];
4. import [Link];
5.
6. import [Link];
7. import [Link];
8.
9. try
10.
11. {
12. Connection conn = (Connection)[Link](oawebbean).getO
ADBTransaction().getJdbcConnection();
13.
14. CallableStatement cs = [Link]("{call XX_UPDATE_SCO_DETAILS_PKG.S
CO_ADD_ON_WORK(?,?,?,?,?,?,?)}");
15.
16. [Link](1, Proj_ID);
17. [Link](2, SCOID);
18. [Link](3, Assign_ID);
19. [Link](4, "ADD_NEW_RESOURCES");
20. [Link](5, strStartDate);
21. [Link](6, strEndDate);
22. [Link](7, [Link]);
23. [Link]();
24. error_mess = [Link](7);
25. if()
26. {
27. throw new OAException("Error in saving data in custom table OR Updating LOE: "+erro
r_mess);
28. }
29. [Link]();
30. [Link]();
31. }
32. catch (SQLException sqle)
33. {
34. throw [Link](sqle);
35. }
36. [Link](oapagecontext, this, "Callabe Statement Executed", 3);
Posted by Anil Sharma at 7:50 PM 0 comments
Reactions:
Links to this post
Friday, April 10, 2009
How to return array from Application Module
Controller Code
view plainprint?
1. import [Link];
2. import [Link];
3. import [Link];
4. import [Link];
5. import [Link];
6.
7.
8. Serializable paras[] = {employee_id};
9. Object result[] = new Object[10]; // declaring result of Array Type
10. result = (Object[])[Link]("getparameters", paras); // Calling AM Method
11.
12. String userid = (String)result[0]; // Capturing value from Array
13. String userName = (String)result[1]; // Capturing value from Array
Application Module Code
view plainprint?
1. public Object[] getparameters(String employeeid)
2. {
3. ResultSet resultset = null;
4. int employee_id = [Link](employeeid);
5.
6. Object result[] = new Object[10];
7. OADBTransaction oadbtransaction = getOADBTransaction();
8. [Link](oadbtransaction, this, "Employee id is " + employee_id, 1);
9.
10. try
11. {
12. Connection conn = getOADBTransaction().getJdbcConnection();
13. String query = "sselect user_id, user_name from fnd_user where employee_id=:1";
14.
15. PreparedStatement stmt = [Link](query);
16. [Link](1, employee_id);
17.
18. for(resultset = [Link](); [Link]();
19. {
20.
21. result[0] = [Link]("user_id");
22. [Link](oadbtransaction, this, "Project Number is " + result[0], 1);
23.
24. result[1] = [Link]("user_name");
25. [Link](oadbtransaction, this, "Project ClassCode is " + result[1], 1);
26.
27. }
28. }
29.
30. catch(Exception e)
31.
32. {
33. [Link](oadbtransaction, this, "Exception " + [Link](), 1);
34. }
35. return result; // Returning result array to Controller
36. }
Posted by Anil Sharma at 11:15 AM 0 comments
Reactions:
Links to this post
Creating VO at RunTime in Controller OR Dynamically created VO
ViewObject viewobject =
[Link](oawebbean).findViewObject("ObtainProjectId");
if(viewobject == null)
{
String s14 = "SELECT project_id FROM PA_PROJECTS_ALL WHERE segment1 =:1";
viewobject = [Link]("ObtainProjectId", s14);
}
[Link](0, s5);
[Link]();
int i = [Link]();
if(i != 1)
{
[Link](oapagecontext, this, "Error : Project Number is Invalid or not unique", 3);
OAException oaexception4 = null;
oaexception4 = new OAException("PA", "PA_PROJECT_NUMBER_INVALID");
[Link](oaapplicationmodule);
throw oaexception4;
}
[Link] row = [Link]();
if(row != null)
{
Object obj2 = [Link](0);
if(obj2 != null)
{
s3 = [Link]();
if(s3 != null)
{
[Link]("paProjectId", s3); // Capturing projectid in Session
if([Link]("AddNewAssignmentsVO") != null)
{
[Link]("AddNewAssignmentVO").first().setAttribute("ProjectId",
s3);
}
}
}
}
Posted by Anil Sharma at 11:14 AM 0 comments
Reactions:
Links to this post
Wednesday, April 8, 2009
Getting & Setting Value
Capturing the value from VO and setting Explictiy in EO
import [Link];
import [Link];
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
[Link](pageContext, webBean);
OAApplicationModule am = [Link](webBean);
OAViewObject oaviewobject1 =(OAViewObject)[Link]("NewEmployeeVO1");
if (oaviewobject1 != null)
{
[Link]("Inside");
[Link](); //New line added
[Link](); //new line added
OARow row = (OARow)[Link]();
String fullName = (String)[Link]("FullName");
OAViewObject vo1 = (OAViewObject)[Link]("EmployeeEOVO1");
[Link]();
if (vo1 != null)
{
do
{
if(![Link]())
break;
[Link]();
EmployeeEOVORowImpl lcerl = (EmployeeEOVORowImpl)[Link]();
[Link](fullName);
}while(true);
}
}
Posted by Anil Sharma at 9:35 PM 0 comments
Reactions:
Links to this post
Convert dateToString | stringToDate
Controller Code:-
view plainprint?
1. Date date = (Date)[Link]("AddNewAssignmentVO").first
().getAttribute("StartDate");
2. Date edate = (Date)[Link]("AddNewAssignmentVO").firs
t().getAttribute("EndDate");
3.
4.
5. if (date != null && edate != null)
6. {
7. String Xs11 = [Link]().dateToString(date);
8. String Xs12 = [Link]().dateToString(edate);
9. }
In the same way we can convert String to Date
view plainprint?
1. [Link]().stringToDate("xxxx");
Posted by Anil Sharma at 9:33 PM 2 comments
Reactions:
Links to this post
Creating View Object and MessageChoiceBean Programatically
Controller Code
view plainprint?
1. public void processRequest(OAPageContext pageContext, OAWebBean webBean)
2. {
3. [Link](pageContext, webBean);
4. String sMode = "test";
5. OAApplicationModule am = [Link](webBean);
6. OAViewObject oaviewobject = (OAViewObject)[Link]("xxScoResourceV
O1");
7. if(oaviewobject == null)
8. {
9. oaviewobject = (OAViewObject)[Link]("xxScoResourceVO1","[Link].
[Link]");
10. }
11.
12. [Link]("DESCRIPTION IS NULL OR DESCRIPTION = '" + sM
ode + "'"); //Setting where clause Dynamically of Poplist VO
13.
14. [Link]();
15. OAMessageChoiceBean oamessagechoicebean = (OAMessageChoiceBean)createWebBe
an(pageContext, "MESSAGE_POPLIST");
16. [Link]("Back");
17. [Link](pageContext, oaviewobject);
18. [Link]("Meaning");
19. [Link]("LookupCode");
20.
21. [Link]("xxAddAsgmtApplyAction");
22. [Link](false);
23. [Link]("RETURN_BACK"); //Setting Default Value
24. [Link](oamessagechoicebean);
25. }
26.
27. How to capture its Value
28.
29. String PoplistValue = [Link]("xxAddAsgmtApplyAction");
Posted by Anil Sharma at 9:33 PM 0 comments
Reactions:
Links to this post
Sunday, April 5, 2009
How to Capture LOV Event
view plainprint?
1. if ([Link]())
2. {
3. [Link]("Inside LOV Event");
4. String lovInputSourceId = [Link]();
5. //checking which lov event is fired.
6. //Below EmployeeLovInput is the ID of messageLovInput
7. if ("EmployeeLovInput".equals(lovInputSourceId))
8. {
9. //Invokes AM Method
10. [Link]("setExtraInfo");
11. }
12. }
The [Link] method returns true/Fires if the event value is LOV_UPDATE
(meaning the user selected a value from the LOV modal window), or LOV_VALIDATE
(meaning the user tabbed out of the LOV input field on the base page).
Posted by Anil Sharma at 9:09 PM 1 comments
Reactions:
Links to this post
Things good to know
Validation View Object - A view object created exclusively for the purpose of performing light-
weight SQL validation on behalf of entity objects or their experts.
Validation Application Module - An application module created exclusively for the purpose of
grouping and providing transaction context to related validation view objects. Typically, a
standalone entity object or the top-level entity object in a composition would have an associated
validation application module.
Root Application Module - Each pageLayout region in an OA Framework application is
associated with a "root" application module which groups related services and establishes the
transaction context.
This transaction context can be shared by multiple pages if they all reference the same root
application module, and instruct the framework to retain this application module (not return it to
the pool) when navigating from page to page within the transaction task.
View Link - Establishes a master/detail relationship between two view objects
Entity Expert - A special singleton class registered with an entity object (EO) that performs
operations on behalf of the EO.
Association Object - BC4J association objects implement the relationships between entity
objects. For example, a purchase order header can reference a supplier, or it can own its order
lines.
Attribute Set - Bundles of region or item properties that can be reused either as is or with
modifications. For example, all buttons sharing the same attribute set would have the same label
and Alt text.
Posted by Anil Sharma at 9:07 PM 0 comments
Reactions:
Links to this post
How to call SRS Window in OAF
Controller PFR Code
view plainprint?
1. import [Link];
2.
3. StringBuffer l_buffer = new StringBuffer();
4. StringBuffer l_buffer1 = new StringBuffer();
5. l_buffer.append("javascript:mywin = openWindow(top, '");
6. l_buffer1.append("&akRegionApplicationId="+"0");
7. l_buffer1.append("&akRegionCode="+"FNDCPREQUESTVIEWPAGE");
8. l_buffer1.append("&retainAM=Y");
9. String url = "/OA_HTML/[Link]?page="+l_buffer1.toString();
10. OAUrl popupUrl = new OAUrl(url, OAWebBeanConstants.ADD_BREAD_CRUMB_S
AVE );
11. String strUrl = [Link](pageContext);
12. l_buffer.append([Link]());
13. l_buffer.append("', 'lovWindow', {width:750, height:550},false,'dialog',null);");
14. [Link]("SomeName",l_buffer.toString());
Thanks
--Anil
Posted by Anil Sharma at 9:06 PM 2 comments
Reactions:
Links to this post
Custom CSS
[Link]
Posted by Anil Sharma at 9:05 PM 0 comments
Reactions:
Links to this post
Calling Procedure
AM Code:
public String CreateInvoice(String pamount,String ptype,String pnum,String perror)
{
String perror = null;
try
{
Connection conn = getOADBTransaction().getJdbcConnection();
CallableStatement cstmt = [Link]("{call add_invoice_proc(?,?,?,?)}");
[Link](1,pamount);
[Link](2,ptype);
[Link](3,pnum);
[Link](4,[Link]);
[Link]("before calling");
[Link]();
perror = [Link](4);/*****getting the out parameter*****/
[Link]("after calling");
[Link]("error is "+perror);
[Link]();
}
catch(Exception e)
{
[Link]();
}
return perror;
}
public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
{
[Link](pageContext, webBean);
if ([Link]("Insert")!=null)
{
String amount = [Link]("InvoiceAmount");
String type = [Link]("InvoiceTypeLookupCode");
String number = [Link]("InvoiceNum");
String error = "";
OAApplicationModule am = [Link](webBean);
Serializable [] params = {amount,type,number,error};
[Link]("CreateInvoice",params);
[Link]("getting the out param in CO");
String returnmsg =(String)[Link]("CreateInvoice",params);
[Link]("after getting");
[Link]("errorstring is "+returnmsg);
if (returnmsg != null)
{
throw new OAException(returnmsg,[Link]);
}
if (returnmsg==null)
{
throw new OAException("Invoice created Successfully",[Link]);
}
}
}
Posted by Anil Sharma at 9:03 PM 0 comments
Reactions:
Links to this post
Import & Export Commands 11i & R12
view plainprint?
1. //Note : Need to run these commands from window command prompt
2. // For 11i - JDevInstallDir\jdevbin\jdev\bin>
3. // For R12 - JDevInstallDir\jdevbin\oaext\bin;
4.
5. import d:\jdevhome\jdev\myprojects\xx\oracle\apps\per\webui\[Link] -rootdir
d:\jdevhome\jdev\myprojects -username apps -password apps -dbconnection "(DESCRIP
TION=(ADDRESS=(PROTOCOL=tcp)(HOST=[Link])(PORT=1525))
(CONNECT_DATA=(SID=DEV)))"
6.
7. jpximport d:\[Link] -userId 1 -username apps -password apps -dbconnection "(DE
SCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=[Link])
(PORT=1525))(CONNECT_DATA=(SID=DEV)))"
8.
9. export /oracle/apps/per/employee/webui/employeeRN -rootdir d:\jdevhome\jdev\
myprojects -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRES
S=(PROTOCOL=tcp)(HOST=[Link])(PORT=1525))
(CONNECT_DATA=(SID=DEV)))"
10.
11.
12. //XMLImporter Command: Run this command on server from $JAVA_TOP
view plainprint?
1. java [Link] $JAVA_TOP/xxx/oracle/apps/pa/sco/
webui/[Link] -rootdir $JAVA_TOP -userId 1 -username apps -password xxx -
dbconnection "(description = (address_list = (address = (community = [Link])
(protocol = tcp)(host = [Link])(port = 1532)))(connect_data = (sid =EAFIN
11)))"
view plainprint?
1.
view plainprint?
1. // XML Exporter Command : Run this command on server from $JAVA_TOP
view plainprint?
1. java [Link] /xx/oracle/apps/pa/projects/webui/
ProjectSummaryPG -rootdir $JAVA_TOP -username apps -password atgapps -
dbconnection "(description = (address_list = (address = (community = [Link])
(protocol = tcp)(host =[Link])(port = 1522)))(connect_data = (sid = E
AFIN1)))"
Posted by Anil Sharma at 9:00 PM 0 comments
Reactions:
Links to this post
Programmatically Search / Custom Search Code
Controller Code
view plainprint?
1. // In the controller
2. public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
3. {
4. [Link](webBean);
5. ForumsAMImpl am1 = (ForumsAMImpl)[Link](webBean)
;
6. if([Link]("submit") != null)
7. {
8. [Link]("Anil", "Calling Execute Method ", 1);
9. [Link](pageContext, webBean);
10.
11. }
12. }
ApplicationModule Code
view plainprint?
1. public void ExecuteQuery(OAPageContext pageContext, OAWebBean webBean)
2. {
3. String supID = [Link]("SuppID1")+"";
4. String supName = [Link]("SupplierName")+"";
5. String supSite = [Link]("SupplierSiteID")+"";
6.
7. XXSupplierSiteVOImpl vo = getXXSupplierSiteVO1();
8.
9. [Link](pageContext, "SearchAMImpl", "SuppID1 = " + supID, 1);
10. [Link](pageContext, "SearchAMImpl", "SupplierName = " + supName, 1);
11. [Link](pageContext, "SearchAMImpl", "SupplierSiteID = " + supSite, 1);
12.
13. String strWhereClause = "";
14. Object paramArray[] = new Object[10];
15. int i = 1;
16.
17. if()
18. {
19.
20. if([Link](strWhereClause))
21. {
22. [Link](pageContext, "SearchAMImpl", "supName = " + supName, 1);
23. strWhereClause = " SITE_NAME like :" + i;
24.
25. [Link](pageContext, "SearchAMImpl", " strWhereClause = " + strWhereClause, 1)
;
26. paramArray[i] = supName+ "%";
27. }
28.
29. else
30. {
31. i++;
32. strWhereClause = strWhereClause + "AND SITE_NAME like :" + i;
33. [Link](pageContext, "SearchAMImpl", "supName in else = " + i, 1);
34. paramArray[i] = supName;
35. }
36. }
37.
38. [Link](pageContext, "SearchAMImpl", "Above SupplierID Check " + supID, 1);
39. if()
40. {
41. [Link](pageContext, "SearchAMImpl", "Inside SupplierID Check " + supID, 1);
42.
43. if([Link](strWhereClause))
44. {
45. strWhereClause = " SUPPLIER_ID = :" + i;
46. [Link](pageContext, "SearchAMImpl", " strWhereClause = " + strWhereClause
, 1);
47. paramArray[i] = supID;
48. [Link](pageContext, "SearchAMImpl", " supID is = " + supID, 1);
49. }
50.
51. else
52. {
53. [Link](pageContext, "SearchAMImpl", "SUPPLIER_ID WhereClause ELSE "
+ supID, 1);
54. i++;
55. strWhereClause = strWhereClause + " and SUPPLIER_ID like :" + i;
56. paramArray[i] = supID;
57. [Link](pageContext, "SearchAMImpl", "paramArrayE " + paramArray[i], 1);
58. }
59. }
60.
61. [Link](pageContext, "SearchAMImpl", "Above supSite Check " + supSite, 1);
62. if()
63. {
64. [Link](pageContext, "SearchAMImpl", "Below supSite Check " + supSite, 1);
65. if([Link](strWhereClause))
66. {
67. strWhereClause = " SUPPLIER_SITE_ID = :" + i;
68. paramArray[i] = supSite;
69. }
70.
71. else
72. {
73. [Link](pageContext, "SearchAMImpl", "SUPPLIER_SITE_ID WhereClause E
LSE " + supSite, 1);
74. i++;
75. strWhereClause = strWhereClause + " AND SUPPLIER_SITE_ID = :" + i;
76. paramArray[i] = supSite;
77. [Link](pageContext, "SearchAMImpl", "paramArray " + paramArray[i], 1);
78. }
79. }
80.
81. [Link](null);
82. [Link](null);
83.
84. [Link](pageContext, "SearchAMImpl", "Anil SetWhereClause" + strWhereClau
se, 1);
85. [Link](pageContext, "SearchAMImpl", "i value is " + i, 1);
86. [Link](strWhereClause);
87.
88. for(int j = 0; j < i; j++)
89. {
90. [Link](pageContext, "SearchAMImpl", "bind index " + j, 1);
91. if(paramArray[j + 1] != null)
92. {
93. [Link](j, paramArray[j + 1]);
94. [Link](pageContext, "SearchAMImpl", "bind values from Array " + param
Array[j + 1], 1);
95. }
96. }
97.
98. [Link](pageContext, "SearchAMImpl", " **** Query 2 = " + [Link](), 1)
;
99. [Link]();
100. }
Posted by Anil Sharma at 8:56 AM 0 comments
Reactions:
Links to this post
Deploying Personalizations
The Functional Administrator responsibility provides a simple UI that lets you both export
meta data to XML files, and import XML files into a MDS repository.
1. You have to set the profile option FND: Personalization Document Root
Path (FND_PERZ_DOC_ROOT_PATH) to a root directory in your file system where your files
are to be exported to or imported from.
2. Log in to the Oracle E-Business Suite under the Functional Administrator responsibility.
3. Select the Personalizations tab, then select the Import/Export sub tab.
4. Select the pages, regions or packages you wish to export, then select Export to File.
5. Once you export your meta data to XML files on the file system, you should login to the other
Oracle E-Business Suite environment that you want to import these files.
6. To import the XML files from your file system into another MDS repository, login to the other
Oracle E-Business Suite environment as a Functional Administrator. Select the Personalizations
tab, then select the Import/Export sub tab. Select Exported Personalizations from the side
navigation menu to display the Exported Personalizations page.
7. Select all the documents you wish to import and choose Import from File System.
You can review the personalization through JDR_UTILS . It is a PL/SQL package that allows
you to evaluate the list of personalization documents that are in your MDS repository.
For example, to see all
the personalization documents for the Notifications Worklist Table, execute the following
command:
exec
jdr_utils.listcustomizations('/oracle/apps/fnd/wf/worklist/webui/AdvancWorklistRG');
Posted by Anil Sharma at 8:55 AM 1 comments
Reactions:
Links to this post
Diagnosing Personalization Problems
About this Page link shows document path and all personalization documents
• MDS pages saved under /mds/comp/sub/[Link]
• XML files imported into MDS repository at customer site
Use the Functional Administrator Responsibility / Application Catalog Tool to disable individual
personalization documents
• Turn off personalizations for the entire instance by setting the following profile to ‘Yes’
• Disable Self-service Personal / FND_DISABLE_OA_CUSTOMIZATIONS
Use SQL*Plus to see personalization registration
• Turn on diagnostic messaging in SQL*Plus
• SQL> set serveroutput on
view plainprint?
1. //Review what personalization documents exist for a given page
2.
3. • execute jdr_utils.listcustomizations('/oracle/apps/fnd/wf/worklist/webui/
FullWorklistPG');
4.
5. //Review a personalization document
6.
7. • execute jdr_utils.printdocument('/oracle/apps/fnd/customizations/user/2662/wf/
worklist/webui/
8. FullWorklistPG');
9.
10. // Delete a personalization document
11.
12. • execute jdr_utils.deletedocument('/oracle/apps/fnd/customizations/user/2662/wf/
worklist/webui/
13. FullWorklistPG');
Posted by Anil Sharma at 8:52 AM 1 comments
Reactions:
Links to this post
Diagnosing Extension Problems
Make sure to import the .jpx file with the substitution into MDS using JPXImporter
• Use the 'About this Page' link to find all dependent objects and make sure substitutions of your
extended objects were successful
• Enabled through FND_DIAGNOSTICS profile
view plainprint?
1. // Check to see if substitution file was uploaded
2.
3. execute jdr_utils.listcustomizations('/oracle/apps/fnd/framework/toolbox/tutorial/server/
PoSummaryVO');
4.
5. // Review a substitution definition
6.
7. execute jdr_utils.printdocument('/oracle/apps/fnd/framework/toolbox/tutorial/server/
customizations/si
8. te/0/PoSummaryVO');
9.
10.
11. // delete a substitution definition
12.
13. execute
14. jdr_utils.deletedocument('/oracle/apps/fnd/framework/toolbox/tutorial/server/
customizations/site/0/PoSummaryVO);
15.
16. commit;
Posted by Anil Sharma at 8:51 AM 1 comments
Reactions:
Links to this post
Enable Debug Log on OAF Page
We can enable logging by setting the below profile option:-
• FND: Debug Log Enabled profile set to ‘Yes’
• Turn on low level statement logging for a single user to monitor
• FND: Debug Log Level= Statement
Another way of gathering the same info is the following:
• First enable profile option FND: Diagnostics then
• At the end of the existing URL
add: &aflog_level=Statement&aflog_module=*
• Use '*' for wildcard, not '%'. '%' is a special URL character)
Example:
• [Link]
OAFunc=OAHOMEPAGE&aflog_level=STATEMENT&aflog_module=pa
You can see the log on screen by using by below code in your controller OR in Application
ModuleImpl
For AM
getOADBTransaction().writeDiagnostics(this, "I am in the Application Module", 1);
For Controller
[Link](this, "I am in Controller PFR", 1);
Posted by Anil Sharma at 8:50 AM 0 comments
Reactions:
Links to this post
How to hide OAImageBean in Controller
import [Link];
import [Link];
import [Link];
public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
[Link](pageContext, webBean);
OAApplicationModule am = [Link](webBean);
String userid = [Link]()+"";
if ([Link]([Link]()+""));
{
OAViewObject oaviewobject1 =(OAViewObject)[Link]("EmployeeEOVO1");
OAViewObject svo =(OAViewObject)[Link]("StatusPVO1");
OARow row1 = (OARow)[Link]();
if (oaviewobject1 != null)
{
[Link]("Inside");
[Link](); //New line added
[Link](); //new line added
OARow row = (OARow)[Link]();
String fullName = (String)[Link]("Attribute1");
if ([Link]("A"))
{
OAImageBean imagebean = (OAImageBean)[Link]("approved");
OAImageBean imagebean1 = (OAImageBean)[Link]("rejected");
OAImageBean imagebean2 = (OAImageBean)[Link]("inProcess");
[Link](true);
[Link](false);
[Link](false);
}
else if ([Link]("R"))
{
OAImageBean imagebean = (OAImageBean)[Link]("approved");
OAImageBean imagebean1 = (OAImageBean)[Link]("rejected");
OAImageBean imagebean2 = (OAImageBean)[Link]("inProcess");
[Link](false);
[Link](true);
[Link](false);
else if ([Link]("W"))
{
OAImageBean imagebean = (OAImageBean)[Link]("approved");
OAImageBean imagebean1 = (OAImageBean)[Link]("rejected");
OAImageBean imagebean2 = (OAImageBean)[Link]("inProcess");
[Link](false);
[Link](false);
[Link](true);
else
{
[Link]("Inside ELSE");
OAImageBean imagebean = (OAImageBean)[Link]("approved");
OAImageBean imagebean1 = (OAImageBean)[Link]("rejected");
OAImageBean imagebean2 = (OAImageBean)[Link]("inProcess");
[Link](false);
[Link](false);
[Link](false);
}
}
}
}
Posted by Anil Sharma at 8:49 AM 0 comments
Reactions:
Links to this post
Deployment of Page in APPS - OAF
The steps in brief are :
· Development of the [Link] page in local machine
· FTP the related source code/files to the Oracle APPS environment.
· Importing the page to the Database through Import Command.
· Registration of the page in the Oracle Apps environment.
On project compilation the class files along with xml files are generated in Myclasses.
The Folder Structure for xml pages and respective Controllers are as below
C:\Jdevhome\Jdev\myclasses\xxx\oracle\apps\fnd\framework\webui\*
C:\Jdevhome\Jdev\myclasses\xxx\oracle\apps\fnd\framework\server\*
The First step will be to move the files into the JAVA_TOP with the help of any FTP
Tool.
Just drag and dropped the xxx folder from local m/c to Apps Java top path.
Importing the XML files:
Run the import scripts for the Page and Regions.
The import command is
import C:\Jjdevhome\jdev\myprojects\xx\oracle\apps\fnd\framework\webui\[Link] -
rootdir C:\jdevhome\jdev\myprojects -username apps -password apps -dbconnection
"(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=[Link])(PORT=1525))
(CONNECT_DATA=(SID=DEV)))"
The command is to be run from Jdeveloper/Jdevbin/Jdev/Bin from command prompt.
Registering the Main Page in APPS.
Login through System Administrator Resp.
Select Application -- Function.
1. Enter the Function Name, User Function Name and Description
2. Enter Properties (Tab) Type as SSWA jsp function
3. In Web HTML Tab enter the page path
[Link]?page=/xxx/oracle/apps/fnd/framework/webui/TestPG
Attach the function with a desired menu and then run from the respective responsibility.
Last and the important step :-- DONOT forget to bounce the Appache server.
Posted by Anil Sharma at 8:49 AM 0 comments
Reactions:
Links to this post
How to Bounce Apache server in 11i & R12
1. Connect to the server through Putty.
Now write
1. cd $COMMON_TOP.
2. cd admin/scripts/
Now write [Link] stop and once the appache is stopped write [Link] start to start the
Appache server.
To bounce Appache in R12
1. [Link] stop
2. [Link] stop
3. [Link] start
4. [Link] start
These scripts are in $INST_TOP/admin/scripts
Posted by Anil Sharma at 8:48 AM 0 comments
Reactions:
Links to this post
Wednesday, April 1, 2009
Change the date Format from YYYY-MM-DD to DD-MM-YYYY
In Controller
import [Link];
import [Link];
import [Link];
import [Link];
String newProjStartDate,newProjEndDate, sConvertNewStartDate, sConvertNewEndDate =
null;
newProjStartDate= (String)[Link]("newstartdate");
newProjEndDate= (String)[Link]("newenddate");
try
{
DateFormat formatter ;
Date date, date1, date2, date3;
formatter = new SimpleDateFormat("yyyy-MM-dd");
date = [Link](newProjStartDate);
date1 = [Link](newProjEndDate);
[Link](this, "Anil date is =" + date, 1);
[Link](this, "Anil date1 is =" + date1, 1);
SimpleDateFormat formatterNew = new SimpleDateFormat("dd-MMM-yyyy");
sConvertNewStartDate=[Link](date);
sConvertNewEndDate=[Link](date1);
[Link](this, "sConvertStartDate date is =" + sConvertNewStartDate, 1);
[Link](this, "sConvertEndDate date1 is =" + sConvertNewEndDate, 1);
catch (ParseException e)
{
throw new IllegalArgumentException("Encountered Date format error "+ e);
}