0% found this document useful (0 votes)
86 views

Implementing A Search Page:: After You Click, You Will See The

This document provides steps to implement a search page in Oracle Application Development Framework (ADF) as follows: 1. Create an ADF workspace and project in JDeveloper. 2. Create business component packages for client objects, server objects, and an entity object mapped to a database table. 3. Create the root application module and add the view object to it. Passivation should be enabled for the root application module. The steps cover creating the necessary ADF model components like packages, entity objects, view objects, and application modules to build the foundation for developing the search page.

Uploaded by

Venkat Chowdary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
86 views

Implementing A Search Page:: After You Click, You Will See The

This document provides steps to implement a search page in Oracle Application Development Framework (ADF) as follows: 1. Create an ADF workspace and project in JDeveloper. 2. Create business component packages for client objects, server objects, and an entity object mapped to a database table. 3. Create the root application module and add the view object to it. Passivation should be enabled for the root application module. The steps cover creating the necessary ADF model components like packages, entity objects, view objects, and application modules to build the foundation for developing the search page.

Uploaded by

Venkat Chowdary
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 21

1

Implementing a Search Page:


-Open the Jdeveloper
-Create a New OA Workspace and Empty OA Project
Select File > New> General > Workspace Configured for Oracle pplications>ok
(any name s okay !or a workspace" s#ch as cr#d$jws%
A!ter yo# clck O!" yo# wll see the Oracle pplications Pro"ect Wi#ard
and &ve the name o! the project as shown 'elow(
Clck ne)t * ne)t
check the $se %epositor& for 'esign (ime check 'o) and provde connecton n!ormaton n Step
+ and select the connecton as connection)
Green*O*+"pr
apc+oracle+apps+ak+greenmom

+

,
Place the -.C !le n the drectory
C(/J-/jdevhome/jdev/d'c0!les/sec#re/mercur&,+apc+com-carl.+d/c
nd select t as shown n the a'ove screen$( 1or Oracle E-.#sness S#te developers
#sn& a central2ed J-eveloper NetApp envronment" yo#r -.C !les are located n the
(/#sers/d'c0!les/sec#re/ drectory %
select yo#r project (myproject$jpr%n the Nav&ator and choose Pro"ect Settings !rom the
conte)t men#" or do#'le-clck on yo#r project$

Select
OA-eveloper3ode and OA-a&nostc" and move them to the On Options 0ist as shown a'ove

4
Create 5o#r Pa&e6s 3odel Components(
12C34 Package for Client o/"ects 5O6s7 *++8
Select the m&pro"ect+"pr project n the Na9igator" r&ht-clck and select New
2usiness
Components Package !rom the conte)t men#$
78! the Welcome pa&e appears n the .#sness Components Packa&e W2ard" select
Ne:t$
7Enter apc:+oracle+apps+ak+emplo&ee+ser9er as the packa&e name$
Apc$oracle$apps$ak$&reenmom$server
79er!y that the rado '#tton ;ntit& O/"ects mapped to data/ase schema o/"ects
s selected$
7Select Ne:t$
7Select the Finish '#tton to create the packa&e
fter creating7 &ou must /e a/le to see:

:
Create the 2C34 Package for Ser9er O/"ects: 1 ;O6s7 ++8
- Select the m&pro"ect+"pr project n the Na9igator" r&ht-clck and select New 2usiness
Components Package !rom the conte)t men#$
- 8! the Welcome pa&e appears n the .#sness Components Packa&e W2ard" select
Ne:t$
- Enter apc:+oracle+apps+ak+schema+ser9er as the packa&e name$
apc$oracle$apps$ak$schema$server
- 9er!y that the rado '#tton ;ntit& O/"ects mapped to data/ase schema o/"ects s
selected (yo# wll not 'e a'le to create yo#r entty o'ject n ths packa&e ! yo# !al to
do ths%$
- Select the Finish '#tton to create the packa&e
Create <our %oot $I pplication *odule 1*8: 1re!er to onon da&ram%
Select the
=yourname>+oracle+apps+ak+emplo&ee+ser9er1apc:+oracle+apps+ak+emplo&ee+ser9er8 .C4J
packa&e n the Na9igator" r&ht-clck and select New pplication *odule+++ !rom the conte)t
men# to open the Applcaton 3od#le (A3% w2ard$
- 8! the Welcome pa&e appears" select Ne:t$
- 8n the Name pa&e" spec!y *ain* as the A3 name and ver!y that the Package s
apc:+oracle+apps+ak+emplo&ee+ser9er
-Clck the Ne:t '#tton #ntl yo# &et to Step 4 o! 4$
- 8n the 4a9a pa&e" select the Generate 4a9a File1s8 check'o)$
- Select the Finish '#tton to create the A3$

;
.files are created /& the I'; on creation of * as shown 'elow:
i8 *ain*+:ml
ii8 *ain*Impl+"a9a1'eca#se o! selectn& the Generate 4a9a File1s8 check'o)8
;na/le Passi9ation for the %oot $I pplication *odule
Passvaton sho#ld 'e ena'led !or all root <8 applcaton mod#les$
Note that passvaton s not !#lly s#pported n release 11$:$1= prod#cton> ths s ncl#ded !or
prevew p#rposes$
- Select the *ain* applcaton mod#le n the Na9igator" r&ht-clck and select ;dit
*ain*+++ !rom the conte)t men#$
- 8n the pplication *odule Wi#ard" nav&ate to the Properties pa&e$
- 8n the Name !eld enter %;(;N(ION-0;5;0$
- 8n the 5alue !eld enter *NG;-S((;$
Warning: yo# m#st match the case and spelln& e)actly as shown$
- Select the dd '#tton$
- Select the ppl& '#tton$
- Select the O! '#tton to close the pplication *odule Wi#ard wndow

?
/out passi9ation:
@he process o! savn& applcaton state to a secondary med#m (n the case o! OA 1ramework"
data'ase ta'les% s called passvaton$
OA
@he process o! savn& o'ject state to a secondary med#m$ @hs s smlar to Java 8BO seral2aton" '#t
passvaton s a more &enerc concept$ Seral2aton s one way to save data$
Consder a m#lt-pa&e p#rchase order creaton !low where the #ser descr'es the order n the !rst
pa&e" enters one or more lne tems n the second pa&e" and revews the order 'e!ore s#'mttn& t n
the thrd pa&e$ @he p#rchase order data (ts state% m#st reman ntact 'etween each o! the 'rowser
reC#ests !or the transacton to 'e completed s#ccess!#lly$
NO@E(--*Set the Aetenton Devel !or root applcaton mod#les only$ -o not set t !or nested
applcaton mod#les as ther passvaton 'ehavor s determned 'y the root applcaton mod#le6s
con!&#raton$ 1or e)ample" do not set ths property !or applcaton mod#les assocated wth DO9s
and attachment pa&es as these applcaton mod#les are nested #nder the man pa&e6s root applcaton
mod#le$ Eowever" 'eca#se they are passvated wth the root applcaton mod#le" nested applcaton
mod#les m#st o'serve all the state mana&ement codn& standards$
Set each root applcaton mod#le6s Aetenton Devel to 3ANAFE0S@A@E$
Aeason why---* @hs allows OA 1ramework to recover connectons and memory #nder reso#rce load"
s#pport sesson !alover" and other pendn& !eat#res s#ch as Save 1or Dater and J93 !alover

G
Creation of ;ntit& o/"ect1;O8 : 1re!er to onon da&ram%
Create an entty o'ject (EO% !or the FW!-(2>-;*P0O<;;S ta'le n the OA 1ramework
@ool.o) @#toral schema$
- Select the apc:+oracle+apps+ak+schema+ser9er .C4J packa&e n the Na9igator"
r&ht-clck and select New ;ntit& O/"ect+++ !rom the conte)t men# to open the Entty
O'ject w2ard$
- 8! the Welcome pa&e appears" select Ne:t$
- 8n the Name pa&e(
Enter ;mplo&ee;O n the Name !eld$
9er!y that the Packa&e s apc:+oracle+apps+ak+schema+ser9er$
8n the Schema O/"ect !eld" enter FW!-(2>-;*P0O<;;S$ 5o# m#st type ths
name correctly$ Otherwse" yo# can check the S&non&ms check 'o) (so 'oth
(a/les and S&non&ms are checked% and choose the correct name !rom a very
lon& lst$
- Select the Ne:t '#tton twce to nav&ate to the ttri/ute Settings pa&e (note that all the ta'le6s
col#mns are a#tomatcally ncl#ded as attr'#tes" whch comples wth the OA
1ramework 3odel Codn& Standards !or Entty O'jects$
- 9er!y that the ;mplo&eeId attr'#te6s Primar& !e& check 'o) s selected$ -o not
chan&e any other de!a#lt settn&s$
- Select the Ne:t '#tton$
- 8n the 4a9a pa&e" select the Generate 4a9a File check 'o) !or the ;ntit& O/"ect Class:
;mplo&ee;OImpl (yo# wll add '#sness lo&c to ths Java !le n a later e)ercse%$
-8n the Generate *ethods re&on" check the ccessors7 Create *ethod7 5alidation
*ethod and %emo9e *ethod check 'o)es$
-Select the Ne:t '#tton$
-8n the Generate pa&e" deselect the Generate 'efault 5iew O/"ect check 'o) (or" ver!y
that t s not selected%$
-Select the Finish '#tton to create yo#r EO #nder apc:+oracle+apps+ak+schema+ser9er
;O :
Entty O'ject(EO% s nothn& '#t the replca o! a data'ase ta'le$
Each ta'le sho#ld have one and only one ;ntit& O/"ect$ @here can 'e any n#m'er o! 9ew O'jects
'ased on an Entty O'ject$
Create an 5iew O/"ect 15O8:

H
- Select the apc:+oracle+apps+ak+emplo&ee+ser9er .C4J packa&e n the Na9igator7
r&ht-clck and select New 5iew O/"ect+++ !rom the conte)t men# to open the 9ew O'ject
w2ard$
- 8! the Welcome pa&e appears" select Ne:t$
- 8n the Name pa&e" spec!y ;mplo&eeSummar&5O as the vew o'ject6s name and ver!y
that the Package s apc:+oracle+apps+ak+emplo&ee+ser9er$
- Select the Ne:t '#tton$
-78n the ;ntit& O/"ects pa&e" select the ;mplo&ee;O n the 9aila/le lst and sh#ttle t to
the Selected lst
I7Select the Ne:t '#tton
I7Select the ;:pert *ode check'o)$ @hs allows yo# to edt the &enerated C#ery$
I7When yo# are !nshed wth yo#r edtn&" select the (est '#tton to ens#re yo#r synta) s
correct$
I7Select the Ne:t '#tton" a&an Ne:t '#tton
I78n the 4a9a pa&e" deselect the Generate 4a9a File !or 5iew O/"ect Class:
;mplo&eeSummar&5OImpl (yo# don6t need to add any code to ths vew o'ject%$ Do
select the Generate 4a9a File !or 5iew %ow Class: ;mplo&eeSummar&5O%owImpl to
comply wth OA 1ramework codn& standards$
ISelect the Finish '#tton to create yo#r 9O
dd <our 5iew O/"ect to the %oot $I pplication *odule:
9ew o'jects can 'e #sed only wthn the conte)t o! a contann& applcaton mod#le$ .e!ore yo#
can #se the ;mplo&eeSummar&5O n yo#r pa&e" yo# m#st add t to the pa&e6s root <8
Applcaton 3od#le$
I7Select the *ain* n the Na9igator pane" r&ht-clck and select ;dit *ain*+++
!rom the conte)t men# to open the pplication *odule w2ard$
I7Nav&ate to the 'ata *odel pa&e$
ISelect the ;mplo&eeSummar&5O vew o'ject n the 9aila/le 5iew O/"ects lst and
sh#ttle t to the 'ata *odel lst$
ISelect the O! '#tton to !nsh addn& yo#r 9O to yo#r root A3$

1=
?uick %e9iew which we ha9e completed till now:
1% Creaton o! workspace
+% Creaton o! project
,% Project settn&s" data'ase connectonJetc
4% .C4J packa&e !or clent sde o'jects
:% .C4J packa&e !or server sde o'jects
;% Creaton o! A3 #nder .C4J packa&e !or clent sde
?% Creaton o! EO #nder .C4J packa&e !or server sde
G% Creaton o! 9O 'ased on EO #nder .C4J packa&e !or clent sde
H% Addn& the 9O to A3 ( re!er to onon da&ram to have a clear c#t%
Creaton o! 8ntal Pa&e(;mpSearchPG Page%

11
-Create a new <8 pa&e n the apc:+oracle+apps+ak+emplo&ee+we/ui packa&e
ISelect the m&pro"ect+"pr project n the Nav&ator" r&ht-clck and select KNew+++K !rom
the conte)t men#$
I8n the New wndow" e)pand the We/ (ier herarchy and select O Components$
I7Select Page n the OA Components Items lst$
I7Select the O! '#tton to contn#e$
I78n the New Pa&e dalo&" enter ;mplo&eeSearchPG n the Name !eld and
apc:+oracle+apps+ak+emplo&ee+we/ui n the Package !eld$
- 8n the nav&ator" yo# wll 'e a'le to see the pa&e ;mplo&eeSearchPG+:ml "
- n the str#ct#re pane L region)7 on clckn& the re&on1" a property nspector wndow
opens shown& all the propertes o! region) as shown 'elow$

1+
(We create Ae&on wthn the Pa&e$
a$ Ae&on s what wll store yo#r !elds$ @e)t np#t !elds wll 'e o! type messa&e@e)t8np#t$ @hnk
o! Canvas n -+MNto an e)tentO$
'$ 5o# can have nested re&ons$ Stacked Canvas n -+M comes the closest to ths component o!
OA 1ramework$%
*odif& the region):
- Select yo#r ;mpSearchPG n the Structure pane and select the region) that J-eveloper
created !or yo#$
- set the !ollown& propertes as n property nspector(

1,
8- Pa&eDayo#tAN
AEF8ON S@5DE pa&eDayo#t
A3 -e!nton apc)$oracle$apps$ak$employee$server$3anA3
Wndow @tle APC( Employees
@tle Search Employees
A#to1ooter @r#e

14
dd a Product 2randing Image:
Each Oracle Applcatons pa&e reC#res a prod#ct 'randn& ma&e$
- Select yo#r Page0a&out%N n the Structure pane" r&ht-clck and select New +++
product2randing !rom the conte)t men#$
- J-eveloper creates a page0a&outComponents !older contann& a product2randing
ma&e tem (named item)%$ Select ths tem and set the !ollown& propertes(
8- Prod.rand
8ma&e <A8 [email protected]$&!
Addtonal @e)t OA 1ramework @#toral
Create the Page Instruction (e:t : (ths step s not mandatory%
- Select the Page0a&out%N n the Structure pane" r&ht-clck select New > pageStatus !rom the
conte)t men# (any nstr#cton te)t or other content added to the pa&eStat#s wll
render n parallel wth any pa&e-level acton or nav&aton '#ttons that yo# add%$
- J-eveloper a#tomatcally creates a flow0a&out re&on !or yo# 'eneath the pageStatus
component$ Select ths re&on and set ts 8- to PageStatus%N$
- Select PageStatus%N" r&ht-clck and select New > Item$ Set ths tem6s propertes as
!ollows(
8- Pa&eEelp

1:
8tem Style statcStyled@e)t
-ata @ype 9AACEAA+
CSS Class Ora8nstr#cton@e)t
3essa&e Appl Short Name AM
3essa&e Name [email protected]@0PAFE0FENEAAD
-We can mod!y(or create new messa&e% the te)t n messa&e
[email protected]@0PAFE0FENEAAD #sn& Applcaton -eveloper -* 3essa&es
(est <our Work
- Select yo#r pa&e ;mplo&eeSearchPG+:ml n the Na9igator wndow" r&ht-clck and
choose %e/uild ;mplo&eeSearchPG+:ml (Ae'#ld mples the comple o! yo#r pa&e"shows
warnn&s and complaton errors ! avala'le%
- Select yo#r pa&e ;mplo&eeSearchPG+:ml n the Na9igator wndow" r&ht-clck and
choose %un ;mplo&eeSearchPG+:ml $
- Pa&e loads n a 'rowser a#tomatcally and sho#ld appear as 'elow

1;
dding a %esults@2ased Search to &our Page:
i8 dd a ?uer& 2ean to <our Page
Add the C#ery 'ean re&on to yo#r pa&e
- Select the Page0a&out%N n the Structure pane" r&ht-clck and select New > %egion
!rom the conte)t men#$
-Select the new re&on (region)%" and set ts propertes as !ollows(
8- Q#eryAN
Ae&on Style C#ery
Constr#cton 3ode res#lts.asedSearch
8ncl#de Smple Panel @r#e
8ncl#de 9ews Panel @r#e
8ncl#de Advanced Panel @r#e

1?
ii8 dd a %esults 'ata (a/le to <our ?uer&%N
@ Select the ?uer&%N n the Structure pane" r&ht-clck and select New > %egion $sing
Wi#ard !rom the conte)t men#$
- 8! the Welcome pa&e appears" select Ne:t$
- 8n the 2C34 O/"ects pa&e" select yo#r *ain*
(apc:+oracle+apps+ak+emplo&ee+ser9er+*ain*%" and then select yo#r
;mplo&eeSummar&5O) vew o'ject nstance !rom the 9aila/le 5iew O/"ects lst$
'O NO( select the $se this as pplication *odule 'efinition for this region check'o)$
- Select the Ne:t '#tton$
- 8n the %egion Properties pa&e" set the %egion I' !eld val#e to %esults(a/le and set the %egion
St&le to ta/le$

1G
- Select the Ne:t '#tton$
- 8n the 5iew ttri/utes pa&e" select the !ollown& attr'#tes !rom the 9aila/le 5iew
ttri/utes lst and sh#ttle them to the Selected 5iew ttri/utes lst(
- Employee8d
- 1#llName
- EmalAddress
- Start-ate
- Select the Ne:t '#tton$
- 8n the %egion Items pa&e" set the property St&le as messageSt&led(e:t !or all the !elds and
leave ttri/ute Set propertes 'lank as o! now$

1H
iii8 Set <our %esults(a/le %egion Properties
- Select the %esults(a/le re&on n the Str#ct#re pane" and setBver!y the !ollown&
propertes(
8- Aes#lts@a'le
Ae&on Style ta'le
A3 -e!nton Make sure that you have not associated an
application module here
Addtonal @e)t Employees @a'le
Aendered @r#e
Aecords -splayed 1=
Wdth 1==R
<ser Personal2aton @r#e
i98 Set or 5erif& Item Properties
- 1or the ;mpId tem(
- Set the Search Allowed property to (rue to ena'le sortn& on ths ta'le col#mn$
- Set the Sort Allowed property to ascending
- Set the 8ntal Sort SeC#ence property to first$
- Set the Selectve Search Crtera property to (rue+
- Set the <ser Personal2aton property to (rue (needed so the #ser can save
a Personal2ed 9ew%$
- 1or the FullName tem
- Set the Search Allowed property to (rue$
- Set the Selectve Search Crtera property to (rue$
- Set the <ser Personal2aton property to (rue
-1or the" ;mailddress tem
- Set the Search Allowed property to (rue$
- Set the <ser Personal2aton property to (rue

+=
-1or the" Start'ate tem
- Set the Search Allowed property to (rue$
- Set the <ser Personal2aton property to (rue
(est <our Work
- Select yo#r pa&e ;mplo&eeSearchPG+:ml n the Na9igator wndow" r&ht-clck and
choose %e/uild ;mplo&eeSearchPG+:ml (Ae'#ld mples the comple o! yo#r pa&e"shows
warnn&s and complaton errors ! avala'le%
- Select yo#r pa&e ;mplo&eeSearchPG+:ml n the Na9igator wndow" r&ht-clck and
choose %un ;mplo&eeSearchPG+:ml $
- Pa&e loads n a 'rowser a#tomatcally and sho#ld appear as 'elow
AAAAAAA;N'AAAAAA


+1
1. In D2K-forms we sort of created a Window, attached to Canvas, and then fields within that
Canvas.
However in OA Framewor, thin of !a"e #ein" fm$%Window, thin of &e"ion #ein" a Canvas,
and fields #ein" within &e"ions.
This is not a formal/accurate understanding of analogy between D2k and Framework, but
is close to being logical.
2. In D2, 'o(r Forms fm# file was com)iled to fm$. It was fm$ file that was de)lo'ed on mid-tier.
In case of OAF, 'o(r OA !a"e is nothin" #(t a *+, file. We call this +D- .meta data/.
Whatever name 'o( "ive to 0!a"e0 in OAF, an *+, file of the same name "ets created. 1his $ml
file m(st then #e loaded into data#ase #' (sin" *+,Im)orter command.
2. A)art from +D- *+, file, almost ever'thin" else is merel' de)lo'ed to 'o(r mid-tier. 3s(all'
this is (nderneath 45A6A71O!%oracle%a))s%..%..
All 'o(r 8ava files will "o (nderneath 8ava to)%oracle%a))s%..%.. etc.
9. When #(ildin" 'o(r t(torial, i"nore the ste)s for settin" 0Attri#(te -ets0. 1hese are not
mandator'. Oracle mi"ht 8(st have develo)ed their t(torials witho(t incl(din" these. 1hin of
these lie 6is(al Attri#(tes of D2K forms .to an e$tent/

You might also like