OAF Hello World Tutorial

1. Create a New OA Workspace and Empty OA Project

File> New > General> Workspace Configured for Oracle Applications

 

 

 

 

 

 

 

2. Set Run Options in OA Project Setting

Select Your Project in the Navigator and choose Project Properties

Select Oracle Applications > Run Options

Select OADeveloperMode and OADiagnostic, and move them to selected Options List

 

3. Create Application Module AM

 

 

 

 

 

4. Create a OA components Page

 

 

 

5. Modify the Page Layout (Top-level) Region

 

 

Attribute

Property

ID

PageLayoutRN

Region Style

pageLayout

Form Property

True

Auto Footer

True

Window Title

Hello World Window Title

Title

Hello World Page Header

AM Definition

prajkumar.oracle.apps.ak.hello.server.HelloAM

 

 

 

6. Create the Second Region (Main Content Region)

 

 

Attribute

Property

ID

MainRN

Region Style

messageComponentLayout

 

 

7. Create the first Item (Empty Field)

MainRN > New > messageTextInput

 

 

Attribute

Property

ID

HelloName

Style Property

messageTextInput

Prompt

Name

Length

20

Maximum Length

50

 

 

 

 

8. Create a container Region for Go-Button

MainRN > messageLayout

 

 

 

Attribute

Property

ID

ButtonLayout

 

 

 

9. Create a Second Item (Go Button)

Select ButtonLayout > New > Item

 

 

Attribute

Property

ID

Go

Item Style

submitButton

Attribute

/oracle/apps/fnd/attributesets/Buttons/Go

 

 

 

 

 

10. Save Your Work

 

11. Run Your Page UI is ready

 

12. Add a Controller

MainRN > Set New Controller

 

 

 

 

13. Edit Your Controller

Add Following OA Exception as a last line in import section

import oracle.apps.fnd.framework.OAException;

Add Following Code in processFormRequest

     public void processFormRequest(OAPageContext pageContext, OAWebBean webBean)
     {
            super.processFormRequest(pageContext, webBean);
             if (pageContext.getParameter("Go") != null)
             {
                     String userContent = pageContext.getParameter("HelloName");
                     String message = "Hello, " + userContent + "!";
                     throw new OAException(message, OAException.INFORMATION);
             }
     }
 
 
 
14. Build Your Controller
 
 
15. Test Your Work Your Hello World Page is Ready
 
 
 
 
 
 
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

Welcome to My Oracle World Puneet Rajkumar

Search

Categories
Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today