oaf_steps
TRANSCRIPT
-
8/11/2019 OAF_steps
1/10
Automatic Search Page:
Automatic Search Page Steps:
1) Create the page as the normal way like create jws, jpr, bc4js, AM, page etc. .2) Right click o the .jpr, Create the bc4j or !".
#$% &&aam.oracle.apps.po.a'tosearch.ser(er) Create !" 'n*er +C4, an* attach !" to the AM.
#&%A'tosearch!" - a** this into AM.4) /elect the page, 0n*er page ayo't R,create one Region, region style as 3'ery.) 5hen select 6'ery region - right click - Region 'sing wi7ar* -*ialogbo& - yo' can
select yo'r !" which yo' create* in r*step.8) Click ne&t to contin'e - there yo' can select region style is table region, beca'se we are
going to *isplay res'lts in table region.9) Click ne&t to contin'e -/h'ttle the items which yo' want to *isplay in page an* table
region.:) 5hen right click 6'ery Region- select simple search panel ; simple search 6'ery region
-
8/11/2019 OAF_steps
2/10
Manual Search Page:
Manual Search Page Steps:
! Create the page as the normal way like create jws, jpr, bc4js, AM, page etc. .
"! Create one #" +C4 'n*er that +C4 create #".-Right click o the +C4 select ew#ntity "bject.#$% &&aam.oracle.apps.po.a'tosearch.schema.ser(er an* &&".ote % or Man'al search no nee* to create #ntity "bject. 'st or e&plaining how to create#" base* !".
#! 5hen create !" base* on #". Create new !" 'n*er partic'larB!") +C4, there yo' cansh'le the #" Bwhich yo' create* in 2n*step) into selecte* si*e.
$! Click ne&t twice an* 6'ery a'tomatically will generate , i yo' want to change yo' selecte&pert mo*e checkbo& an* yo' can change the 6'ery. Amen* the where cla'se likebelow e&le.
#&%/##C5 epartment#".#>5E,epartment#".#>5",epartment#".#>5AM#,
epartment#"."CA5",epartment#".CR#A5#E+F,epartment#".CR#A5"EA5#,epartment#".A/5E0>A5#E+F,epartment#".A/5E0>A5#EA5#,epartment#".A/5E0>A5#E"?
GR"M epartment epartment#"HI#R# epartment#".#>5AM# D# !B%1,epartment#".#>5AM#)
A epartment#"."CA5" D# !B%2,epartment#"."CA5")
%! 5hen inish the creation !".
&! A** this !" into AM.
'! 5hen *esign the page , create regions 1 or getting page items, 2 or getting b'ttonsan*, or table region or *isplaying res'lts when yo' press the go b'tton.
(! /elect AMimpl class ile to write logic like below.
p'blic int *eptsearchparamsB"A>ageConte&t pageConte&t, "AHeb+ean web+ean)Jint lagK@L/tring name K L/tring ocation KL
ept/earch!"mpl (oK getept/earch!"1B)L
iBpageConte&t.get>arameterBeptame)NKn'll ;; NpageConte&t.get>arameterBeptame).e6'alsB))J nameKpageConte&t.get>arameterBeptame).to/tringB)L
(o.setHhereCla'se>aramB@,name)L lagK1LO
-
8/11/2019 OAF_steps
3/10
elseJ (o.setHhereCla'se>aramB@,n'll)LO iBpageConte&t.get>arameterBocation)NKn'll ;; NpageConte&t.get>arameterBocation).e6'alsB))J ocationKpageConte&t.get>arameterBocation).to/tringB)L
(o.setHhereCla'se>aramB1,ocation)L lagK2LOelseJ (o.setHhereCla'se>aramB1,n'll)LO/ystem.o't.printlnBthe lag (al'e isPlag)Lret'rn lagL
O
)! Create Controller 'n*er pageayo'ot region to han*le the go b'tton e(ents an* call thelogic rom AM. Gollow logic below.
iBpageConte&t.get>arameterB?o)NKn'll)
J
$$newAMmpl amKB$$newAMmpl)pageConte&t.getApplicationMo*'leBweb+ean)L
int gKam. *eptsearchparams BpageConte&t, web+ean)L iBgKK@) J am.getepartment!"1B).setHhereCla'se>aramB@,-g*g*jgh*j)L
am.getepartment!"1B).setHhereCla'se>aramB1,hk*hk*khgkk)L throw new "A#&ceptionBplease select atleast one searchcriteria,"A#&ception.#RR"R)L
O else J am.getepartment!"1B).e&ec'te3'eryB)L O O
*! 5hen r'n the page to test the Man'al search page.
-
8/11/2019 OAF_steps
4/10
Create Page in OA Framework
Create page Steps:
! Create the page as the normal way like create jws, jpr, bc4js, AM, page etc. ."! #" sho'l* be man*atory to *e(elop the create the page.
#! Create the EO which table you want to insert the records through page.
$! Create the BC4J for EO and develop the EO. Ex:&&aam.oracle.apps.po.a'tosearch.schema.ser(er an* &&".
%! 5hen create !" base* on #". Create new !" 'n*er partic'larB!") +C4, there yo' can/h'le the #" Bwhich yo' create* in 2n*step) into selecte* si*e
&! A** abo(e !" into AM.
'! 5hen *esign the page or appropriate recor*s insert into table an* create two b'ttons orpressing in page.
(! 5hen select AMimpl class ile to *e(elop the logic below.
public void CreateDept!
" Depart#entCreation$O%#pl vo& getDepart#entCreation$O'!(
O)DB*ransaction *r&getO)DB*ransaction!(
if+vo.is,repared-orExecution!!
"
vo.executeuery!( /
0ow row'&vo.create0ow!(
vo.insert0owrow'!( row'.set1ew0ow2tate0ow.2*)*32%1%*%)5%6ED!(
1u#ber deptid&*r.get2e7uence$alue8DE,*DE,*%D2E8!(
99 vo.getCurrent0ow!.set)ttribute8Dept%d8deptid!(
vo.getCurrent0ow!.set)ttribute8Dept%d8deptid!(
/
)! Create Controller 'n*er pageayo'ot region to han*le the go b'tton e(ents an* call thelogic rom AM. Gollow logic below.
Process Request :
eptAMmpl amKBeptAMmpl)pageConte&t.getApplicationMo*'leBweb+ean)Lam.in(okeMetho*BCreateept)L
Process Form request:
BpageConte&t.get>arameterB/a(e)NKn'll) J
-
8/11/2019 OAF_steps
5/10
am.get"A+5ransactionB).commitB)L O
Update Page in OA Framework:
Update Page Steps:
1 Create the page as the normal way like create jws, jpr, bc4js, AM, page etc. .! #" sho'l* be man*atory to *e(elop the 'p*ate page.
" Create the EO which table you want to update the records through page.# Create the BC4J for EO and develop the EO.
Ex:&&aam.oracle.apps.po.a'tosearch.schema.ser(er an* &&".$ 5hen create !" base* on #". Create a new !" 'n*er partic'larB!") +C4, there yo'
can /h'le the #" Bwhich yo' create* in 2n*step) into selecte* si*e% A** abo(e !" into AM.& /elect the search page, there select table region an* create one item an* style as image.' n the image properties a) image 'ri as 'p*ateiconEenable*.gi b)Action 5ype as ire
action. n the parameter win*ow - i* Kp*epti* (al'e -QJoa./earch!"1.ept*O.
( Create the 'p*ate page with appropriate recor*s. An* +'ttons.1) Create Controller 'n*er pageayo'ot region to han*le the go b'tton e(ents an* call thelogic rom AM. Gollow logic below.
Process request:
iBpageConte&t.get>arameterBp*epti*)NKn'll) J /tring *epti*KpageConte&t.get>arameterBp*epti*).to/tringB)L /tring wherecla'seK#>5EKP*epti*PL am.getCreate!"1B).setHhereCla'se>aramsBn'll)L am.getCreate!"1B).setHhereCla'seBwherecla'se)L am.getCreate!"1B).e&ec'te3'eryB)L O
Process Form request:
BpageConte&t.get>arameterB/a(e)NKn'll) J am.get"A+5ransactionB).commitB)L O
Create the ta*le and s+non+m e,ample:
Create table mo*pos.#>AR5M#5B#>5E n'mber >RMARF D#F, #>5" !ARCIAR2B@),
#>5AM# !ARCIAR2B1@@), "CA5" !ARCIAR2B1@@), CR#A5#E+F 0M+#R,
CR#A5"EA5# ate, A/5E0>A5#E+F 0M+#R,
A/5E0>A5#EA5# ate, A/5E0>A5#E"? 0M+#R)
-
8/11/2019 OAF_steps
6/10
CR#A5# /F"FM #>AR5M#5 G"R mo*pos.#>AR5M#5
-
8/11/2019 OAF_steps
7/10
Create the Sequene with e,ample:
create se6'ence #>5E#>5EE/#3/tart with 1 increment by 1?rant all on #>5E#>5EE/#3 to appscreate se6'ence #>5E#>5EE/#3/tart with 4 increment by 1 c's
?rant all on #>5E#>5EE/#3 to apps c's
Create synonym #>5E#>5EE/#3 or c's.#>5E#>5EE/#3 apps
Call one OAF page -rom another OAF page S+nta,:
i BpageConte&t.get>arameterBCreate)NKn'll) J pageConte&t.setGorwar*0RB"A.jspS
pageKrajeshToracleTappsTpoT*eptTweb'iTepartmentCreation>age, n'll, "AHeb+eanConstants.D##>EM#0EC"5#$5, n'll, n'll, alse, TT Retain AM "AHeb+eanConstants.AE+R#AECR0M+E", TT o not *isplaybrea*cr'ms "AHeb+eanConstants.?"R#EM#//A?#/)L
O
Follow .c#/ -or each o*/ect%
AM A !" - +C4$$AAM.oracle.apps.po.&&name.ser(er #ntity "bjectB#") - +C4
$$AAM.oracle.apps.po.&&name.schema.ser(er "! -+C4
$$AAM.oracle.apps.po.&&name."!.ser(er >oplist -+C4
$$AAM.oracle.apps.po.&&name.poplist.ser(er Controller,>age ; Region
$$AAM.oracle.apps.po.&&name.web'i
-
8/11/2019 OAF_steps
8/10
0elete page steps
1 For delete no need to create an+ pages! Select search page 2 in ta*le region +ou create one item and st+le as image .elow
set o- properties needs to set -or this image
Image Uri 3 deleteicon4ena*ledgi-Action 5+pe 6 -ireAction78ent 3 An+ 9ame delete
Parameter window:SP7;
9ame 6 0eptIdoaSearch
-
8/11/2019 OAF_steps
9/10
?
?
? deleteitercloseRowSetIteratorE?
# Call that delete e8en tin Controller like *elow .elow logic ha8ing how to createOA0ialog *o, in OA Framework
i- deleteequalspageConte,tgetParameter7
BB 5he user has clicked a 0elete icon so we want to displa+ a arning BB dialog asking i- she reall+ wants to delete the emplo+ee 9ote that we
BB con-igure the dialog so that pressing the Kes *utton su*mits toBB this page so we can handle the action in this processFormRequest method
String 0eptId D pageConte,tgetParameter0eptIdE
OA7,ception main@essage D new OA7,ceptionPOS2,,,E
BB 9ote that e8en though weHre going to make our KesB9o *uttons su*mit a BB -orm2 we still need some non3null 8alue in the constructorHs KesB9o
BB UR; parameters -or the *uttons to render2 so we /ust pass empt+BB Strings -or this
OA0ialogPage dialogPage D new OA0ialogPageOA7,ceptionAR9I9L2main@essage2 null2 2 E
BB Alwa+s use @essage 0ictionar+ -or an+ Strings +ou want to displa+ String +es D pageConte,tget@essageAM2 FM45.N454K7S2 nullE String no D pageConte,tget@essageAM2 FM45.N4549O2 nullE BB e set this 8alue so the code that handles this *utton press is
BB descripti8e dialogPagesetOk.uttonItem9ame0eleteKes.uttonE
BB 5he -ollowing con-igures the KesB9o *uttons to *e su*mit *uttons2 BB and makes sure that we handle the -orm su*mit in the originating BB page the 7mplo+ee summar+ so we can handle the Kes BB *utton selection in this controller
dialogPagesetOk.utton5oPosttrueE dialogPageset9o.utton5oPosttrueE dialogPagesetPost5oCallingPagetrueE BB 9ow set our KesB9o la*els instead o- the de-ault OMBCancel dialogPagesetOk.utton;a*el+esE
dialogPageset9o.utton;a*elnoE BB 5he OA0ialogPage gi8es us a con8enient means
BB o- doing this 9ote that the use o- the ashta*le is
BB most appropriate -or passing multiple parameters See the OA0ialogPageBB /a8adoc -or an alternati8e when dealing with a single parameter ashta*le -ormParams D new ashta*leE
-ormParamsput0eptId2 0eptIdE
dialogPagesetFormParameters-ormParamsE
pageConte,tredirect5o0ialogPagedialogPageE
-
8/11/2019 OAF_steps
10/10
? else i- pageConte,tgetParameter0eleteKes.utton D null >
BB User has con-irmed that she wants to delete this emplo+ee BB In8oke a method on the A@ to set the current row in the 0eptId ?E
BB OAApplication@odule am D pageConte,tgetApplication@odulewe*.eanE amin8oke@ethoddeletedepartment2 parametersE
BB 9ow2 redispla+ the page with a con-irmation message at the top 9ote BB that the deleteComponent method in the A@ commits2 and our code BB wonHt get this -ar i- an+ e,ceptions are thrown
OA7,ception message D new OA7,ceptionPOS2,,,,,,,,2 null2OA7,ceptionCO9FIR@A5IO92nullE
pageConte,tput0ialog@essagemessageE
? ?
7mp ad8ance ta*le row
pu*lic 8oid createemp> 7mplo+eeCreation