Wednesday Aug 01, 2012

Set Default Value for messageTextInput in OAF

1. Create a New OA Workspace and Empty OA Project

File > New > General > Workspace Configured for Oracle Applications

File Name – PrajkumarSetDefaultValDemo

 

Automatically a new OA Project will also be created

 

Project Name -- SetDefaultProj

Default Package -- prajkumar.oracle.apps.fnd.setdefaultproj

 

2. Create Application Module AM

Right Click on SetDefaultProj > New > ADF Business Components > Application Module

Name -- SetDefaultAM

Package -- prajkumar.oracle.apps.fnd.setdefaultproj.server

Check Application Module Class: SetDefaultAMImpl Generate JavaFile(s)

 

3. Create a OA components Page

Right click on SetDefaultProj > New > Web Tier > OA Components > Page

Name -- SetDefaultPG

Package -- prajkumar.oracle.apps.fnd.setdefaultproj.webui

 

4. Select SetDefaultPG and go to the strcuture pane where a default region has been created

 

5. Select region1 and set the following properties:

 

Attribute

Property

ID

PageLayoutRN

Region Style

pageLayout

Form Property

True

Auto Footer

True

Window Title

Set Default Value Window Title

Title

Set Default Value Header

AM Definition

prajkumar.oracle.apps.fnd.setdefaultproj.SetDefaultAM

 

6. Create the Second Region

Right click on PageLayoutRN > New > Region

 

Attribute

Property

ID

MainRN

Region Style

messageComponentLayout


7. Create messageTextInput

MainRN > New > messageTextInput

 

Attribute

Property

ID

MyTextitemId

Style Property

messageTextInput

Length

20

Maximum Length

50

 

8. Save Your Work

 

9. Add a Controller

MainRN > Set New Controller

 

Package Name -- prajkumar.oracle.apps.fnd.setdefaultvaldemo.webui

Class Name -- SetDefaultValCO

 

10. Edit Your Controller

Add Following Code in processRequest

 

import oracle.apps.fnd.framework.webui.beans.message.OAMessageTextInputBean;

public void processRequest(OAPageContext pageContext, OAWebBean webBean)
{
 super.processRequest(pageContext, webBean);

 String myValue = "My Default Value";
 OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId");

 textBean.setValue(pageContext, myValue);
}

 

11. Test Your Work

 

About

Welcome to My Oracle World Puneet Rajkumar

Search

Categories
Archives
« August 2012 »
SunMonTueWedThuFriSat
   
2
3
5
7
8
9
10
11
12
13
14
16
17
19
20
21
22
23
24
25
26
27
28
29
30
31
 
       
Today