Download as txt, pdf, or txt
Download as txt, pdf, or txt
You are on page 1of 35

GUI Based toold

4 GL Wizard Based Developement

Rapid application development --

Easy to design and easy to deploy

Help System

Robust and multi threded editors

Dependent Analysis Framework

Debugger , profier, watchers, break points

Seem lesss and integrated and contextual linking editors

jdeveloper not specific to OAF

Inbuilt SQLDeveloper

What are major things we are working inside jdeveloper 10 g for OAF
---------------------------------------------------------------------

Connection Navigator :
--------------------

We can establsh the Database connections.

Application Navigator :
------------------------

We using we can required things to build application

like workspace,project, MVC Components...

Structure pane :
-----------------

We can Desin the page as per our requirements

property Inspector :
-----------------------
map the properties to correspondent item or region

Code Editor : (java editor)


-------------------------------

Using this we can write bussiness logic or triggers or anything..

Log Window
-------------------

Using this we can capture the errors or warnings or debug points..

We have inbuilT sqldeveloper inside jdeveloper...

Confirgure Jdeveloper - OAF


---------------------------

1) Identify and download the Correspondent Jdeveloper Patch


2) Extract the ZIP File
3) set the DBC File
4) set the environmental variables
5) take the short curt of jdevw.ex

Page Creation Steps


--------------------------

1) Create the OAWorkspace

2) Create the OAProject

3) Create the page

4) Create the Application Module

5) Add below properties to the page

AM Definition

Window Title

Compile the project


-------------------

go to project RC rebuild

how to run the page

Go to page RC Run

Rememeber

Package name should be lower case

Class Name should be init caps letters..

Java is case sensitive...

Delete DELETE

How to change the settins of project :


----------------------------------------

Double click on project

To change database connection :

1) Go to project and double click

expand Oracle Application in the right pane

Now you can able to change either runtime connections or database connection

How to filter particular files or folder inside your project


---------------------------------------------------------------

Double click on the project and see left side

project content and Right side included and excluded option.

Using that we can filter...

Very Important how to executed my code...


---------------------------------------------
I will send the daily folder to u i.e gt135 but it is zip

u need to exract and place gt135 folder inside myprojects location in your
system.

if workspace and porject not yet create then create new WORKSPACE AND PROJECT

Package Name : should be enter lower case

class Name : init Caps letters

By Default Set Every ONe

Tools -- Embededoc4jprefrences -- start up -- Select radio button default local


ip

Significance For Id's


---------------------------

Variable

1) a varchar c

2) b varchar c

3) c w -- Data type is not there

varchar w -- variable is not null


4)

5) c d varchar w -- we should not space

6) b varchar w -- Duplicate

7) x number c

8) varchar varchar --- w -- Keywords we should not use

following are right declaration


a) 1 2 7

b) 23 4

c) 1 7

e) 3 4 5 6

f) 2 7

g) a,c,f

Remember

Varaible Datatype

ItemId ItemStyle

EnterName MessageTextInput

Password MessageStyledText

Go Button

Item Id Or Region Id also same variable Rules

1) Should not use Keywords

2) should not null

3) shulud be unique entire page Level

4) should not allow spaces

5) should not extend morethan 256 NO. OF CHARACTERS

Always follow id should be meaningfull way either region level or Item Level...

Display Items
----------------

Remember -- Onething there is no drag and drop feature


Apart from we have everything...

Component List is Declarative....

Rich set of component and light weight components and includes rich features

We can't create item without region

default region is pagelayout region....

Text Input :
--------------

Free text item

Control item properties

Either design time or runtime...

Button--

there is no by default action

for any item apart from submit button -- Enter Action type as fire action to
write item level

triggers in oaf...

Submit button

by default action

For Images
--------------------

Extracted drive/Extracted Floder/jdevhome/jdev/myhtml/OAMedia

Go to css

generray www3schools.com
http://download.oracle.com/tech/blaf/specs/textstandards.html

Regions
--------

Its java class, which holds group of items or regions..

1) Using this can get the desired layout in the OAF

2) Naming Standard is RN

3) Regions follows java beans hierarchy

4) follows embeded or nested properties

5) Regions which are in the same node called it as sibblings and which are in the

inside of the node called it as childs or subregions

6) default region in the OAF Is Page Layout Region in THE OAF

7) We have 2 types of regions

Internal and External Regions

External Regions are reusable components in the OAF..

Different Regions
-------------------

Default Single Column

display items into single column with n no of rows

Default Double column

MessageComponent Layout

Bulleted List :

this container have the probisionary to dispaly the bullet mark for item.
Steps to Subtablayout Region :

-------------------------------

1) Create the region and Set the Region Style as Subtablayout

2)
a) Add the Sub Tabs Based on the Requirement

Process:

RC On Subtablayout Region -- Select New -- Select Subtabs

Then you can Subtablayout Components -- Select Subtabbar1

Now Right Click new -- Link and Enter the Text Property

Continue this process based on Requirement how many tabs u want to


display

b) Add the Subtab Information

Process :

RC on the Subtablayout region and select New Region as child , LIke that
add the

equal no of Child Regions based on the tabs which you created in the
subtabbar.

Note :

based on the tabs , Same no of child regions shlould be there

its Purely Positional based Linking......

View Object :
----------------

VO -- Select statement

Readonly VO -- DQL

Updatable VO -- DQL,DML
Poplist or Dropdownlist or Message Choice or PickList Item Steps
-------------------------------------------------------------------

1) Create the Item and Set the Item Style as MessageChoice

2) Prepare the ViewObject Using Below Package MOdel

tpidentifier.oracle.apps.applicationshortname.componentname.poplist.server

create vo

RC -- new View OBject

7 sub steps

1) enter the package name, vo name, type of the vo

2) Enter the Query and test the Query

SELECT
LOOKUP_CODE,
MEANING
FROM
FND_LOOKUP_VALUES_VL
WHERE
LOOKUP_TYPE = 'TITLE'

then click next upto finish

3) Add Below Properties to Correspondent Message choice Bean Item..

1) Picklist View Definition : PacakageName.className

gt135.oracle.apps.po.demomgmt.poplist.server.TitleVO

2) Picklist Display Attribute : What You want to show Generally meaning

3) PickList Value Attribute. : What you want to Save Generrally Lookupcode

Copy the packageName


----------------------------

Go to VO -- RC - Refactor-- Move

gt135.oracle.apps.po.demomgmt.poplist.server
Copy the CalssName
---------------------

Go to VO -- RC - Refactor-- ReName

TitleVO

Attributes also copy paste


---------------------------

Copy the Attribute


---------------------

Go to VO in the structure pane see Attribute

Select Attribute -- property Inspector highlighted now , Go to name property

copy the attribute Name.

For Example

LookupCode

display initilal Value


-------------------------

Intial value property -- Give name of Value Attribute what u entered

How to modify the query


---------------------------

Double click on VO -- Select Sql Statement -- Change the query and click Apply

UseCase :

I want to add Static list

LOV Creation Steps


--------------------

Lov We can build 2 ways

Internal Region :
--------------------
1) Create the item and set the item Style as messageLovInput

--item holds Automatically

--list of values region and lov mappings

2) Prepare the View Object Using Below package Model

tpidentifier.oracle.apps.applicationshortname.lov.server

3) shuttle VO to AM

Navigation
-------------
Double click on AM

Check Data Model Selected

Expand package and Select VO

-- Shuttle By Clicking Right Arrow in the Wizard(Then It will Create


ViewInstance)

4) add vo to internal list of values region using viewinsatnce via wizard option to
correspndent Lov Inuput Item

Navigation
-------------

Go to Internal List of Values Region

RC -- New Table Using wizard

click next

Select AM and selct view instance


and click next

Now Change Region Name-- Click Next

Select filter the columns based on your interest and shuttle to right
side

Click Next and finish

5) Set one of the Lov Region Item Property

Search Allowed -- True

6) Set Lov Mappings

Navigation : Expan Lov Item -- Expand --Lov Mappings -- LovMap1


----------------------------------------------------------------

Lov Region Item -- Which column you want to return [it will show Lov Region
Item Id's]

Return Item -- Where u want to dispaly in the page item[it will show Page
Item Id's]

Criteria Item -- Which item holds correspondent list of values region


[it will show Page Item
Id's]

Optionally multiple lovmaps based on your requireement

Second lov map onwards we required only lov region item and return item
properties

External Regions
--------------------

1) Create the item and set the item Style as messageLovInput

item holds Automatically

list of values region and lov mappings

2) Prepare the View Object,Applicaton Module Using Below package Model

tpidentifier.oracle.apps.applicationshortname.lov.server

3) shuttle vo to related am

Navigation
-------------
Double click on AM

Check Data Model Selected

SELECT VO -- SHUTTLE BY CLICKING RIGHT ARROW IN THE WIZARD THE IT WILL


CREATE

vIEW INSTANCE

4) Create External list of values Region

Region Name : Meaningfull Name

package : tpidentifier.oracle.apps.applicationshortname.lov.webui

Style : List of Values

Naviagation : package -- Rc _ New - OAComponents -- Region


5) Set 2 properties to External List of Values Region

Scope : public

AMDefinition : Related AM

Nav : Select Region Search properties property inspector

6) add vo to Externnal list of values region using viewinsatnce via wizard option

Go TO External list of values region and see structure pane

rc -- new table using wizard

click next

Select AM and selct view instance


and click next

Select Some columns and shuttle to right side

next and finish

7) Set one of the Lov Region Item Property

Search Allowed -- True

8) Add External List of Values Region to Correspondent Lov INput Bean item Using
External
Lov Property

9) Set Lov Mappings

Lov Region Item -- Which column you want to return

Return Item - Where u want to dispaly in the page item

Criteria Item -- Which item holds correspondent list of values region

Optionally multiple lovmaps based on your requireement

Second lov map onwards we required only lov region item and return item
properties

External Region Approach is the Best Practise

and
Improves -- Performace, Resuablity, Maintaince Simple.

Important Properties of LOV


------------------------------------

Selective Search Criteria :

it will make mandatory on search criteria -- property applicable on

item level

Disable Validation :

it stop Lov Select Event

Profile Name : Look ahead Enable

Dependent Lov
--------------

We can do in 2 ways

Declarative Approach :

------------------------

Remember already 2 lov's created but both the queries one common column sholud
be there

1) Create one Item in the PageLayout Region and set the item Style as FormValue

Enter the Id and prompt

2) Create one Lov Map on Master Lov Item

Set the properties of LovMap -- Region Item

Return Item

In THIS EX : RI -- OrganizationId ReturnItem -- OrgIdFV


3) Create one Lov Map on Dpendent Lov Item

Set the properties of LovMap -- Region Item -- organizatioId

Criteria Item -- OrgIdFV (207)

Where OrganizationID = :OrgIdFV

Concepts --

Introduction :

Guide MVC Lines

Jdeveloper -- Instal
Page creation

Display different items and diffent layout sylte i.e regions

poplist creation

lov -- INternal,external,Dependent lov

Proramatic Approach

Controller :
------------------

Its plain Java class ,Using this we can capture the User Events or Actions.

Java : Section

Prorgam Signature

documentational Section
single, multiple,documentational

U can use comments any where in program

Package Section

Import Section

Class Section

//

/*
Autohr : Venkat

creationDt :

Version :*/

/**

**/

package ind.ap.hyd.yousfuguda

import java.util.Date;

import java.sql.SQLException;

public Class GouthamTechnolgoies

int Fee = 10000;

String Flag = "N"'

public void getBatchInfo(String cName)


{
logic

Method Signature :
-------------------

AccessspecifierName return type methodName(ArugmentList)


{
}
AccessspecifierName :
public ,private,protected,default

retrun Type :

Method may return or may not return the values

Returns the Value : Return type should be based value which is


returning the function

once you return , inside one return statment should be there

doesnt return the Value : void

create or replace function getBatchInfo(cName varchar2) return Number


is
L_RES VARCHAR
BEGIN

L_RES := 'Welcome To '||cName;


RETURN L_RES;
END;

IN java
------- Datatype variable,Datatype variable

public void getBatchInfo(String cName,String month)


{
String l_res = null;

Date date ;
l_res = "Welcome To "+cName;

// return l_res;

public void method2()


{

public void method3()


{

}
.
.

..

For Java Basics :

Refer : http://www.tutorialspoint.com/java/java_basic_syntax.html

Package : Which holds related group of classes or interfaces

Class : Whilch holds, members and member functions

variables and methods

Method : piece of business logic

Where I want to write


---------------------------

As per General OA Standards , we need to write business logic inside Application


Module

AMImpl.java

When You Want to Execute


-----------------------------

CO.java

Without Controller we can execute Based on the Action Listener or Event


Listner

Rule 1 :
-----------
1) Based on method definition we need to return same datatype of values

2) Definition we need to passs the parameters

Call by Value

Call by Reference

create or replace function getBatchInfo(cName varchar2) return Number


is
L_RES VARCHAR
BEGIN

L_RES := 'Welcome To '||cName;


RETURN L_RES;
END;

Call by Value :
------------------

SELECT getBatchInfo('Gotham Tech') from dual

var x

SELECT getBatchInfo(x) from dual

package hyd.yusufguda;

public class GouthamTech


{

String address;

public List getListofCourses() {

myList.add("OAF");
myList.add("ADF");
myList.add("SOA");
myList.add("BPEL");
System.out.println("SIZE OF LIST IS "+myList.size());
return myList;

}
General Rule for no of cases is Using object :

For example Other Class is

package hyd.common.util;

import hyd.yusufguda.GouthamTech;

public classs Ameerpet


{

public list getInstitueInfo(String instName)


{

if(instName.equals(GouthamTech))
{

GouthamTech inst= new GouthamTech();

GouthamTech inst1= new GouthamTech();

GouthamTech inst2= new GouthamTech();

inst.address
inst.getListofCourses("xx");

What is Obect :
------------------

Object is nothing but as phisical enitity

Using this we can call methods,members of Class which is refering by object

Remember :

We can create no of object for single class.


4 Syntax's
-----------------------

1) Create object for General Java class

ClassName objectName = new ClassName()

2) Create the object For Applicaton Module


--------------------------------------------

OAApplicationModule objref = pageContext.getApplicationModule(webBean);

For Example :

OAApplicationModule am = pageContext.getApplicationModule(webBean);

3) Create the Object View Object


-----------------------------------

OAViewObject objref =findViewObject("Veiwinstance")

For Example

ViewObject : SupplierVOImpl

viewinstance Name : SupplierVO1()

OAViewObject vo =findViewObject("SupplierVO1")

4) Create the Object For Item style or Region Style


-----------------------------------------------------

ItemStyleName objref = (ItemStyleName) webBean.findChildRecursive("ItemId");

or

RegionStyleName objref = (RegionStyleName)


webBean.findChildRecursive("RegionId");

For Example :

Remmeber : All Generic classes which belongs to OAF, prefix should be OA , and
suffix should be Bean for all itemstyles or region style
Item Style : OAMessageTextInputBean

Item Id : UserName

OAMessageTextInputBean bean= (OAMessageTextInputBean)


webBean.findChildRecursive("UserName");

Region Style : OAMessageComponentLayoutBean

Region Id : UserDetailsRN

OAMessageComponentLayoutBean
bean= (OAMessageComponentLayoutBean
) webBean.findChildRecursive("UserDetailsRN");

As per OAF , Generally we need to write the methods in AMImpl

Controller
------------

Its a plain java class,which holds action listners or event listners.

Which directs application flow

Naming standard CO

file extension is "Java"

Basically controller have below methods

1) processRequest( OAPageContext pageContext,OAWebBean webBean)

2) processFormRequest( OAPageContext pageContext,OAWebBean webBean)

3) processFormData( OAPageContext pageContext,OAWebBean webBean)


For our custom pages we can see only 1,2 , we can't see 3rd one

1) processRequest
--------------------

which executes before page rendered

pre form trigger

WHEN -NEW FORM INSTANCE,Before report trigger

do get Method

2) processFormRequest :
---------------------------

this phase executes after page loading, should be required human interaction

when new button pressed,when validate item

Note :

By Default Each Method have 2 arguments

OAPageContext (httpRequest) :
------------------------------------

1) to get, put the values from form fields, to get page Context information

2) read fnd dictionary

3) dispaly the messages on the page

4) Get the Application Context

loginuser,resp,profile,orgid-- etc
5) Can able to call the pages one page page

OAWebBean (httpResponse)

how to create a controller for a page


--------------------------------------

Generally go to region (pagelayout)

RC -- Set New Controller

Enter the controller Name

Enter the package name

How to call AM Methods inside a controller :


-----------------------------------------------

sop -- ctl+Enter ---

navigation

tools -- preferences -- code editor -- code templates

add your own short codes

how can validate a submit button inside controller


-----------------------------------------------------

if(pageContext.getParameter("SubmitbuttonItemId")!=null)
{

}
how can u validate a item level (Event Listners) inside controller
---------------------------------------------------------------------

Apart Form Submit Button , We didn't get any action fro any other item

Get the Action for any other item :

Action Type : Fire Action/Fire Partial Action

Event :

Parameters :

Submit : True

Syntax :
--------

First write below 2 lines in the processFormRequest Method of respective


handler

String event =pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM);

String source =pageContext.getParameter(OAWebBeanConstants.SOURCE_PARAM);

if("eventName".equals(event) && "sourcename".equals(source))


{

EventName : Entered By the Develoeper

sourceName : ItemId/Region Id
As per standards :

Generally we will write logic in Application Module

Execute From controller

Call the AM Method From Controller


------------------------------------------------

Without parameters ::
----------------------

using object of AM

invokeMethod("methodName")

with parameters :
-------------------

1) using object of Serializable, construt the params

Serializable[] params = {par1,par2,par3....};

2) Call the method using object of AM and pass parameters

invokeMethod("methodName",params)

custFunc retun number

to_char(customFunc)

Query Region ;
------------------

Importance of the query region is to build the search form quickly..


can build in 2 approaches

Approach 1 :
--------------

1) create the Region and set the Region style as query

2) Prepare the vo and shuttle VO to AM

3) Add vo to Query Region Using view instance via wizard option

Navigation :
------------
Go to Query Region -- RC --
New Region Using Wizard

select the AM-- Select the View Instance

click next

Change Region Name and Style -- table

click next

Filter the columns

click next

Change the prompts or item style -


MessageStyledText

Click Next and Finish

4) Add below properties to Query Region

Contruction mode : Results based search


include simple panel : true
include view panel : true
include Advanced panel : true

Optionally Go with below properties :


--------------------------------------

Search By params :
-------------------------

Go and set search allowed -- true -- for item

intial panel -- advanced


Check the Table properties

Width

Record Displayed

Check the Table Column Properties

check the sort allowed, intial Sort Sequence,

Approach 2 :
------------

1) create the Region and set the Region style as query

2) Prepare the VO and Shuttle VO to AM

3) Add VO to Query Region Using view instance via wizard option

Navigation :

Navigation :
------------------
Go to Query Region -- RC --
New Region Using Wizard

select the AM-- Select the View Instance

click next

Change Region Name and Style -- table

click next

Filter the columns

click next

Change the prompts or item style -


MessageStyledText

Click Next and Finish

4) Add below properties to Query Region

Contructionmode : Auto Customization Criteria


include simple panel : true
include view panel : true
include Advanced panel : true

5) a) Construct Search Panel


------------------------
Go to QueryRegion -- RC - new - Simple Search Panel
Add your items

RC -- New Item -- Change item style and all...

b) Construt the search Mappings


-------------------------------

Go to QueryRegion -- RC - new - Simple Search Mappings

Add Your Search Mappings

Go to SearchMappings -- New -- querycriteriaMap

Enter Search Item -- SearchPanelId

Result Item -- QueryPanelResultsItemId

Manual Search Page Creation


----------------------------

1) Design the Layout as per the Requirement Using View Components

2) Build Required Model Components Like VO,EO,AM .. etc

3) do the bindings if required (View Instance and View Attribute)

4) Control the Bussiness Flow Using Controller...

SELECT
FS.SUPPLIER_ID,
FST.SUPPLIER_SITE_ID,
FS.NAME SUPPLIER_NAME,
FST.SITE_NAME,
FST.ADDRESS_ID,
FST.CARRIER_CODE,
FST.PURCHASING_SITE_FLAG,
FST.PAYMENT_TERMS_CODE,
FS.START_DATE,
FS.END_DATE,
FS.ON_HOLD_FLAG
FROM
FWK_TBX_SUPPLIERS FS,
FWK_TBX_SUPPLIER_SITES FST
WHERE
FS.SUPPLIER_ID = FST.SUPPLIER_ID
and
FS.SUPPLIER_ID like nvl(:1,FS.SUPPLIER_ID)
and
FS.NAME like nvl(:2,FS.NAME)
and
nvl(FS.START_DATE,sysdate) >= nvl(:3,nvl(FS.START_DATE,sysdate))
and
NVL(FS.ON_HOLD_FLAG,' ') = nvl(:4,NVL(FS.ON_HOLD_FLAG,' '))

Onion Sturcture :
------------------

As per Onion Layer , we are buiding VO Based on EO's , this is called updatable
ViewObject

we can map VO's to Binding Layer Using view Instance -- that means we need to
add VO's to AM

As per onion Rules

1) Each Layer should know about underlying layer

Entity Object :
--------------

its a table or view or synonym , Using this we can perform DML Operations

Class Naming Standard is Eo

Package Naming Standard is .....schema.server

Entity Object Have Below Life Cycle Methods

Acessors,create,validateentity,remove,doDML

One to One RelationShip

Must and should hold the WHO Columns which are the tables refered by Enity Object

Navigation :
---------------
New Entity Object

clik next

EntiyObjectName

Package Name

Table Name

Schema Name

clik next

clik next

clik next

Select All Check Boxes

clik next

Check the Default View Object

VO Name

Pakcage Name

clik next -- Finish

Updatable View Object :

We can build the query Based on Entity object's

Updatable VO Can be created in 2 Options

1) Wizard

Test the VO's Using AM


-------------------------
We have bc browser to test automatically VO'S Which holds by AM Container

Build Manual Master detail Page Perform Insert OPeration


------------------------------------------------------------

1) Design the Layout as per the Requirement Using View Components

2) Build Required Model Components Like VO,EO,AM .. etc

3) do the bindings if required (View Instance and View Attribute)

4) Control the Bussiness Flow Using Controller...

Advanced Table Creation :


----------------------

Validations :
--------------

BC4J, CO
-----------------

EO -- Declarative

Database
--------------------

You might also like