Monday, July 23, 2012

Displaying BLOB stored image in OAF



Displaying BLOB stored image in OAF

Displaying an Image stored in the Database as BLOB on OAF Page
  1. Image Bean can display any image if the file is a physical operating system file.
  2. If the image is stored as a BLOB in database table, we need write java methods to display image.
  3. Following article clearly explains about writing   : servlet, jsp file to display a image in jsp file http://fdegrelle.over-blog.com/article-992927.html
       To display image in OAF you can make use of following code.

         imageBean1.setImageSource("/OA_HTML/image.jsp?imgID=164");

   4. Other alternative approach for showing the image in OAF page.

Follow this post of :  jujaar.singh @  https://forums.oracle.com/forums/thread.jspa?messageID=3474886&#3474886


To Change the default Oracle Logo on all OAF Pages

1. http://oraclemaniac.com/2012/02/22/change-the-default-oracle-logo-on-oracle-apps-login-page/

Saturday, July 21, 2012

ADF Deployment Steps

ADF Deployment Steps

1. Following the steps mentioned in the link @

http://www.oracle.com/webfolder/technetwork/jdeveloper/howto/11114/managedserver/wlsadfms.html

During the following step :

Select the Control tab followed by checking the box for the ADFServer and then select Start.

There are issues starting your ADF server.

The issue most probably because of the node manager.

Before starting it, Start your node manager.
Path for the node manager :   $MW_HOME\wlserver_10.3\server\bin\startNodeManager.cmd











After the above step then : Start your ADF Server




Friday, July 20, 2012

Steps to implement Subtab Region in OAF

Steps to implement Subtab Region in OAF

  1. Create a Page 
  2. From Page layout Region , create a new region , set region style as subTabLayout . 
  3. In property Pallette under Visual , Initial Subtab =  {mention the value : 0 if you want to show the 1st tab as default , 1 if you want to show the 2nd tab as default}
  4. Right Click SubTabRN and create as many regions as you want the tabs to be displayed 
  5. Right click on SubTabRN and Click on Subtabs it defaults subTabBar under subTablayoutComponents
  6. Create links as many regions that you created 
  7. Set destination URI property for links .
  8. Set the Visual Prompt Value for the links.
Note : No . of links under SubtabLayout = Number of Regions under SubTabRN



regards 
Rekha Kasyap .

Functions cannot be invoked from Select Query


Functions cannot be invoked from Select Query : if the function is having any ddl/dml operations inside it.

Example :


create or replace function xx_temp_fun(p_deptno number)
return char
is
begin
insert into xx_dept(deptno,dname) values (p_deptno,'Bench') ;
commit;
return 'x';
end ;
select xx_temp_fun(21) from dual; --> this will give you an error. as the function written above is having DML operations inside it.
The follow works without any error.
declare
v_char varchar2(10);
begin
v_char := xx_temp_fun(19);
end;



Wednesday, July 18, 2012

Create Train in OAF


Create Train Sample in OAF 

Following are the steps to create : Train Shared RN and  Train Footer RN

These regions should be added to the pages : deptPG & empPG to get the train region in the respective pages.

Step by Step Procedure
  1. Create a Page
  2. Create a new region -- set the region style to : train
  3. set the name of the train region to : trainRN
  4. select the trainRN. In the application Navigator pane set the : Allow Interaction Property to True.
  5. Save your work.

Add Train  Nodes

1. Right-click the : trainRN in the structure pane, and select New-->link from the context menu
2. Set item1's poperties as follows
   a. ID = link1
   b. Destination URI := OA.jsp?page=xx/oracle/apps/fnd/deptPG
   c. Text = Dept

3. Right-click the : trainRN in the structure pane, and select New-->link from the context menu
4. Set item1's poperties as follows
   a. ID = link2
   b. Destination URI := OA.jsp?page=xx/oracle/apps/fnd/empPG
   c. Text = Employee

Create your standalone Train Footer 
  1. Create an new region
  2. Set the region style to : pageButtonBar
  3. Set the ID: trainFooterRN
Add Navigation Bar to the above region : trainFooterRN

  1. Right Click and create a new region
  2. Set the region style to : navigationBar
  3. FirstStep=1 : LastStep=2
  4. Set the following properties
  5. Select New -- Link and set as follows :
    1. ID = link1
    2.  Destination URI := OA.jsp?page=xx/oracle/apps/fnd/deptPG
    3. Warn About Changes = False
  6. Select New -- Link and set as follows :
    1. ID = link1
    2. Destination URI := OA.jsp?page=xx/oracle/apps/fnd/ empPG
    3. Warn About Changes = False

Tuesday, July 17, 2012

Methods for : Create , Update , Delete in EO(Entity Object) in OAF

Methods for : Create , Update , Delete in EO(Entity Object) in OAF

1. Create : To  insert a new row in the EO based VO at last
    Use the below methods :
    /* Add New Row in the table */
    public void addNewRow() {
OADBTransaction txn = getOADBTransaction();
        EmpEOVOImpl vo = this.getEmpEOVO();
        vo.setMaxFetchSize(-1);
        EmpEOVORowImpl newAddRow = (EmpEOVORowImpl) vo.createRow();
        if (vo.getFetchedRowCount() < 1) {
            vo.insertRowAtRangeIndex(0, newAddRow);          
        } else {          
            vo.last();          
            vo.insertRowAtRangeIndex(vo.getRowCountInRange(), newAddRow);
            vo.next();        
        }//End else
    }//End addNewRow

2. For Update

/**to update the record **/
  public void updateRecord()
 {

  OADBTransaction txn = getOADBTransaction();
   txn.commit();
  }

3. For Deleting the selected row

public void deleteRow(Number   eno  )
 {
OADBTransaction txn = getOADBTransaction();
 EmpEOVOImpl vo = this.getEmpEOVO();
Rows [] rows = vo .getFilteredRows("Empno",  eno );
//the above object will contain the rows whose Empnois eno
EmpEOVORowImpl  empRow =null ; 
  for (int i=0;i< row.length; i++)
   {
     empRow =  rows[i];
     empRow.remove();
   }
   txn.commit();
}

  

Monday, July 16, 2012

OAF State Management

OAF State Management

In this post we will discuss what happens when OAF page is opened in the browser how the session is maintained etc.

Session Management for an OAF page starts int he following way.


  1. User opens the page by logging into the E-Business Suite.
  2. Session will be created in database at this point and a session cookie will be stored in the browser for the session.
  3. As we are aware that : OAF is purely built in Java, all the executions / transactions will be done inside JVM.
  4. OAF maintains following caches for ex :
    1. Root AM - 
      1. Each OAF page associates with Root AM. It contains the OADB transaction. This OADB transaction responsible for storing the data across EO and VO's. 
      2. Root AM is the first object to be loaded for OAF page to work. It obtains the Database connection and creates the transaction context.
    2. Servlet session : A servlet session is a mechanism for maintaining the state between HTTP requests during a period of continuous interaction between a browser and web application. 
    3. E-Business Suite
      1. User Session  :: ICX Session.
      2. When user logs into OAF page, OAF creates WebApps Context object and browser based session cookie.
      3. This session key is stored in Apps Database to track the user.
    4. Page Context
      1. Whenever the page is requested, OAF creates OAPage Context.
    5. Request
    6. All OAF pages run through OA.jsp --This JSP also has its own caches but its out of scope of our OAF.




Sunday, July 15, 2012

MVC- Model View Controller

MVC- Model View Controller


  1. Model(BC4J)- Business Components for Java
    1. AM - It is a container for EO/VO
      1. Provides the transaction context like maintaining session , database connection etc.
    2. EO - It represents the database tables and its rules.
      1. It provides functions CUD to perform on the table.
      2. Each EO corresponds to single table.
    3. VO- It is nothing but a SQL View written as SQL query to represent the data on the page.
      1. It can be based on EO or may be on a plain SQL
  2. View 
    1. Each component used in OAF page is built using Java Beans.
    2. These java beans create the HTML content at run time.
  3. Controller
    1. It handles user interaction / navigation on the page.

Architectural Components of OAF

Architectural Components of OAF


  1. Written in Java
  2. Uses Jdeveloper 10g with OAF Extension
  3. Uses the following components : 
    1. BC4J- Business Component for Java
      1. It provides the linkage between SQL components Tables, Views through  AM's, VO's , EO's 
    2. UIX- User Interface for XML(PG, RN files)
    3. AOL/J- Application Object Library for Java.
      1. It provides a number of E-Business specific functions.
    4. MDS- Meta Data Services(JDR tables in Database)
      1. All the Pages/Regions/Personalizations of OAF are stored in tables. These are retrieved on demand.

Personalization and Extension

Personalization and Extension in the context of OAF(Oracle Application Framework)

Personalization : The ability to modify the UI declaratively to meet the business requirements.

Extension : The ability to extend page functionality by modifying (java code) to meet the business requirements. 

Saturday, July 14, 2012

Terminologies


Understanding differences between the following : 

J2EE is an environment for developing and deploying enterprise applications. The J2EE platform consists of a set of services, application programming interfaces (APIs), and protocols that provide the functionality for developing multitiered, web-based applications.




Architecture: Architecture is the backbone of any application which can stand application up, this is basically the interaction between the different different component in specific and efficient manner along with your application business logic.

Framework:

Framework is set of reusable software program that forms the basis for an application. Frameworks helps the programmers to build the application quickly. Earlier it was very hard to develop complex web applications. Now its very easy to develop such application using different kinds of frameworks such as Struts, Struts 2, Hibernate,  JSF, Tapestry, JUnit, Log4j, Spring, OAF, ADF etc.
Design Pattern: Main use of design pattern is to avoid code duplication,to avoid maintenance and boost up the performance of an Application. now a days every framework is implemented on few basic design pattern  like 
1) MVC
2) Front Controller etc.

OAF(Oracle Application Framework) Knowledge.

OAF(Oracle Application Framework)  Knowledge.

1. Is pageContext() serializable ?
2. Can we send the pageContext() to AM through invokeMethod() ?
3. How can we construct an EO based on two tables?
4. Consider a scenario that you are performing an update on the data in the TableRegion and you need to pass the data which is changed ?? How can you find which Row's data is changed ?