Anil's Blog is Best Viewed on GOOGLE CHROME

Saturday, August 20, 2011

HelloWorld Page in ADF

Building HelloWorld Page in ADF Application

1.       Choose Application à New from the main menu and select Fusion Web Application (ADF) from Application Template.

Enter HelloWorld in the Application Name and in the Application Package Prefix enter:

Click Finish.

You will see Model and ViewController gets created in HelloWorld application. Now click on ViewController and choose New

1.       Navigate to Web Tierà JSFà and choose JSF Page from the Items list.

Enter “HelloWorld.jspx” in the File Name. Make sure that Blank Page is selected under Initial Page Layout and Content and under Page Implementation automatically expose managed bean is selected

Drag Decorative Box from the Layout option available in the Component Palate

Drag item of type Input Text*, Button* on the center facet and Output Text* on the top of the decorative box.

* Available under Common Components.

After this click on af:panelGroupLayout – scroll under center facet of af:decorativeBox and go to property pallete.

Set Halign = center. Repeat the same for af:panelGroupLayout – scroll under top facet af:decorativeBox.
Now double click on Go Button created on HelloWorld.jspx that opens the Bind Action property window as shown below.

Now write below code in above created method i.e.HandleGoBtn in backing bean.
public String HandleGoBtn() {
        // Add event code here...
        RichInputText inputText = getIt1();
        String name = "Hello "+(String)inputText.getValue()+ "!!";
        return null;

Save All and run the page by right  clicking on HelloWorld.jspx and select run.

You may download the application from here


Sunday, June 26, 2011

Restricted Access - Oracle Apps

Restricted Access means to provide application access to certain business user during downtime. We have achieved this functionality by customizing the AppsLocalLogin.jsp (Login page).

How it works 

After the restricted access is enabled then specific user will get a different or changed URL to login into application. However other users are not aware of this URL and when they will try to login into application then they will get a downtime message like:  

System is down for patching activity and will not be available this weekend.


Here is the list of steps which we need to perform for enabling restricted access on Production environment.

1. Prepare a DownTime.html file, with necessary down time messages. This html page is to be displayed to the end user during down time. Put this file under $OA_HTML top.

2. Take backup of $OA_HTML/AppsLocalLogin.jsp file.

3. Edit the AppsLocalLogin.jsp and add the below code:
String checkMode = request.getParameter("ReleaseCode");
                 String theURL = "/OA_HTML/DownTime.html";

Above code is checking for parameter ReleaseCode that is passed through URL and if it is null then it will redirect to DownTime.html page.

4. For restricted access, we need to login with below URL to have production access:

5. To restrict the form server access i.e http://host.domain:port/dev60cgi/f60cgi we need to perform below steps:

   1. Edit the XML system context file which, after setting your environment, will be referenced by the environment variable $CONTEXT_FILE
   2. Find the context variable called s_appserverid_authentication
   3. This will currently be set to "OFF". Change the value to " SECURE " and save the file changes.
   4. Run AutoConfig. The AutoConfig script is run as follows:
      11i: $COMMON_TOP/admin/scripts/[context name]

6. Bounce Apache.

To re enable normal access to application (Both forms and SSWA).

1. Restore the original AppsLocalLogin file.
2. Edit the XML system context file again and change the context variable “s_appserverid_authentication” to “OFF”
3. Run AutoConfig.
4. Bounce Apache.

There is one more way to achieve this functionality. Please refer to MOS Doc Id: 605538.1. Subject 11i - R12 - How to Lock Users Out Of E-Business Suite and Allow Specific Users

Also If you desire this functionality please ask oracle to add your request to Enhancement Request Bug 7356865. 


Thursday, June 16, 2011

Error: JSP files must reside in the server root directory or a subdirectory beneath it

We got this error when we we put the jsp in wrong directory. Ideally it should be under the path which is set in  HTML Root Directory under project properties in Jdeveloper.

For Jdeveloper 9i the path where we set the Html Root Directory is as follow:

Open project properties à  Common à Input Paths

For Jdev11G it is :  Open project properties Project à  Source Paths à Web Application. I have not check for Jdev10G but I think the path would be same.


Bypassing Oracle Home Page

A new feature is introduced after ATG RUP7 patch. Although it's a small thing however sometimes it really help us hence thought of sharing to all of us.

The Preferences Page includes the ability to set a default start page other than the E-Business Suite Home Page, based on responsibility, and the ability to set separate session and default language.

Hence when a specific user will login into Oracle Applications then the page will redirect to that specific page which was selected through Preferences Link.



Saturday, May 7, 2011

How to add ViewAttribute in ViewObject (VO) dynamically

We were having a requirement to add a column in an existing table region and client wants to show value in it based upon some calculation with other view attribute value.

At the first sight we thought of extending the ViewObject and adding a transient attribute.But that seems to be very complex process as this ViewObject is based on 5 EntityObjects.

So we thought of some workaround and come to a solution by adding a ViewAttribute in ViewObect dynamically.Here is the approach …

We have extended the Controller and add a ViewAttribute dynamically in the ViewObject and created a MessageStyledText bean through personalization.

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
    super.processRequest(pageContext, webBean);
    OAApplicationModule am =   (OAApplicationModule)pageContext.getApplicationModule(webBean);
OAViewObject vo = (OAViewObject)am.findViewObject("AllocationsVO1");
   if (vo != null)
   vo.addDynamicAttribute("XXSalary"); //Adding ViewAttribute to VO

     //Starting do-while for setting value in all the table row...
      //Doing some calculation...  
      int xxnumber =  Integer.parseInt(vo.getCurrentRow().getAttribute("Empno").toString());      
      double d  = xxnumber*(17.5/100)/2;
      String aString = Double.toString(d);
      //Setting the calculated derived value in the newly created VO Attribute 
      vo.getCurrentRow().setAttribute("XXSalary", aString);;
      while (vo.hasNext());

//Finally adding ViewAttribute and ViewInstance with MessageTextInput bean which we have created through personalization 
  OAMessageTextInputBean mst = (OAMessageTextInputBean)webBean.findChildRecursive("Salary");



Sunday, April 24, 2011

Integration of Oracle E-Business Suite and Oracle Application Development Framework (ADF)

This document covers Frequently Asked Questions for the combination of Oracle Application Development Framework (ADF) with Oracle E-Business Suite (EBS).

You can view this document using MOS Note id  Document 1296491.1 


Saturday, March 12, 2011