Following is step by step guide to accomplish a requirement where you have to set a default value for a Text input field in OAF:
1. Create a New OA Workspace and Empty OA Project
File
> New > General > Workspace Configured for Oracle Applications
File
Name – XxcustSetDefaultValDemo
Automatically
a new OA Project will also be created
Project
Name -- SetDefaultProj
Default
Package -- xxcust.oracle.apps.fnd.setdefaultproj
2. Create Application Module AM
Right
Click on SetDefaultProj > New > ADF Business Components > Application
Module
Name
-- SetDefaultAM
Package
-- xxcust.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
-- xxcust.oracle.apps.fnd.setdefaultproj.webui
4. Select SetDefaultPG and go to the structure 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
|
xxcust.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 -- xxcust.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);
{
super.processRequest(pageContext, webBean);
String
myValue = "My Default Value";
OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId");
OAMessageTextInputBean textBean = (OAMessageTextInputBean)webBean.findChildRecursive("MyTextitemId");
textBean.setValue(pageContext,
myValue);
}
}
11. Test Your Work
Some Other Most Useful OAF Tutorials:
- How To Call A Concurrent Program From OA Framework Pages
- How To Call A PL/SQL Procedure From An OAF Page
- How To Change The Header Of An Advance Table Column Dynamically
- How To Create A Submit Button Dynamically In OAF Page
- How To Implement Train In OAF | Implementation Of Train Functionality In OAF
- How To Import Oaf Pages From Unix Server Or Apps server.
- Implement PopList in OA Framework | OAF Tutorials
- Implementation of PPR [Partial Page Rendering] in OAF Page
- OA Framework Interview Questions And Answers - Part1
- VO Extension In OAF | Hiding An Item Conditionally Through SPEL In OAF
COMMENTS