Friday, January 2, 2015

Hello World Page


Step 1: Create a New OA Workspace and Project

Go To "Application Navigator" Tab and Right click on "Applications", Select "New OA Workspace"


Enter "OA Workspace Name" and click "OK"


Click "Next"


Enter "Project Name" and "Default Package" and Click "Next"


Check the "Use Repository for Design Time" check box.


Select the DB Connection.


Connection

Browse the DBC File and enter the applications User Name, Password, Application Short Name and Responsibility Key and Click "Next"


Click "Finish"


Step 2: Set Run Options

Select your Project, Right Click on that and select “Project Properties”.



Select “Run Options” under “Oracle Applications”.
Select “OADiagnostic” Move to right and Click “OK”.



Step 3: Create AM (Application Method)

Right click on Project (HelloWorldProject) -> New


Select Business Tier -> ADF Business Components -> Application Module



Click OK and Next



Enter Package Name and Application Method Name



Click Next



Click Next



Click Next



Click Next and Finish



Step 4: Create a Hello World OA Page

Right click on Project (HelloWorldProject) -> New


Web Tier -> OA Components -> Page and Click OK


Enter Page Name and Package



Step 5: Modify Page Layout Regions



Update regoin1 properties

Attribute
Property
ID
PageLayoutRN
Region Style
pageLayout
Form Property
TRUE
Auto Footer
TRUE
Window Title
Hello World Page Window Title
Title
Hello World Page Title
AM Definition
oracle.apps.fnd.helloworld.server.HelloWorldAM


Step 6: Create Region for Text Item, Button Layout & Button

Right click on PageLayoutRN -> New -> Region


Update Region Properties

Attribute
Property
ID
MainRN
Region Style
messageComponentLayout


Step 7: Create Text Input Item

Right Click on MainRN -> New -> messageTextInput


Update Text Input Item Properties

Attribute
Property
ID
UserName
Style Property
messageTextInput
Prompt
User Name
Length
20
Maximum Length
100


Step 8: Create Container Region for Button


Update Region properties

Attribute
Property
ID
ButtonLayout


Step 9: Create Go Button

Right Click on ButtonLayout -> New -> Item


Update Item Properties

Attribute
Property
ID
Go
Item Style
submitButton
Attribute
/oracle/apps/fnd/attributesets/Buttons/Go


Step 10: Add a Controller

Right Click on MainRN -> Set New Controller


Enter Package Name and Controller (Class) Name


Step 11: Edit Controller Java Codes

Add Following OA Exception as a last line in import section

import oracle.apps.fnd.framework.OAException;


Replace processFormRequest code with the following

     public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
     {
            super.processFormRequest(pageContext, webBean);
             if (pageContext.getParameter("Go") != null)
             {
                     String userContent = pageContext.getParameter("UserName");
                     String message = "Hello, " + userContent + "!";
                     throw new OAException(message, OAException.INFORMATION);
             }

     }


Step 12: Save your Work and Run the HelloWorldPG.xml





Congratulations, You have done it!

2 comments:

  1. Sankar, very good document and very helpful :)

    ReplyDelete
  2. Regards
    Sridevi Koduru (Senior Oracle Apps Trainer Oracleappstechnical.com)
    LinkedIn profile - https://in.linkedin.com/in/sridevi-koduru-9b876a8b
    Please Contact for One to One Online Training on Oracle Apps Technical, Financials, SCM, SQL, PL/SQL, D2K at training@oracleappstechnical.com | +91 - 9581017828.

    ReplyDelete