Download as pdf or txt
Download as pdf or txt
You are on page 1of 296

OA Framework Beginner's Guide

OA Framework Beginners Guide

Version : Beta 1.0.2 Sudhakar Mani and Aarthi Sudhakar

ii

OA Framework Beginner's Guide


Co !right " 200# $! %he Cho&a 'ress Com anies( A&& rights reser)ed. *+,e t as ermitted under the -nited States Co !right A,t o. 1#/0( no art o. this u$&i,ation ma! $e re rodu,ed or distri$uted in an! .orm or $! an! means( or stored in a data$ase or retrie)a& s!stem( without the rior written ermission o. the u$&isher. A&& trademarks are trademarks o. their res e,ti)e owners. 1ather than ut a trademark s!m$o& a.ter e)er! o,,urren,e o. a trademarked name( we use names in an editoria& .ashion on&!( and to the $ene.it o. the trademark owner( with no intention o. in.ringement o. the trademark. 2here su,h designations a ear in this $ook( the! ha)e $een rinted with initia& ,a s. Cho&a 'ress eBooks are a)ai&a$&e at s e,ia& 3uantit! dis,ounts to use as remiums and sa&es romotions( or .or use in ,or orate training rograms. %o ,onta,t a re resentati)e &ease e4mai& us at tmanis$i5gmai&.,om. 6n.ormation has $een o$tained $! 'u$&isher .rom sour,es $e&ie)ed to $e re&ia$&e. 7owe)er( $e,ause o. the ossi$i&it! o. human or me,hani,a& error $! our sour,es( 'u$&isher( or others( 'u$&isher does not guarantee to the a,,ura,!( ade3ua,!( or ,om &eteness o. an! in.ormation in,&uded in this work and is not res onsi$&e .or an! errors or omissions or the resu&ts o$tained .rom the use o. su,h in.ormation. %his $ooks is not re&ated to Ora,&e Cor oration. TERMS OF USE %his is a ,o !righted work and %he Cho&a 'ress( 89Cho&a4'ress:; and its &i,ensors reser)e a&& rights in and to the work. -se o. this work is su$<e,t to these terms. *+,e t as ermitted under the Co !right A,t o. 1#/0 and the right to store and retrie)e one ,o ! o. the work( !ou ma! not de,om i&e( disassem$&e( re)erse engineer( re rodu,e( modi.!( ,reate deri)ati)e works $ased u on( transmit( distri$ute( disseminate( se&&( u$&ish or su$&i,ense the work or an! art o. it without Cho&a 'ress's rior ,onsent. =ou ma! use the work .or !our own non,ommer,ia& and ersona& use> an! other use o. the work is stri,t&! rohi$ited. =our right to use the work ma! $e terminated i. !ou .ai& to ,om &! with these terms. %7* 2O1? 6S '1OV6@*@ 9AS 6S.: Cho&a 'ress AA@ 6%S B6C*ASO1S MA?* AO G-A1AA%**S O1 2A11AA%6*S AS %O %7* ACC-1AC=( A@*C-AC= O1 COM'B*%*A*SS OF O1 1*S-B%S %O B* OB%A6A*@ F1OM -S6AG %7* 2O1?( 6ACB-@6AG AA= 6AFO1MA%6OA %7A% CAA B* ACC*SS*@ %71O-G7 %7* 2O1? V6A 7='*1B6A? O1 O%7*126S*( AA@ *D'1*SSB= @6SCBA6M AA= 2A11AA%=( *D'1*SS O1 6M'B6*@( 6ACB-@6AG B-% AO% B6M6%*@ %O 6M'B6*@ 2A11AA%6*S OF M*1C7AA%AB6B6%= O1 F6%A*SS FO1 A 'A1%6C-BA1 '-1'OS*. Cho&a 'ress and its &i,ensors do not warrant or guarantee that the .un,tions ,ontained in the work wi&& meet !our re3uirements or that its o eration wi&& $e uninterru ted or error .ree. Aeither Cho&a 'ress nor its &i,ensors sha&& $e &ia$&e to !ou or an!one e&se .or an! ina,,ura,!( error or omission( regard&ess o. ,ause( in the work or .or an! damages resu&ting there.rom. Cho&a 'ress has no res onsi$i&it! .or the ,ontent o. an! in.ormation a,,essed through the work. -nder no ,ir,umstan,es sha&& Cho&a 'ress andEor its &i,ensors $e &ia$&e .or an! indire,t( in,identa&( s e,ia&( uniti)e( ,onse3uentia& or simi&ar damages that resu&t .rom the use o. or ina$i&it! to use the work( e)en i. an! o. them has $een ad)ised o. the ossi$i&it! o. su,h damages. %his &imitation o. &ia$i&it! sha&& a &! to an! ,&aim or ,ause whatsoe)er whether su,h ,&aim or ,ause arises in ,ontra,t( tort or otherwise.

iii

OA Framework Beginner's Guide

Table of Contents
Cha ter 6 4 Fa)a Basi,s................................................................................................. G 2h! shou&d 6 know Fa)a .or &earning OA FrameworkH.....................................I *n,a su&ation...................................................................................................... I O$<e,t Oriented 'rogramming............................................................................ I OO'S Con,e ts...................................................................................................0 *n,a su&ation...................................................................................................... 0 A$stra,tion.......................................................................................................... 0 6nheritan,e...........................................................................................................0 'o&!mor hism..................................................................................................... 0 2hat is a ,&assH................................................................................................... / 2hat is an o$<e,tH............................................................................................... / 2hat is a methodH.............................................................................................../ 2hat is an 6nter.a,eH.........................................................................................../ 2hat is a Fa)a BeanH.......................................................................................... / 2hat is a ,onstru,torH.........................................................................................J 2hat is an arra!H.................................................................................................J 'rimiti)e @ata %! es in Fa)a...............................................................................J @i..erent %! es o. Varia$&es............................................................................... # %! e Casting..................................................................................................... 10 *+,e tion 7and&ing in Fa)a.............................................................................. 10 Cha ter 66 K Basi,s O. OA Framework...................................................................... 1G 2hat is OA FrameworkH...................................................................................1I i)

OA Framework Beginner's Guide 'arts o. OA Framework.................................................................................... 10 *n,a su&ation.................................................................................................... 1/ Mode& View Contro&&er 8MVC; Ar,hite,ture....................................................1J Mode&:............................................................................................................... 1J A &i,ation Modu&e:................................................................................20 *ntit! O$<e,t:...........................................................................................20 View O$<e,t:............................................................................................ 20 Asso,iation O$<e,t :.................................................................................20 View Bink:............................................................................................... 20 View:................................................................................................................. 21 %! es o. 1egions in a 'age......................................................................22 %! es o. 6tems in a 'age..........................................................................LI Contro&&er:......................................................................................................... G1 ro,ess1e3uest:....................................................................................... G1 ro,essForm@ata:....................................................................................G1 ro,essForm1e3uest:...............................................................................G1 OA Framework Ar,hite,ture.............................................................................GL Cha ter 666 K Fde)e&o er *n)ironment Setu ............................................................. G0 Setting u the Fde)e&o er *n)ironment............................................................ G/ 7e&&o 2or&d 'age Ba$....................................................................................... I/ Cha ter 6V K Sear,h 'age ........................................................................................../L Auto CustomiMation Criteria Sear,h................................................................. /G Adding Atta,hments to the 1esu&ts %a$&e ......................................................111 Cha ter V K Ad)an,ed %a$&e ................................................................................... 11/ Con)ert 1esu&ts %a$&e into Ad)an,ed %a$&e...................................................11J Create Fun,tiona&it! .......................................................................................122 Adding 'o &ist and BOV to the Ad)an,ed %a$&e............................................12# Add Sing&e Se&e,t @e&ete .un,tiona&it!...........................................................1L/ Con)ert Sing&e Se&e,t @e&ete to Mu&ti Se&e,t @e&ete .....................................1G2 Cha ter V6 K @e endent BOV and 'o &ist...............................................................1G/ @e endent 'o &ist........................................................................................... 1GJ @e endent BOV.............................................................................................. 1IG Goog&e St!&e Auto Suggest BOV.................................................................... 101 Cha ter V66 K Master @etai& 'age............................................................................ 1/1 Form St!&e Master @etai& 'age....................................................................... 1/2 Sear,h @e artment and @ri&& @own to @etai&s 'age ......................................1JI Cha ter V666 K @e &o!ment......................................................................................1#J )

OA Framework Beginner's Guide @e &o!ment.....................................................................................................1## 7ome 'age with %a$s......................................................................................201 Cha ter 6D 4 *+tension............................................................................................. 211 *+tension.........................................................................................................21L VO *+tension:....................................................................................... 21L CO *+tension.........................................................................................2LL *O *+tension.........................................................................................2L/ @e &o!ing the VO Su$stitution.......................................................................2G2 'ersona&iMation................................................................................................ 2GJ @e$ugging OA Framework 'age..............................................................................2I/ A endi+ A K @ata$ase S,ri ts.......................................................................2I# A endi+ B..................................................................................................... 201 Creating Attri$ute Sets:......................................................................... 201 Creating Book - s:............................................................................... 20I 6nter)iew Cuestions..................................................................................................2/1 G&ossar!.......................................................................................................... 2JJ

)i

Acknowledgments

hen a,know&edging a&& the eo &e in)o&)ed in getting a $ook .rom ,on,e t to rint( the &ist ,an $e rett! $ig. But there are a&wa!s a .ew who stand out in the task( $oth dire,t&! and indire,t&!. %he ma<or ush ,ame .rom the eo &e who $ought our e$ooks whi,h .o,used on ni,he to i,s. 2ithout them we wou&dn't ha)e )entured into writing this .u&& .&edged $ook. 2riting is not our s e,ia& ski&& $ut writing a te,hni,a& $ook was mu,h easier ,om ared to an! other $ook. A s e,ia& thanks to $e rendered .or our .riends and ,o&&eagues who had su orted this $ook with their s e,ia& re)iew and in uts. 2e are interested more in ,ommuni,ating the know&edge we a,3uired o)er the !ears rather than ro)iding a no)e& $ook. %hanks .or e)er!one who stood $! this $ook and made it ossi$&e at the end.

'age 1

Introduction

rom $eing a $usiness su er user to an im &ementer( 6 am a .irm $e&ie)er in uti&iMing enter rise $usiness s!stems to a,hie)e the wea&th o. in.ormation re3uired and standardiMation to run $usinesses e..e,ti)e&! toda!. %he te,hno&og! we used .or ,reating user inter.a,e .or Ora,&e *BS is )er! an,ient and toda!'s modern wor&d a &i,ation su ort we$ inter.a,e .or $etter user e+ erien,e. 2hene)er we tried to a,,ess the Ora,&e *BS through internet(most o.ten than not !ou wi&& ha)e some issues with <initiator in ,ase o. 11i and o<)m in,ase o. Ora,&e 112.OA Framework o..ers a ,on)enient wa! to de)e&o some stunning we$ a &i,ation with &esser e..ort. 6n our ear&ier ,!,&e o. &earning OA Framework(it was ns not smooth and we had done the tutoria&s ,ame with ora,&e again and again $&ind&! without understanding what we are er.orming. Sin,e none o. us had the <a)a $a,kground(it was rea&&! an u hi&& task. 6t took 0 &ong !ears to rea,h the ,urrent &e)e& o. know&edge on OA Framework. 7a)ing trained more than L00 eo &e on OA Framework now(we had &earned a &ot .rom the ers e,ti)e o. the &earners. 2hen we introdu,ed the OA Framework on&ine training .or the .irst time(none o. the &earners were ,om.orta$&e ti&& we ,ra,ked the remote deskto a roa,h .or the &earning methodo&og!. %his $ook( whi&e designed to $e read .rom ,o)er to ,o)er( is a&so se&.4in,&usi)e .or ea,h se,tion( a&&owing the reader to go dire,t&! to a arti,u&ar se,tion and not $e re.eren,ed $a,k to other areas .or more in.ormation. For Ora,&e or industr!4s e,i.i, terms( a g&ossar! at the $a,k is in,&uded .or ra id a,,ess. Besides $eing a ste 4$!4 ste and .ie&d4$!4.ie&d how4to guide( this $ook in,&udes man! $usiness ,onsiderations to think a$out during an de)e&o ment ,!,&e and $e!ond. Aote : %his $ook is not a re &a,ement .or Ora,&e's @e)e&o er Guide.Ora,&e OAF de)e&o er guide is )er! e+tensi)e and shou&d $e used as a rimar! re.eren,e and this $ook ,an $e used $! the $eginners to understand the ,on,e ts and get a,,ustomed to OAF de)e&o ment and e+tension.

'age 2

CHAPTER

1
Java Basics

'age L

Cha ter 6 4 Fa)a Basi,s

Chapter I - Java Basics


6n Cha ter 6( we wi&& $e ,o)ering the $e&ow to i,s: 2h! shou&d 6 know Fa)a .or &earning OA FrameworkH O$<e,t Oriented 'rogramming OO'S Con,e ts *n,a su&ation 6nheritan,e 'o&!mor hism 2hat is a C&assH 2hat is an O$<e,tH 2hat is a MethodH 2hat is an 6nter.a,eH 2hat is a Fa)a BeanH 2hat is a Constru,torH 2hat is an Arra!H @ata %! es in Fa)a @i..erent %! es o. Varia$&es

'age G

Cha ter 6 4 Fa)a Basi,s

Why should I know Java for learning OA Framework?

% *

hough !ou ,an de)e&o sim &e a &i,ations with OA Framework without knowing $asi,s o. Fa)a( it is high&! re,ommended that !ou &earn at &east the $asi,s o. Fa)a $e.ore ro,eeding to &earn OA Framework. OA Framework is a .ramework $ased on F2**. Ora,&e has tried its &e)e& $est to kee the .ramework sim &e and a,hie)e the .un,tiona&it! with &ess ,oding and to $e more de,&arati)e. %hen the ne+t 3uestion arises 97ow mu,h Fa)a one shou&d knowH:

Encapsulation
n,a su&ation is hiding in.ormation .rom unwanted outside a,,ess and atta,hing that in.ormation to on&! mFa)a is a o,ean and !ou need not know e)er!thing in it. %his $ook wi&& guide !ou with the Fa)a to i,s re&e)ant to an OA Framework de)e&o er.

Ob ect Oriented !rogramming


O$<e,t4oriented rogramming 8OO'; is a rogramming &anguage mode& organiMed around No$<e,tsN rather than Na,tionsN and data rather than &ogi,. 7istori,a&&!( a rogram has $een )iewed as a &ogi,a& ro,edure that takes in ut data( ro,esses it( and rodu,es out ut data.%he ,on,e ts and ru&es used in o$<e,t4oriented rogramming ro)ide these im ortant $ene.its: %he ,on,e t o. a data ,&ass makes it ossi$&e to de.ine su$,&asses o. data o$<e,ts that share some or a&& o. the main ,&ass ,hara,teristi,s. Ca&&ed inheritan,e( this ro ert! o. OO' .or,es a more thorough data ana&!sis( redu,es de)e&o ment time( and ensures more a,,urate ,oding. Sin,e a ,&ass de.ines on&! the data it needs to $e ,on,erned with( when an instan,e o. that ,&ass 8an o$<e,t; is run( the ,ode wi&& not $e a$&e to a,,identa&&! a,,ess other rogram data. %his ,hara,teristi, o. data hiding ro)ides greater s!stem se,urit! and a)oids unintended data ,orru tion. %he de.inition o. a ,&ass is re4usea$&e not on&! $! the rogram .or whi,h it is initia&&! ,reated $ut a&so $! other o$<e,t4oriented rograms 8and( .or this reason( ,an $e more easi&! distri$uted .or use in networks;. %he ,on,e t o. data ,&asses a&&ows a rogrammer to ,reate an! new data t! e that is not a&read! de.ined in the &anguage itse&.. 'age I

Cha ter 6 4 Fa)a Basi,s

OO!" #oncepts
%he main OO'S ,on,e ts in,&ude C&asses( O$<e,ts and Methods. 7owe)er( there are a .ew more ,on,e ts that !ou wi&& want to $e,ome .ami&iar with. %hese are 6nheritan,e( A$stra,tion( 'o&!mor hism( *)ent( and *n,a su&ation.

Encapsulation
*n,a su&ation is hiding in.ormation .rom unwanted outside a,,ess and atta,hing that in.ormation to on&! methods that need a,,ess to it. %his $inds data and o erations tight&! together and se arates them .rom e+terna& a,,ess that ma! ,orru t them intentiona&&! or unintentiona&&!.*n,a su&ation is a,hie)ed $! de,&aring )aria$&es as 'ri)ate in a ,&ass. %his gi)es a,,ess to data to on&! mem$er .un,tions o. the ,&ass. A ne+t &e)e& o. a,,essi$i&it! is ro)ided $! the 'rote,ted ke!word whi,h gi)es the deri)ed ,&asses the a,,ess to the mem$er )aria$&es o. the $ase ,&ass. A )aria$&e de,&ared as 'rote,ted ,an at most $e a,,essed $! the deri)ed ,&asses o. the ,&ass

Abstraction
A$stra,tion ,an $e de.ined as the ro,ess in whi,h an a &i,ation wi&& ignore the ,hara,teristi,s o. a su$4grou and work on a genera& &e)e& when it is needed.

Inheritance
As the name inheritan,e suggests an o$<e,t is a$&e to inherit ,hara,teristi,s .rom another o$<e,t. 6n more ,on,rete terms( an o$<e,t is a$&e to ass on its state and $eha)iors to its ,hi&dren. For inheritan,e to work the o$<e,ts need to ha)e ,hara,teristi,s in ,ommon with ea,h other.

!olymorphism
'o&!mor hism re.ers to a rogramming &anguage's a$i&it! to ro,ess o$<e,ts di..erent&! de ending on their data t! e or ,&ass. More s e,i.i,a&&!( it is the a$i&it! to rede.ine methods .or deri)ed ,&asses. For e+am &e( gi)en a $ase ,&ass sha e( o&!mor hism ena$&es the rogrammer to de.ine di..erent area methods .or an! num$er o. deri)ed ,&asses( su,h as ,ir,&es( re,tang&es and triang&es. Ao matter what sha e an o$<e,t is( a &!ing the area method to it wi&& return the ,orre,t resu&ts. 'o&!mor hism is ,onsidered to $e a re3uirement o. an! true o$<e,t4oriented rogramming &anguage 8OO'B;. 'age 0

Cha ter 6 4 Fa)a Basi,s

What is a class?
A ,&ass is sim &! a re resentation o. a t! e o. o$<e,t> think o. it as a $&ue rint that des,ri$es the o$<e,t. Fust as a sing&e $&ue rint ,an $e used to $ui&d mu&ti &e $ui&dings( a ,&ass ,an $e used to ,reate mu&ti &e ,o ies o. an o$<e,t. 6t de.ines the attri$utes and $eha)iors o. o$<e,ts. 6t is the $&ue rint that de.ines an o$<e,t

What is an ob ect?
An o$<e,t is a ,om onent o. a rogram that knows how to er.orm ,ertain a,tions and to intera,t with other ie,es o. the rogram. O$<e,ts ,an $e thought o. as NsmartN $&a,k $o+es. %hat is( o$<e,ts ,an know how to do more than one s e,i.i, task( and the! ,an store their own set o. data. @esigning a rogram with o$<e,ts a&&ows a rogrammer to mode& the rogram a.ter the rea& wor&d. A rogram ,an $e $roken down into s e,i.i, arts( and ea,h o. these arts ,an er.orm .air&! sim &e tasks. 2hen a&& o. these sim &e ie,es are meshed together into a rogram( it ,an rodu,e a )er! ,om &i,ated and use.u& a &i,ation.

What is a method?
A method is a rogrammed ro,edure that is de.ined as art o. a ,&ass and in,&uded in an! o$<e,t o. that ,&ass. A ,&ass 8and thus an o$<e,t; ,an ha)e more than one method. A method in an o$<e,t ,an on&! ha)e a,,ess to the data known to that o$<e,t( whi,h ensures data integrit! among the set o. o$<e,ts in an a &i,ation. A method ,an $e re4used in mu&ti &e o$<e,ts.

What is an Interface?
An inter.a,e is a re.eren,e t! e( simi&ar to a ,&ass( that ,an ,ontain on&! ,onstants( method signatures( and nested t! es. %here are no method $odies. 6nter.a,es ,annot $e instantiated. %he! ,an on&! $e im &emented $! ,&asses or e+tended $! other inter.a,es.

What is a Java $ean?


A Fa)a Bean is a reusa$&e so.tware ,om onent that ,an $e )isua&&! mani u&ated in $ui&der too&s.

'age /

Cha ter 6 4 Fa)a Basi,s

What is a constructor?
A ,onstru,tor is ,a&&ed automati,a&&! when an o$<e,t is ,reated. 6t is usua&&! de,&ared u$&i,. 6t has the same name as the ,&ass. 6t must not s e,i.! a return t! e. %he ,om i&er su &ies a no4arg ,onstru,tor i. and on&! i. a ,onstru,tor is not e+ &i,it&! ro)ided. 6. an! ,onstru,tor is e+ &i,it&! ro)ided( then the ,om i&er does not generate the no4arg ,onstru,tor.

What is an array?
An arra! is a wra er ,&ass. An arra! is an o$<e,t and it gets room in hea . Arra! ,an store a ,o&&e,tion o. data's o. same data t! e. 6t ,an $e used to store integers(strings e)en o$<e,ts..its ,o&&e,tions o. data's. 2hether the arra! stores rimiti)e data's or o$<e,ts in it( an arra! is a&wa!s an o$<e,t. int num$ersOP Q new intO10P> this arra! is o. siMe 10 whi,h ,an ho&d 10 int )a&ues. %his arra! num$ers stores rimiti)e data t! e $ut the arra! num$er is an o$<e,t

!rimitive %ata &ypes in Java


A rimiti)e t! e is rede.ined $! the &anguage and is named $! a reser)ed ke!word. 'rimiti)e )a&ues do not share state with other rimiti)e )a&ues. %he eight rimiti)e data t! es su orted $! the Fa)a rogramming &anguage are: byte: %he byte data t! e is an J4$it signed two's ,om &ement integer. 6t has a minimum )a&ue o. 412J and a ma+imum )a&ue o. 12/ 8in,&usi)e;. %he byte data t! e ,an $e use.u& .or sa)ing memor! in &arge arra!s( where the memor! sa)ings a,tua&&! matters. short: %he short data t! e is a 104$it signed two's ,om &ement integer. 6t has a minimum )a&ue o. 4L2(/0J and a ma+imum )a&ue o. L2(/0/ int: %he int data t! e is a L24$it signed two's ,om &ement integer. 6t has a minimum )a&ue o. 42(1G/(GJL(0GJ and a ma+imum )a&ue o. 2(1G/(GJL(0G/ long: %he long data t! e is a 0G4$it signed two's ,om &ement integer. 6t has a minimum )a&ue o. 4#(22L(L/2(0L0(JIG(//I(J0J and a ma+imum )a&ue o. #(22L(L/2(0L0(JIG(//I(J0/ float: %he float data t! e is a sing&e4 re,ision L24$it 6*** /IG 'age J

Cha ter 6 4 Fa)a Basi,s .&oating oint. 6ts range o. )a&ues is $e!ond the s,o e o. this dis,ussion( $ut is s e,i.ied in se,tion G.2.L o. the Fa)a Banguage S e,i.i,ation. double: %he double data t! e is a dou$&e4 re,ision 0G4$it 6*** /IG .&oating oint. boolean: %he boolean data t! e has on&! two ossi$&e )a&ues: true and false. -se this data t! e .or sim &e .&ags that tra,k trueE.a&se ,onditions. char: %he char data t! e is a sing&e 104$it -ni,ode ,hara,ter. 6t has a minimum )a&ue o. '\u0000' 8or 0; and a ma+imum )a&ue o. '\uffff' 8or 0I(ILI in,&usi)e;.

%ifferent &ypes of 'ariables


%he Fa)a ,ontains the .o&&owing t! es o. )aria$&es: Instance ariables !"on#static fields$% 6n o$<e,t oriented rogramming( o$<e,ts store their indi)idua& states in the Nnon4stati, .ie&dsN that is de,&ared without the stati, ke!word. *a,h o$<e,t o. the ,&ass has its own set o. )a&ues .or these non4stati, )aria$&es so we ,an sa! that these are re&ated to o$<e,ts. 7en,e these )aria$&es are a&so known as instance &ariables. %hese )aria$&es take de.au&t )a&ues i. not initia&iMed. 'lass ariables !Static fields$% %hese are ,o&&e,ti)e&! re&ated to a ,&ass and none o. the o$<e,t ,an ,&aim them its so&e4 ro rietor . %he )aria$&es de.ined with stati, ke!word are shared $! a&& o$<e,ts. 7ere O$<e,ts do not store an indi)idua& )a&ue $ut the! are .or,ed to share it among themse&)es. %hese )aria$&es are de,&ared as (static fields( using the static ke!word. A&wa!s the same set o. )a&ues is shared among di..erent o$<e,ts o. the same ,&ass. So these )aria$&es are &ike global &ariables whi,h are same .or a&& o$<e,ts o. the ,&ass. %hese )aria$&es take de.au&t )a&ues i. not initia&iMed. )ocal ariables% %he )aria$&es de.ined in a method or $&o,k o. ,ode is ,a&&ed local &ariables. %hese )aria$&es ,an $e a,,essed within a method or $&o,k o. ,ode on&!. %hese )aria$&es don't take de.au&t )a&ues i. not initia&iMed. %hese )a&ues are re3uired to $e initia&iMed $e.ore using them. *arameters% 'arameters or arguments are )aria$&es used in method de,&arations. 'age #

Cha ter 6 4 Fa)a Basi,s

&ype #asting
%his is one o. the ,ommon tasks when !ou work with OA Framework. O.ten !ou need to do t! e ,asting in OA Framework ,ode. %! e ,asting means treating a )aria$&e o. one t! e as though it is o. another t! e. %here are 2 t! es o. ,asting:Casting 8 6m &i,it Casting; *+am &e : int i Q 10> &ong < Q i> @own Casting 8 *+ &i,it Casting; *+am &e : int i Q12 > $!te $2 Q 8$!te; i >

E(ception )andling in Java


An e+,e tion is an e)ent that o,,urs during the e+e,ution o. a rogram that disru ts the norma& .&ow o. instru,tions. 2hen an error o,,urs within a method( the method ,reates an o$<e,t and hands it o.. to the run time s!stem. %he o$<e,t( ,a&&ed an e+,e tion o$<e,t( ,ontains in.ormation a$out the error( in,&uding its t! e and the state o. the rogram when the error o,,urred. Creating an e+,e tion o$<e,t and handing it to the run time s!stem is ,a&&ed throwing an e+,e tion. Che,ked e+,e tions are su$<e,t to the Cat,h or S e,i.i, 1e3uirement. A&& e+,e tions are ,he,ked e+,e tions( e+,e t .or those indi,ated $! *rror( 1un time *+,e tion( and their su$,&asses. %he se,ond kind o. e+,e tion is the error. %hese are e+,e tiona& ,onditions that are e+terna& to the a &i,ation( and that the a &i,ation usua&&! ,annot anti,i ate or re,o)er .rom. %he third kind o. e+,e tion is the run time e+,e tion. %hese are e+,e tiona& ,onditions that are interna& to the a &i,ation( and that the a &i,ation usua&&! ,annot anti,i ate or re,o)er .rom. %hese usua&&! indi,ate rogramming $ugs( su,h as &ogi, errors or im ro er use o. an A'6. %he .irst ste in ,onstru,ting an e+,e tion hand&er is to en,&ose the ,ode that might throw an e+,e tion within a tr! $&o,k. 6n genera&( a tr! $&o,k &ooks &ike the .o&&owing. 'age 10

Cha ter 6 4 Fa)a Basi,s tr! R ,ode S ,at,h and .ina&&! $&o,ks . . . =ou asso,iate e+,e tion hand&ers with a tr! $&o,k $! ro)iding one or more ,at,h $&o,ks dire,t&! a.ter the tr! $&o,k. Ao ,ode ,an $e $etween the end o. the tr! $&o,k and the $eginning o. the .irst ,at,h $&o,k. tr! R S ,at,h 8*+,e tion%! e name; R S ,at,h 8*+,e tion%! e name; R S %he .ina&&! $&o,k always e+e,utes when the tr! $&o,k e+its. %his ensures that the .ina&&! $&o,k is e+e,uted e)en i. an une+ e,ted e+,e tion o,,urs. But .ina&&! is use.u& .or more than <ust e+,e tion hand&ing T it a&&ows the rogrammer to a)oid ha)ing ,&eanu ,ode a,,identa&&! $! assed $! a return( ,ontinue( or $reak.

'age 11

Cha ter 6 4 Fa)a Basi,s

'age 12

Cha ter 6 4 Fa)a Basi,s

CHAPTER

2
Basics Of OA Framework

'age 1L

Chapter II Basics Of OA Framework


6n Cha ter 66( we wi&& $e ,o)ering the $e&ow to i,s: 2hat is OA FrameworkH 'arts o. OA Framework Mode& View Contro&&er 8MVC; Ar,hite,ture Mode& View Contro&&er OA Framework Ar,hite,ture

'age 1G

Cha ter 66 K Basi,s O. OA Framework

What is OA Framework?
OA Framework is a F2** .ramework de)e&o ed $! Ora,&e .or e+tending the *4 Business Suite. OA Framework .o&&ows the MVC Ar,hite,ture whi,h is a wide&! a,,e ted .ramework .or we$ $ased a &i,ations. 6n short a Framework is nothing $ut a artia&&! $ui&t a &i,ation whi,h ,an $e e+tended to suite the $usiness needs. For e+am &e when !ou $ui&d a new a &i,ation !ou ha)e to take ,are o. at &east $e&ow things: Authenti,ation S!stem8Bogin and -ser Management; Se,urit! A,,essi$i&it! -ser 'ersona&iMation and *+tensi$&e Ba!er

OA Framework has a&& the a$o)e .eatures and other im ortant *BS .eatures $ui&t in. %his a&&ows the @e)e&o er to ,on,entrate on $usiness &ogi, and &et the .ramework hand&e the te,hno&og!. B! using OA Framework a de)e&o er ,an: Bui&d new Se&. Ser)i,e 'ages .or *BS 'ersona&iMe the Se&. Ser)i,e ages *+tend the Se&. Ser)i,e 8seeded; ages

'age 1I

Cha ter 66 K Basi,s O. OA Framework

!arts of OA Framework
%he three arts o. OA Framework are: +',-% BCGF stands .or Business Com onents .or Fa)a. %he $usiness ,om onents re resents the $usiness &ogi,. %he di..erent BCGF o$<e,ts are A &i,ation Modu&e( View O$<e,t( *ntit! O$<e,t (Asso,iation O$<e,t ( View Bink and Va&idation View O$<e,t( Va&idation A &i,ation Modu&e. UI.% -6D stands .or -ser 6nter.a,e DMB whi,h re resents the <a)a ,om onents .or re resenting the -6. -6D re resents the OA 'age in OA Framework. OA E/tension% OA *+tension re resents the de,&arati)e data .or -6D e+tension. 6t resides in the M@S8Meta @ata 1e ositor!;. BCGF -6D OA *+tension

'age 10

Cha ter 66 K Basi,s O. OA Framework

Encapsulation
OA Framework a &i,ations ,an $e asso,iated &ike a &a!er o. ,on,entri, &a!ers. %he ,ore Ba!er is the @ata$ase and the outer most &a!er is the View Ba!er whi,h is the OA 'age. 6n $etween the 'age and the data$ase we ha)e the *ntit! O$<e,t( View O$<e,t and the A &i,ation Modu&e. *a,h &a!er knows a$out on&! the &a!er $e&ow it. A &i,ation Modu&e knows what a&& VO's asso,iated with it $ut not the *O's. %he OA Contro&&er de&egates the o erations to the A &i,ation Modu&e. OA Contro&&er does not ,ontain an! $usiness &ogi,. 6n turn the AM ,a&&s a method in the VO where the data is 3ueried .rom the @ata$ase. %here are 2 o erations( that is @ata 'u&&8@ata - Sta,k; and @ata 'ush8@ata @own Sta,k;. 6n the @ata 'u&& ,ontro&&er ,a&&s a method in AM( in turn the AM ,a&&s a method in VO and VO gets data .rom @ata$ase.

'age 1/

Cha ter 66 K Basi,s O. OA Framework

Fig 2 4 1: *n,a su&ation

*odel 'iew #ontroller +*'#, Architecture


MVC Ar,hite,ture stands .or Mode& View Contro&&er.

*odel%he Mode& &a!er en,a su&ates the under &!ing data and $usiness &ogi, o. the a &i,ation. %he Mode& &a!er re resents the BCGF ,om onents whi,h ,onsists o. the A &i,ation Modu&e *ntit! O$<e,t View O$<e,t.

'age 1J

Cha ter 66 K Basi,s O. OA Framework Asso,iation O$<e,t View Bink

'age 1#

Cha ter 66 K Basi,s O. OA Framework

Application Mod le!


%he A &i,ation Modu&e de.ines the &ogi,a& data and $usiness methods. %he A &i,ation Modu&e hand&es the transa,tion and intera,ts with ,&ients. 6t ser)es as ,ontainers .or re&ated BCGF o$<e,ts. AM is res onsi$&e .or esta$&ishing data$ase ,onne,tions and transa,tion ,onte+t. AM's ,an $e nested to ro)ide more ,om &e+ a &i,ation modu&es. *)er! OA 'age shou&d ha)e at &east one A &i,ation Modu&e asso,iated with it.

"ntit# Ob$ect!
*ntit! o$<e,t en,a su&ates the $usiness ru&es and &ogi,. *ntit! o$<e,t is used when there is a insert( - date or de&etion o. data. A&& data )a&idations a,ross the a &i,ation is ro)ided $! the *O. *O's ,an $e &inked with ea,h other to ,reate an Asso,iation o$<e,t.

%iew Ob$ect!
View O$<e,t en,a su&ate a data$ase 3uer!. 6t iterates o)er the resu&t set. View O$<e,t ma! $e $ased on a sim &e se&e,t 3uer! or $e $ased on an sing&e or mu&ti &e *O's. VO a,ts as a sing&e oint o. ,onta,t .or getting and setting entit! o$<e,t )a&ues. View o$<e,ts ,an $e &inked to .orm View Binks. A&& VO's shou&d $e asso,iated with an AM $e.ore usage.

Association Ob$ect !
Asso,iation O$<e,t is used to <oin two or more *ntit! O$<e,ts together.

%iew &ink!
A )iew &ink is an a,ti)e &ink $etween )iew &inks. A )iew &ink ,an $e ,reated $! ro)iding the sour,e and destination )iews and sour,e and destination attri$utes. %here are two modes o. View &ink o eration that ,an $e er.ormed. A do,ument and MasterE@etai& o eration.

'age 20

Cha ter 66 K Basi,s O. OA Framework

'iew%he View Ba!er o. the MVC ar,hite,ture ,onsists o. age whi,h in turn ,ontains 1egions and 6tems. Ae)er ,on.use View with View O$<e,t. View O$<e,t is art o. BCGF Ba!er8 Mode& ;.

'age 21

Cha ter 66 K Basi,s O. OA Framework

T#pes of 'e(ions in a )a(e


1egions are ,ontainers .or .or di..erent items in a age. 6n a age there ,an $e mu&ti &e regions inside a region and mu&ti &e items inside that region. *)er! region is a <a)a $ean a,ting as a ,ontainer .or regions under it or items. 1egions inside another region is ,a&&ed Chi&d 1egion and that is resent in the same &e)e& as another region it is a Si$&ing. 1egion ro erties ,an $e set &ike St!&e(6@(1endered et,. %here are sma&& restri,tions whi&e ,reating the region whi,h wi&& a..e,t the wa! the regions and items wi&& $e dis &a!ed in the age. Few ,ommon&! used regions st!&es: 0age)ayout Region% 'ageBa!out region is the highest &e)e& &a!out. B! de.au&t this the to most region .or e)er! age. An! num$er regions ,an $e ,reated under the age&a!out region. %he <a)a $ean asso,iated with this region is OA*age)ayout+ean.

Fig 24L: ageBa!out 1egion

'age 22

Cha ter 66 K Basi,s O. OA Framework message'om0onent)ayout Region% MessageCom onentBa!out is a )er! ,ommon region st!&e used whi,h ,ontains a&& the items starting with message. For e+am &e message%e+t6n ut(messageSt!&ed%e+t et,. %his region ,an ha)e on&! message st!&e o. items. Aon4message items has to $e &a,ed inside messageBa!out under the messageCom onentBa!out 1egion. %he items ,an $e dis &a!ed in mu&ti &e ,o&umns and rows. %he <a)a $ean asso,iated with this region is OAMessage'om0onent)ayout+ean.

Fig 2 4 G: MessageCom onentBa!out 1egion

'age 2L

Cha ter 66 K Basi,s O. OA Framework Fig 2 4 I: MessageCom onentBa!out 1egion

'age 2G

Cha ter 66 K Basi,s O. OA Framework 1uery+ean% Cuer! $ean as the name suggests( it is used when !ou ha)e to er.orm an! sear,h on the age. 6t has di..erent ane&s &ike sim &e sear,h ane& (ad)an,ed sear,h ane& and Views 'ane&. =ou ,an o tiona&&! ena$&e or disa$&e the ane&s using the ro ert! ins e,tor. %he resu&ts are most&! rendered using a ta$&e or a hgrid. %he di..erent ,onstru,tion modes a)ai&a$&e with the 3uer! $ean are 1esu&ts $ased sear,h and auto ,ustomiMation ,riteria and Aone. %he <a)a $ean asso,iated with this region is OA2uery+ean.

Fig 2 4 0: Cuer! 1egion

'age 2I

Cha ter 66 K Basi,s O. OA Framework

Fig 2 4 /: Cuer! 1egion

'age 20

Cha ter 66 K Basi,s O. OA Framework hideShow Region% 6n a age i. !ou want to hide and show the items or regions( !ou ,an set the to region's st!&e to hideShow. B! using this !ou ,an hide or show a art o. the in.ormation or the entire se,tion. %he <a)a $ean asso,iated with this region is OA3efault4ideShow+ean.

Fig 2 4 J: 7ideShow 1egion switcher Region% %he swit,her region is used at runtime to de,ide whi,h item needs to $e rendered. 6t is a&wa!s $ound to an attri$ute in VO. A )iew instan,e and )iew attri$ute is s e,i.ied with swit,her. %he <a)a $ean asso,iated with this region is OASwitcher+ean.

'age 2/

Cha ter 66 K Basi,s O. OA Framework Fig 2 4 #: Swit,her 1egion

'age 2J

Cha ter 66 K Basi,s O. OA Framework defaultSingle'olumn Region% %he de.au&tSing&eCo&umn as the name suggest is used .or ho&ding the items in a sing&e ,o&umn. %his region is de re,ated and !ou shou&d not use it in !our age. 2hene)er there is need .or showing a sing&e ,o&umn region( use the messageCom onentBa!out region. Sometimes !ou ma! ha)e to se&e,t this region to use the 1egion using wiMard .un,tiona&it!( $ut ,hange the region st!&e to messageCom onentBa!out immediate&! a.ter using the wiMard. %he <a)a $ean asso,iated with this region is OA3efaultSingle'olumn+ean. default3ouble'olumn Region% %he de.au&tSing&eCo&umn as the name suggest is used .or ho&ding the items in dou$&e ,o&umn. %his region is de re,ated and !ou shou&d not use it in !our age. 2hene)er there is need .or showing a dou$&e ,o&umn region( use the messageCom onentBa!out region. Sometimes !ou ma! ha)e to se&e,t this region to use the 1egion using wiMard .un,tiona&it!( $ut ,hange the region st!&e to messageCom onentBa!out immediate&! a.ter using the wiMard.%he <a)a $ean asso,iated with this region is OA3efault3ouble'olumn+ean. 0age+utton+ar Region% 2hen e)er an! item is to $e ,reated at a age &a!out &e)e& we use the ageButtonBar region. 6t is the ,hi&d o. ageBa!out &e)e&. %he items ,reate under this region wi&& $e dis &a!ed at the $ottom8$e&ow .ooter; and to o. the age8$e&ow age tit&e;. %he <a)a $ean asso,iated with this region is OA*age+utton+ar+ean.

Fig 2 4 10: 'age Button Bar 1egion

'age 2#

Cha ter 66 K Basi,s O. OA Framework

Fig 2 4 11: 'age Button Bar 1egion table)ayout Region% %he ta$&eBa!out region is a wra er ,ontaining rowBa!out and ,e&&Format regions. %his ,an $e easi&! ma ed to !our 7%MB ta$&e. %a$&eBa!out is used when !ou need more ,ontro& on &a,ing the items in a 'age. %he <a)a $ean asso,iated with this region is OATable)ayout+ean. row)ayout Region% %he rowBa!out region is used when !ou want to ho&d a ,e&& .ormat inside as a ,hi&d to it. 6t ,an $e an inde endent region or a ,hi&d or a ta$&e&a!out or ad)an,ed%a$&e. %he <a)a $ean asso,iated with this region is OARow)ayout+ean. cellFormat Region% Ce&&Format region is a ,ontainer o. regions or items. %he <a)a $ean asso,iated with this region is OA'ellFormat+ean.

'age L0

Cha ter 66 K Basi,s O. OA Framework ad&ancedTable Region% Ad)an,ed %a$&e is used when there is a need to er.orm ,reate( u date and de&ete .un,tiona&it! on the same age without na)igating to another age. %his wi&& ro)ide a Ora,&e Forms &ike .un,tiona&it! to the OA 'age. %he <a)a $ean asso,iated with this region is OAAd&ancedTable+ean5

Fig 2 4 12: Ad)an,ed %a$&e 1egion table Region% As the name suggest ta$&e is used .or dis &a!ing data in a ta$u&ar .ormat. 6t su sing&e and mu&ti &e se&e,tion. %he <a)a $ean asso,iated with this region is 'age L1 orts

Cha ter 66 K Basi,s O. OA Framework OATable+ean.

'age L2

Cha ter 66 K Basi,s O. OA Framework

Fig 2 4 1L: %a$&e 1egion flow)ayout Region% 2hen !ou want to dis &a! ta$&e a,tions .or a ta$&e or ad)an,ed%a$&e !ou ,an ,reate a .&owBa!out. Main&! it is .or $uttons we use this &a!out. %he <a)a $ean asso,iated with this region is OAF&owBa!outBean. h6rid Region% 2hen the data needs to $e dis &a!ed in a hierar,hia& stru,ture the hGrid region is used. @etai&ed in.ormation .or ea,h row or node ,an a&so $e gi)en. %he <a)a $ean asso,iated with this region is OA46rid+ean.

Fig 2 4 1G: 7grid 1egion 'age LL

Cha ter 66 K Basi,s O. OA Framework train Region% 2hen !ou ha)e mu&ti &e ages then we use the train to show the rogress. A high&ighted mark shows the ,urrent age whi,h !ou are in. %he <a)a $ean asso,iated with this region is OATrain+ean.

Fig 2 4 1I: %rain 1egion

'age LG

Cha ter 66 K Basi,s O. OA Framework

T#pes of Items in a )a(e


1egions a,t &ike a ,ontainer .or mu&ti &e items. %here are a )ariet! o. items that ,an $e ,reated in a age. For e+am &e i. a user wants to enter some data in the age then we make use o. the message%e+t6n ut item t! e. Simi&ar&! .or )arious a,tions we ha)e items. Bet us see the item t! es now. messageStyledTe/t 4 2hen !ou want to dis &a! on&! the te+t and the user shou&d not $e a$&e to edit the te+t then we use the messageSt!&ed%e+t.

Fig 2 4 10: MessageSt!&ed%e+t 6tem

'age LI

Cha ter 66 K Basi,s O. OA Framework messageRadio6rou04 %his he& s to ,reate radio $uttons in !our age.

Fig 2 4 1/: Message1adioGrou 6tem message'heck+o/ 4 %his he& s to ,reate ,he,k $o+ in !our age.

Fig 2 4 1J: MessageChe,kBo+ 6tem

'age L0

Cha ter 66 K Basi,s O. OA Framework messageTe/tIn0ut 4 As the name im &ies it he& s the users to enter data into this $o+.

Fig 2 4 1#: Message%e+t6n ut 6tem message)o&In0ut 4 when !ou want the uses to se&e,t .rom a &ist o. )a&ues and 3ui,k se&e,t .rom the )a&ues then we use the messageBo)6n ut. %his wi&& o en a o u and !ou ,an sear,h .or )a&ues and se&e,t .rom the resu&ts.

Fig 2 4 20: MessageBo)6n utt 6tem

'age L/

Cha ter 66 K Basi,s O. OA Framework

message'hoice 4 2hen !ou want to dis &a! a &ist o. )a&ues in a dro down .ashion then !ou use the messageChoi,e.

Fig 2 4 21: MessageChoi,e 6tem message3ownload 4 -sed when the user needs to down&oad a .i&e or atta,hment.

Fig 2 4 22: Message@own&oad6tem

'age LJ

Cha ter 66 K Basi,s O. OA Framework messageFileU0load 4 -sed .or dis &a!ing a $utton with a message%e+t6n ut .-ser ,an $rowse .rom the &o,a& ma,hine and u &oad a .i&e using this.

Fig 2 4 2L: MessageFi&e- &oad 6tem

button 4 6t is a genera& $utton whi,h has an a,tion asso,iated with it. =ou ,an set the .ire a,tion ro ert! whi,h wi&& in turn ,a&& a method whi,h wi&& er.orm that a,tion.

Fig 2 4 2G: Button 6tem submit+utton 4 %his is the $utton used when !ou want to su$mit data to a OAF age.

'age L#

Cha ter 66 K Basi,s O. OA Framework

Fig 2 4 2I: Su$mitButton 6tem )ink 4 -sed .or ,reating &inks. %here are man! t! es o. &inks that ,an $e ,reated. form alue 4 %his is used to send )a&ue to an OAF age $ut without $eing dis &a!ed in the age. s0acer 4 %his is used when !ou want to add s a,e $etween !our items &a,ed in the age. se0erator 4 %his ,reates a horiMonta& &ine in an oa. age. Fle/4 %his is a .&e+.ie&d. %here are 2 t! es o. .&e+ .ie&ds. ?e! and @es,ri ti)e .&e+ .ie&ds. urlInclude 4 %his he& s to in,&ude 7%MB ,ontent. ti0 4 7e& s to gi)e hint to the user

'age G0

Cha ter 66 K Basi,s O. OA Framework

#ontrollerContro&&er hand&es the user a,tions. OA Framework Contro&&er has three methods. Be&ow are the &ist o. methods: 1. 2. L. ha ro,ess1e3uest 4 Fires when age is rendered. ro,essForm@ata 4 Fires when age su$mit ha ens. ro,essForm1e3uest 4 Fires when Fire A,tionEFire 'artia& A,tion and 'age su$mit ens.

For those o. !ou who worked in .orms !ou ,an re&ate these methods &ike triggers in .orms.74E"#"E7#FORM#I"STA"'E ,an $e ma ed to ro,ess1e3uest and 74E"#+UTTO"#*RESSE3 ,an $e ma ed to ro,essForm1e3uest.

process'e* est!
2hene)er !ou need some &ogi, to get e+e,uted when a age is rendered(write that set o. ,ode in the ro,ess1e3uest. %ake .or e+am &e !ou rogramati,a&&! need to set the 'age tit&e to N2e&,ome UU N . %his ro ert! needs to $e set whene)er !ou na)igate to this age. So we write this set o. ,ode in the ro,ess1e3uest o. the ,ontro&&er.

processForm+ata!
2e don't write an! ,ode in this method $e,ause it is used $! the .ramework to $ind the data .rom the age to BCGF ,om onent8VO;.

processForm'e* est!
2hene)er there is a ost re3uest in the age the method that is ,a&&ed is the ro,essForm1e3uest. So a&& the ,ode .or an! .orm a,tion is written in this method. For e+am &e a.ter entering a&& the )a&ues and !ou want to su$mit the data then the &ogi, .or su$mitting the data is written in the ro,essForm1e3uest o. the ,ontro&&er $! ,a turing the .orm e)ent or a,tion. %he who&e &ogi, o. the a &i,ation shou&d not $e written in the ,ontro&&er. %he Contro&&er shou&d de&egate it to AM $! in)oking methods in the A &i,ation Modu&e to er.orm those &ogi,. 'age G1

Cha ter 66 K Basi,s O. OA Framework

'age G2

Cha ter 66 K Basi,s O. OA Framework

OA Framework Architecture
OAF works on the MVC ar,hite,ture whi,h is Mode& View Contro&&er ar,hite,ture. An eas! e+ &anation o. the ar,hite,ture whi,h wi&& make a ,&ear understanding o. the ro,ess is gi)en $e&ow. %he ,&ient sends a re3uest .or an oa. age. 6n ,ase o. ora,&e a s it is the $rowser. %he re3uest is re,ei)ed $! the htt &istener as it is a 7%%' re3uest. %he 7tt &istener .orwards the re3uest to the ser)e&et engine8On the ora,&e a s we ha)e the OCGF ser)er whi,h in turn has the ser)e&et engine;.From the ser)e&et engine re3uest is re,ei)ed $! the ,ontro&&er whi,h ,ontro&s the ,om &ete .&ow. %he re3uest is then re,ei)ed $! OA.<s in the ,ontro&&er whi,h is the ,entra& ,ontro&&er. OA.<s identi.ies the age re3uest and .orwards it to the data$ase. 6n the data$ase we ha)e M@S whi,h is Meta@ata Ser)i,e whi,h is a re ositor! .or storing a&& the age de.inition. %he age de.initions are retrie)ed into midd&e tier .rom the M@S. %hen the a &i,ation data is retrie)ed into midd&e tier ie(-6 @e.inition whi,h is the $usiness &ogi,. %he $usiness &ogi, needs to $e a &ied on the data whi,h is done $! the BCGF. 6t is the .orwarded to the -6D. %he -6D renders or ,on)erts the age into +m&. %he +m& is then sent to oa ,ontro&&er and is ,on)erted into htm& and returned $a,k to the ,&ient. %he ao&E< does authenti,ation and authoriMation o. the re3uest to see i. the user is )a&id $e.ore it goes to ,ontro&&er.

'age GL

Cha ter 66 K Basi,s O. OA Framework

Fig 24 20: OA Framework Ar,hite,ture

'age GG

Cha ter 66 K Basi,s O. OA Framework

CHAPTER

3
Jdeveloper Environmen !e "p

'age GI

Chapter III Jdeveloper "nvironment ,et p


6n Cha ter 666( we wi&& $e ,o)ering the $e&ow to i,s :

Setting u the Fde)e&o er *n)ironment 7e&&o 2or&d 'age

'age G0

Cha ter 666 K Fde)e&o er *n)ironment Setu

S
in it.

"etting up the Jdeveloper Environment


etting u !our working en)ironment is one o. the ke! tasks. 2ithout the en)ironment set u nothing ,an $e done. Setting u the 112 Fde)e&o er working en)ironment is a &itt&e tri,k! . So &ets see the )arious ste s in)o&)ed &i,ation and &ogin as s!sadminEs!sadmin.

1. O en the A

2. C&i,k on A$out this 'age at the $ottom most right hand ,orner. L. 6n %e,hno&og! Com onents ta$ the OA Framework )ersion wi&& $e mentioned.

'age G/

Cha ter 666 K Fde)e&o er *n)ironment Setu Fig L 4 1: OA Framework Version G. 6n htt :EEmeta&ink.ora,&e.,om sear,h with the ke!word 9 Fde) with OA *+tension:. I. C&i,k on the arti,&e 9 7ow to .ind the ,orre,t )ersion o. Fde)e&o er to use with * $usiness Suite11i or 1e&ease 12:.

Fig L 4 2: Corre,t Version O. Fde) 0. @own&oad the at,h that is ne+t to !our OA Framework )ersion.

'age GJ

Cha ter 666 K Fde)e&o er *n)ironment Setu Fig L 4 L: Corre,t Version O. Fde) /. -nMi the .i&es into a .o&der 9Cho&aFde):. J. =ou shou&d see L .o&ders inside Cho&aFde) .o&der. One is <de)home( <de)do, and <de)$in. #. A en)ironment )aria$&e needs to $e set $e.ore o ening the Fde)e&o er. 1ight ,&i,k on M! Com uter. Go to Ad)an,ed S!stem Settings. 6n the Ad)an,ed %a$ ,&i,k on *n)ironment Varia$&es. 10. 6n the -ser Varia$&es ,&i,k on Aew. 11. Set the $e&ow )a&ues: En&ironment ariable%
Variable Name JDEV_USER_HOME Variable Value C:\CholaJdev\jdevhome\jdev

'age G#

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 G: *n)ironment Varia$&es 12. C&i,k Ok. 1L. @own&oad the d$, .i&e .rom ser)er and ut it under VF@*VW-S*1W7OM*XEd$,W.i&esEse,ure .o&der. 1G. Go to C:YCho&aFde)Y<de)$inY<de)Y$in and right ,&i,k <@e)2.e+e and ,&i,k Send to @eskto Short,ut. 'age I0

Cha ter 666 K Fde)e&o er *n)ironment Setu 1I. O en the short,ut on the deskto . 10. %he A &i,ation Aa)igator shou&d &ook &ike $e&ow:

Fig L 4 I: Fde)e&o er 1/. C&i,k on the Z i,on to add a works a,e to the <de).Go to m! ro<e,ts and se&e,t too&$o+.<ws.

'age I1

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 0: O en 2orks a,e 1J. O en the works a,e and right ,&i,k on right ,&i,k on %utoria&.< r. 1#. Go to Ora,&e A &i,ations [ @ata$ase Conne,tion. 20. C&i,k Aew to ,reate a new @B ,onne,tion.

'age I2

Cha ter 666 K Fde)e&o er *n)ironment Setu 21. Set the $e&ow ro erties: 3+ *ro0erties%
Conne !ion Name CholaD" U#ername a$$# %a##&ord a$$# Ho#! Name hola'()a$$# %or! (*+, S-D V-S

Fig L 4 /: @ata$ase Conne,tion 22. Go to 1un %ime Conne,tion and set the $e&ow ro erties Run Time 'onnection%
D"C .ile Name / 0JDEV_USER_HOME1\db _2ile#\#e ure\V-S)db U#erName #3#admin

'age IL

Cha ter 666 K Fde)e&o er *n)ironment Setu


%a##&ord #3#admin 4$$li a!ion Shor! Name .ND Re#$on#ibili!3 5e3 / 4%%6-C47-ON_DEVE6O%ER

Fig L 4 J: 1un time Conne,tion 2L. C&i,k Ok. 1ight ,&i,k on %utoria&.< r and ,&i,k 1e$ui&d.

'age IG

Cha ter 666 K Fde)e&o er *n)ironment Setu 2G. 1ight ,&i,k on 7e&&o2or&d'G and ,&i,k 1un.

Fig L 4 #: 1un 'age

'age II

Cha ter 666 K Fde)e&o er *n)ironment Setu

2I. %he $e&ow s,reen shott shows that the <de) setu is .ine and !ou ,an see the 7e&&o2or&d age dis &a!ed.

Fig L 4 10: 7e&&o 2or&d 'age Out ut

'age I0

Cha ter 666 K Fde)e&o er *n)ironment Setu

)ello World !age .ab


7e&&o 2or&d is a )er! sim &e tutoria& .or $eginners where we wi&& get an in ut .rom the user and dis &a! the in.ormation a.ter ,on,atenating with the word 7e&&o $e.ore the user in ut. For eg i. the user enters the )a&ue 9Cho&a: then the out ut wi&& $e 97e&&o Cho&a UU:. %he Fina& out ut shou&d &ook &ike $e&ow:

Fig L 4 11: 7e&&o 2or&d 'age Out ut 1. *)er! ro<e,t shou&d $e under a OA 2orks a,e. 1ight ,&i,k on A and se&e,t Aew OA 2orks a,e. &i,ations

'age I/

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 12: Aew 2orks a,e 2. Set the $e&ow ro erties .or the works a,e: 7orks0ace *ro0erties
Name Chola7u!orial# 4dd Ne& O4 %roje ! Che 8 i!

Fig L 4 1L: Aew 'ro<e,t

'age IJ

Cha ter 666 K Fde)e&o er *n)ironment Setu L. Set the .o&&owing ro erties .or the ro<e,t and C&i,k Ae+t. *ro8ect *ro0erties%
Name Chola7u!orial# De2aul! %a 8a9e :: hola#)ora le)a$$#)2nd)hello -n !he De2aul! $a 8a9e :: hola# i# !he !hird $ar!3 iden!i2ier) 2nd i# !he a$$li a!ion #hor! name and hello i# !he om$onen! name)

Fig L 4 1G: 'ro<e,t 'ro erties G. For the he&&o wor&d tutoria& there is no data$ase ,onne,tion re3uired. C&i,k Ae+t.

'age I#

Cha ter 666 K Fde)e&o er *n)ironment Setu

I. Set the $e&ow ,onne,tion detai&s and C&i,k Ae+t and Finish. Run Time 'onnection 3etails%
D"C .ile Name / 0JDEV_USER_HOME1\db _2ile#\#e ure\V-S)db U#er Name #3#admin %a##&ord #3#admin 4$$li a!ion Shor! Name .ND Re#$on#ibili!3 5e3 / 4%%6-C47-ON_DEVE6O%ER

Fig L 4 1I: 7e&&o 2or&d 'age Out ut 0. 1ight ,&i,k on Cho&a%utoria&s and se&e,t Aew. /. Se&e,t the 2e$ %ier [ OA Com onents [ 'age. 'age 00

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 10: Aew 'age J. Set the .o&&owing ro erties .or the age and ,&i,k O?. "ew *age%
Name / CholaHello;orld%< %a 8a9e / :: hola#)ora le)a$$#)2nd)hello)&ebui

#. C&i,k on Cho&a7e&&o2or&d'G and in the stru,ture ane and ,&i,k on region1 and set the .o&&owing ro erties .or the region: Region *ro0erties%
-d %a9e6a3ou!RN 4M De2ini!ion ora le)a$$#)2nd)2rame&or8)#erver)O44$$li a!ionModule ;indo& 7i!le / Chola=# Hello ;orld %a9e 7i!le Hello ;orld

'age 01

Cha ter 666 K Fde)e&o er *n)ironment Setu 10. 1ight ,&i,k on 'ageBa!out1A and se&e,t new [ 1egion. 11. Set the .o&&owing ro erties .or the region. A&& the message t! e items shou&d $e ,reated under messageCom onentBa!out region st!&e. Region *ro0erties%
-d MainRN Re9ion S!3le me##a9eCom$onen!6a3ou!

12. 1ight ,&i,k ok Main1A and se&e,t new [ message%e+t6n ut

Fig L 4 1/: Aew Message%e+t6n ut 1L. Set the .o&&owing ro erties .or the message%e+t6n ut: MessageTe/tIn0ut *ro0erties%
-d HelloName %rom$! Name Ma:imum 6en9!h >' 6en9!h +'

1G. For ,reating a Button whi,h wi&& ost the )a&ue got .rom the user we need a 'age 02

Cha ter 666 K Fde)e&o er *n)ironment Setu su$mit $utton. Buttons ,annot $e ,reated under messageCom onentBa!out region. So we wi&& ,reate a messageBa!out region and ,reate a new su$mit Button under it. 1I. 1ight ,&i,k on Main1A and se&e,t new [ messageBa!out.

Fig L 4 1J: Aew MessageBa!out 10. Set the .o&&owing ro erties: Message)ayout *ro0erties%
-d / "u!!on6a3ou!

1/. 1ight ,&i,k on ButtonBa!out and se&e,t new [ 6tem.

'age 0L

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 1#: Aew 6tem 1J. Set the .o&&owing ro erties: Item *ro0erties%
-d <o -!em S!3le #ubmi!"u!!on %rom$! <o

1#. %he stru,ture ane .or the Cho&a7e&&o2or&d'G shou&d &ook &ike $e&ow:

'age 0G

Cha ter 666 K Fde)e&o er *n)ironment Setu Fig L 4 20: 7e&&o 2or&d 'age Stru,ture 20. %he age design is o)er now and &ets ,reate a ,ontro&&er whi,h wi&& hand&e the ,ode.

'age 0I

Cha ter 666 K Fde)e&o er *n)ironment Setu

21. 1ight ,&i,k on 'ageBa!out1A and ,&i,k Set new Contro&&er.

Fig L 4 21: Aew Contro&&er 22. Set the .o&&owing ro erties .or the ,ontro&&er. C&i,k Ok. 'ontroller *ro0erties%
%a 8a9e :: hola#)ora le)a$$#)2nd)hello)&ebui Name CholaHello;orldCO

Fig L 4 22: Contro&&er 'ro erties 'age 00

Cha ter 666 K Fde)e&o er *n)ironment Setu

2L. C&i,k on Cho&a7e&&o2or&dCO.<a)a. %he <a)a .i&e ,ontains ro,essForm1e3uest and ro,ess1e3uest method. For hand&ing the $utton ,&i,k re3uest ,ode needs to $e written under the ro,essForm1e3uest method. *rocessFormRe1uest 'ode%
//Checks if the Go button is pressed. If yes then the code will be executed if (pageContext.getParameter("Go" !"null # //$ssigns the %alue of input from the input&ext to the string input'ame (tring input'ame"pageContext.getParameter(")ello'ame" * //Concats )ello with the input and then ! (tring outmsg"")ello "+"" + input'ame + "!!"* //&hrows the concatenated message as an exception information on the browser throw new ,$-xception(outmsg.,$-xception.I'/,01$&I,' * 2

Code Bisting L 4 1: 'ro,ess Form 1e3uest Code 2G. Sa)e !our work and right ,&i,k on Cho&a%utoria&s ro<e,t and ,&i,k Add to 'ro<e,t Content.

'age 0/

Cha ter 666 K Fde)e&o er *n)ironment Setu

Fig L 4 2L: Add to 'ro<e,t Content

'age 0J

Cha ter 666 K Fde)e&o er *n)ironment Setu 2I. C&i,k on Add. Se&e,t ++,ho&as and ,&i,k Ok. Again C&i,k Ok. Aow !ou shou&d see on&! the a,kage ++,ho&as.ora,&e.a s..nd.he&&o.we$ui in !our ro<e,t.

Fig L 4 2G: Se&e,t 'a,kage

'age 0#

Cha ter 666 K Fde)e&o er *n)ironment Setu 20. 1ight ,&i,k on Cho&a7e&&o2or&d'G and ,&i,k 1un. %he ,om &eted age wi&& &ook &ike $e&ow:

Fig L 4 2I: 7e&&o 2or&d 'age Out ut %he .ina& out ut shou&d &ook &ike $e&ow:

Fig L 4 20: 7e&&o 2or&d 'age Out ut

'age /0

Cha ter 666 K Fde)e&o er *n)ironment Setu

Summary% At the end o. Cha ter 666( !ou shou&d ha)e &earned the .o&&owing: Setting u the Fde)e&o er working en)ironment. 7e&&o 2or&d 'age Ba$.

'age /1

Cha ter 666 K Fde)e&o er *n)ironment Setu

CHAPTER

#
!earc$ Pa%e

'age /2

Chapter I% ,earch )a(e


6n Cha ter 6V( we wi&& $e ,o)ering the $e&ow to i,s: Auto CustomiMation Criteria Sear,h. Adding Atta,hments to the 1esu&ts %a$&e.

'age /L

Cha ter 6V K Sear,h 'age

Auto #ustomi/ation #riteria "earch


Auto CustomiMation Criteria Sear,h is used when !ou want .u&& ,ontro& on the sear,h ,riteria and the item st!&es o. the sear,h items. 6n 1esu&ts Based Sear,h we don't ,reate the sear,h items( $ut in Auto CustomiMation Criteria Sear,h we ,an ,reate sear,h items with an! item st!&e &ike messageBo)6n ut( messageChoi,e et,. 1. 1ight ,&i,k on A &i,ations and se&e,t Aew OA 2orks a,e.

Fig G 4 1: Aew 2orks a,e 2. Set the $e&ow )a&ues .or the 2orks a,e. 7orks0ace *ro0erties%
Name Chola4dv"oo8 Ne& O4 %roje ! / Che 8ed

'age /G

Cha ter 6V K Sear,h 'age

Fig G 4 2: 2orks a,e 'ro erties L. %he works a,e is ,reated under the de.au&t &o,ation whi,h is VF@*VW-S*1W7OM*XEm! ro<e,ts. G. A new OA 'ro<e,t is ,reated automati,a&&!. Set the $e&ow )a&ues: *ro8ect *ro0erties%
Name Chola4dv"oo8%roje ! De2aul! %a 8a9e hola)ora le)a$$#)2nd)adv

'age /I

Cha ter 6V K Sear,h 'age

Fig G 4 L: 2orks a,e 'ro erties I. C&i,k Ae+t.

'age /0

Cha ter 6V K Sear,h 'age

0. Che,k the -se re ositor! .or @esign %ime and C&i,k Aew.

Fig G 4 G: @ata$ase Conne,tion

'age //

Cha ter 6V K Sear,h 'age /. Set the ,onne,tion name as Cho&aConne,tion. C&i,k Ae+t.

Fig G 4 I: @ata$ase Conne,tion J. Set the $e&ow )a&ues .or the ,onne,tion: User 'redentials%
U#er Name a$$#

'assword K a s

'age /J

Cha ter 6V K Sear,h 'age

Fig G 4 0: @ata$ase Conne,tion #. Set the $e&ow )a&ues: 'onnection 3etails%


Ho#! Name hola'()a$$# %or! (*+, S-D V-S

'age /#

Cha ter 6V K Sear,h 'age

Fig G 4 /: @ata$ase Conne,tion

'age J0

Cha ter 6V K Sear,h 'age 10. C&i,k Ae+t and %est Conne,tion. %he status wi&& $e su,,ess. C&i,k Finish.

Fig G 4 J: @ata$ase Conne,tion 11. C&i,k Ae+t and then set the $e&ow ro erties .or the 1un time ,onne,tion. Run Time 'onnection 3etails%
D"C .ile Name / 0JDEV_USER_HOME1\db _2ile#\#e ure\V-S)db U#erName #3#admin %a##&ord #3#admin 4$$li a!ion Shor! Name .ND Re#$on#ibili!3 5e3 / 4%%6-C47-ON_DEVE6O%ER

'age J1

Cha ter 6V K Sear,h 'age

Fig G K #: 1un %ime Conne,tion 12. C&i,k Finish. Sa)e !our work and in the A &i,ation Aa)igator !ou wi&& $e seeing a works a,e and a ro<e,t inside that.

'age J2

Cha ter 6V K Sear,h 'age 1L. %he stru,ture shou&d &ook &ike $e&ow:

Fig G K 10: 'ro<e,t and 2orks a,e 1G. 1ight ,&i,k on the ro<e,t and se&e,t Aew.

'age JL

Cha ter 6V K Sear,h 'age

1I. Se&e,t Business %ier [ A@F Business Com onents [ A

&i,ation Modu&e.

Fig G K 11: Aew A 10. Set the $e&ow )a&ues .or the AM: AM *ro0erties%

&i,ation Modu&e

Name Chola4dv4M %a 8a9e hola)ora le)a$$#)2nd)adv)#erver

'age JG

Cha ter 6V K Sear,h 'age

Fig G K 12: Aew A 1/. C&i,k Ae+t and Finish.

&i,ation Modu&e

1J. Sa)e !our work and right ,&i,k on 'ro<e,t and se&e,t [ Add to 'ro<e,t Content. 1#. C&i,k Add and se&e,t on&! the ,ho&a .o&der and ,&i,k Ok. %his ste wi&& make sure that on&! the ,ho&a a,kage wi&& $e a)ai&a$&e in the ro<e,t.

'age JI

Cha ter 6V K Sear,h 'age

20. 6n the A

Fig G K 1L: Se&e,t 'a,kage &i,ation Aa)igator !ou wi&& noti,e on&! the ,ho&a a,kage.

'age J0

Cha ter 6V K Sear,h 'age

Fig G K 1G: Se&e,t 'a,kage 21. 1ight ,&i,k on the ro<e,t and se&e,t Aew. Se&e,t Business %ier [ A@F Business Com onents [ *ntit! O$<e,t.

'age J/

Cha ter 6V K Sear,h 'age Fig G K 1I: Aew *ntit! O$<e,t 22. Set the $e&ow )a&ues .or the *O: EO *ro0erties%
Name Em$lo3eeEO %a 8a9e hola)ora le)a$$#)2nd)# hema)#erver S hema Obje ! EM%

Fig G K 10: *ntit! O$<e,t 'ro erties 2L. C&i,k Ae+t.

'age JJ

Cha ter 6V K Sear,h 'age

Fig G K 1/: *ntit! O$<e,t 'ro erties 2G. A&& the attri$utes .rom the *M' ta$&e wi&& $e dis &a!ed. %he *O shou&d a&wa!s ,ontain the entire attri$utes .rom the ta$&e. 2I. C&i,k Ae+t. 20. 6n the Fa)a methods ,he,k the Create( @e&ete and Va&idation methods.

'age J#

Cha ter 6V K Sear,h 'age

Fig G K 1J: *ntit! O$<e,t 'ro erties 2/. C&i,k Ae+t and Finish. 2J. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd.s,hema.ser)er and se&e,t new [ *ntit! O$<e,t. 2#. Set the $e&ow )a&ues: EO *ro0erties%
Name De$ar!men!EO %a 8a9e hola)ora le)a$$#)2nd)# hema)#erver S hema Obje ! DE%7

'age #0

Cha ter 6V K Sear,h 'age

Fig G K 1#: *ntit! O$<e,t 'ro erties L0. A&& attri$utes in the @e t ta$&e wi&& $e dis &a!ed. L1. C&i,k Ae+t.

'age #1

Cha ter 6V K Sear,h 'age L2. Che,k the Create ( @e&ete and Va&idation methods.

Fig G K 20: *ntit! O$<e,t 'ro erties

'age #2

Cha ter 6V K Sear,h 'age LL. C&i,k Ae+t and Finish. LG. 1ight ,&i,k on ,ho&a.ora,&e.a s.s,hema.ser)er and se&e,t Aew [ Asso,iation. LI. An Asso,iation O$<e,t is ,reated here in order to <oin the *m and @e t ta$&e so that we get the @e artment Aame as we&& in the detai&s. L0. Set the $e&ow )a&ues: AO *ro0erties%
Name Em$7oDe$!4O %a 8a9e / hola)ora le)a$$#)# hema)#erver

'age #L

Cha ter 6V K Sear,h 'age Fig G K 21: Asso,iation O$<e,t 'ro erties

'age #G

Cha ter 6V K Sear,h 'age L/. C&i,k Ae+t and se&e,t the $e&ow )a&ues:
Cardinali!3 / ? !o '))( Sour e 4!!ribu!e De$!no@Em$lo3eeEOA De#!ina!ion 4!!ribu!e De$!no @ De$ar!men!EOA

LJ. C&i,k Add and then Ae+t and Finish.

Fig G K 22: Asso,iation O$<e,t 'ro erties L#. C&i,k Ae+t and Finish.

'age #I

Cha ter 6V K Sear,h 'age G0. 1ight ,&i,k on ,ho&a.ora,&e.a s.ad).ser)er and se&e,t new [ View O$<e,t.

'age #0

Cha ter 6V K Sear,h 'age G1. Set the $e&ow )a&ues: O *ro0erties%
Name Em$De!ail#VO

'a,kage 4 ,ho&a.ora,&e.a s.ad).ser)er

Fig G K 2L: View O$<e,t 'ro erties G2. C&i,k Ae+t. Se&e,t the *m &o!ee*O and @e artment*O and shutt&e it to the right side. Set the Asso,iation .or @e artment*O as *m %o@e tAO.@e artmemt*O1. Che,k the - data$&e.

'age #/

Cha ter 6V K Sear,h 'age

Fig G K 2G: View O$<e,t 'ro erties GL. C&i,k Ae+t. GG. From the *m &o!ee*O se&e,t *m no( *name(Sa&(Fo$( 7iredate(Comm(Address1(Cit!(State(Countr!(@e tno and .rom @e artment*O se&e,t @name(Bo, and @e tno.

'age #J

Cha ter 6V K Sear,h 'age

Fig G K 2I: View O$<e,t 'ro erties GI. C&i,k Ae+t. 6n the SCB statement ,&i,k on *+ ert Mode and use the $e&ow 3uer!: S2) 2uery%
(-3-C& -mployee-,.-1P',. -mployee-,.-'$1-. -mployee-,.4,5. -mployee-,.)I0-6$&-. -mployee-,.($3. -mployee-,.6-P&', $( 6-P&',7. -mployee-,.C,11. -mployee-,.$660-((7. -mployee-,.CI&8.

'age ##

Cha ter 6V K Sear,h 'age


-mployee-,.(&$&-. -mployee-,.C,9'&08. 6epartment-,.6-P&',. 6epartment-,.6'$1-. 6epartment-,.3,C /0,1 -1P -mployee-,. 6-P& 6epartment-, :)-0- -mployee-,.6-P&', " 6epartment-,.6-P&',(+

Code Bisting G 4 2: SCB Cuer!

Fig G K 20: View O$<e,t 'ro erties G0. C&i,k Ae+t and in the Fa)a methods ,he,k *m @etai&s1ow6m &.<a)a and ,&i,k Finish. Ora,&e standard is to a&wa!s ,reate the row6m &.<a)a .i&e .or the VO's whi,h wi&& im ro)e the er.orman,e. 'age 100

Cha ter 6V K Sear,h 'age

Fig G K 2/: View O$<e,t 'ro erties G/. 1ight ,&i,k on Cho&aAd)AM and ,&i,k *dit Cho&aAd)AM. 2hene)er a VO is ,reated it needs to $e asso,iated with the AM $e.ore use. GJ. Shutt&e the *m @etai&sVO to the right side and ,&i,k Ok. G#. 1ight ,&i,k on the ro<e,t and se&e,t Aew. I0. 6n 2e$ %ier [ OA Com onents se&e,t 'age.

'age 101

Cha ter 6V K Sear,h 'age

Fig G K 2J: Aew 'age I1. Set the $e&ow )a&ues: *age *ro0erties%
Name Em$lo3eeMana9er%< %a 8a9e hola)ora le)a$$#)2nd)adv)&ebui

'age 102

Cha ter 6V K Sear,h 'age

Fig G K 2#: 'age 'ro erties I2. 6n the stru,ture ane o. *m &o!eeManager'G( set the $e&ow ro erties .or region1. Region9 0ro0erties%
-d %a9e6a3ou!RN 4M De2ini!ion hola)ora le)a$$#)2nd)adv)#erver)Chola4dv4M ;indo& 7i!le / Chola=# Sear h %a9e %a9e 7i!le Sear h Em$lo3ee

IL. 1ight ,&i,k 'ageBa!out1A and se&e,t Aew [ 1egion. IG. Set the $e&ow ro erties 2ueryR" 0ro0erties%
-d Buer3RN Re9ion S!3le Cuer3 Con#!ru !ion Mode au!oCu#!omiDa!ionCri!eria

II. 1ight ,&i,k on Cuer!1A and se&e,t Aew [ 1egion using wiMard. I0. Se&e,t the Cho&aAd)AM and then se&e,t *m @etai&sVO1 and ,&i,k Ae+t.

'age 10L

Cha ter 6V K Sear,h 'age

Fig G K L0: 'age 'ro erties I/. Set the 1egion 6d as 1esu&ts%a$&e and 1egion St!&e as ta$&e. C&i,k Ae+t.

'age 10G

Cha ter 6V K Sear,h 'age

Fig G K L1: 'age 'ro erties IJ. Shutt&e a&& the attri$utes to the right side.

'age 10I

Cha ter 6V K Sear,h 'age

Fig G K L2: 'age 'ro erties I#. Change the item st!&e o. a&& the attri$utes to messageSt!&ed%e+t and set the 'rom t as er the s,reen shot. C&i,k Ae+t and .inish.

'age 100

Cha ter 6V K Sear,h 'age

Fig G K LL: 'age 'ro erties 00. Set the 2idth o. 1esu&ts%a$&e to 100\.

'age 10/

Cha ter 6V K Sear,h 'age 01. 1ight ,&i,k on Cuer!1A and se&e,t new [ sim &eSear,h'ane&.

Fig G K LG: 'age 'ro erties 02. Set the header 6d to Sim &eSear,h7eader. 0L. 1ight ,&i,k 1egion1 and se&e,t new [ message%e+t6n ut. 0G. Set the $e&ow r o erties MessageTe/tIn0ut *ro0erties%
-d Sear hEm$Name %rom$! / Name

0I. 1ight ,&i,k 1egion1 and se&e,t new [ message%e+t6n ut. 00. Set the $e&ow ro erties MessageTe/tIn0ut *ro0erties%
-d Sear hEm$No %rom$! / Number

0/. 1ight ,&i,k on Cuer!1A and se&e,t new [ sim &eSear,hMa ings. 'age 10J

Cha ter 6V K Sear,h 'age

Fig G K LI: 'age 'ro erties 0J. Set the $e&ow ro erties .or the de.au&t ,riteriaMa 1. 'riteriaMa09 *ro0erties%
-d NameMa$ Sear h -!em Sear hEm$Name Re#ul!# -!em Ename

0#. 1ight ,&i,k sim &eSear,hMa ings and ,&i,k new [ ,riteriaMa .Set the $e&ow ro erties 'riteriaMa0: *ro0erties%
-d NoMa$ Sear h -!em Sear hEm$No Re#ul!# -!em Em$no

/0. Sa)e !our work and run the *m &o!eeManager'G.

'age 10#

Cha ter 6V K Sear,h 'age

/1. %he age shou&d &ook &ike $e&ow:

Fig G K L0: Out ut /2. %he out ut shou&d &ook &ike $e&ow:

Fig G K L/: Out ut

'age 110

Cha ter 6V K Sear,h 'age

Adding Attachments to the 0esults &able


Atta,hments ,an $e added in a ta$&e or an ad)an,ed ta$&e where we ,an atta,h a .i&e or te+t or -1B. Bet us see the ste s in)o&)ed in im &ementing the atta,hments. 1. Go to the *m &o!eeManager'G and in the Stru,ture ane right ,&i,k on the 1esu&ts%a$&e and se&e,t Aew [ 6tem.

Fig G K LJ: Aew 6tem 2. Set the $e&ow ro erties .or the new 6tem. 6@ K Atta,hment 6tem St!&e K atta,hment6mage View 6nstan,e K *m @etai&sVO1 Automati, Sa)e K %rue 'rom t 4 Atta,h L. A entit!Ma 1 gets ,reated automati,a&&! and set its *ntit! ro ert! to Cho&a. G. 1ight ,&i,k on entit!Ma 1 and se&e,t new [ 'age 111 rimar!?e!s.

Cha ter 6V K Sear,h 'age I. Set the $e&ow )a&ues .or the 'rimar!?e!1.

'age 112

Cha ter 6V K Sear,h 'age

View Attri$ute 4 *m no 0. Sa)e !our work and 1un the *m &o!eeManager'G. /. =ou ,an noti,e a new ,o&umn in the 1esu&ts%a$&e . J. C&i,k on the Z s!m$o& and atta,h a new .i&e. #. Se&e,t a .i&e and ,&i,k on A &!.

Fig G K L#: Add Atta,hment 'age 11L

Cha ter 6V K Sear,h 'age 10. A ,on.irmation message is dis &a!ed. =ou ,an noti,e a new i,on in the Atta,h ,o&umn.

Fig G K G0: Out ut

Fig G K G1: Out ut

'age 11G

Cha ter 6V K Sear,h 'age

Summary% 6n Cha ter 6V( we &earned how to do the $e&ow &a$s: Auto CustomiMation Criteria Sear,h. Adding Atta,hments to the 1esu&ts %a$&e.

'age 11I

Cha ter 6V K Sear,h 'age

CHAPTER

&
Advanced Table

'age 110

Cha ter V K Ad)an,ed %a$&e

Chapter % Advanced Table


6n Cha ter V( we wi&& $e ,o)ering the $e&ow to i,s:

Con)ert 1esu&ts %a$&e into Ad)an,ed %a$&e. Add Create .un,tiona&it! Adding 'o &ist and BOV to the Ad)an,ed %a$&e Add Sing&e Se&e,t @e&ete .un,tiona&it!. Con)ert Sing&e Se&e,t @e&ete to Mu&ti Se&e,t @e&ete

'age 11/

Cha ter V K Ad)an,ed %a$&e

#onvert 0esults &able into Advanced &able


%he ad)antage o. using the Ad)an,ed %a$&e is that we ,an ,reate( - date and @e&ete re,ords using the Ad)an,ed %a$&e itse&.. B! adding ta$&e a,tions we ,an ,reate a @e&ete $utton .or de&eting re,ords. Add Another 1ow .eature a&&ows user to ,reate a new re,ord. %hat's the ad)antage o. using the Ad)an,ed %a$&e. Bet us see the ste s in ,reating the Ad)an,ed %a$&e. 1. Go to the *m &o!eeManager'G and right ,&i,k on Cuer!1A and se&e,t new [ 1egion. 2. Set the $e&ow ro erties: Table *ro0erties%
-D Re#ul!#4dv7able Re9ionS!3le advan ed7able Vie& -n#!an e Em$De!ail#VO( ;id!h / E'F L. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn.

G. 2e wi&& the e+isting items in the ta$&e to ,reate the ad)an,ed ta$&e whi,h wi&& sa)e a &ot o. e..ort. I. @rag the *m no .rom the 1esu&ts%a$&e and dro it inside the ,o&umn1.

Fig I K 1: 1esu&ts %a$&e 0. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t 'age 11J

Cha ter V K Ad)an,ed %a$&e the sorta$&e7eader and set the *rom0t to *m Ao. /. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. J. @rag the *name .rom the 1esu&ts%a$&e and dro it inside the ,o&umn2. #. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to *m Aame. 10. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. 11. @rag the Fo$ .rom the 1esu&ts%a$&e and dro it inside the ,o&umnL. 12. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Fo$. 1L. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. 1G. @rag the 7iredate .rom the 1esu&ts%a$&e and dro it inside the ,o&umnG. 1I. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to 7ire @ate. 10. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. 1/. @rag the @e tno1 .rom the 1esu&ts%a$&e and dro it inside the ,o&umnI. 1J. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to @e t Aum. 1#. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. 20. @rag the Sa& .rom the 1esu&ts%a$&e and dro it inside the ,o&umn0. 21. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Sa&ar!. 22. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. 2L. @rag the Comm .rom the 1esu&ts%a$&e and dro it inside the ,o&umn/. 2G. 1ight ,&i,k on the ,o&umn and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Comm. 2I. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umnGrou 20. 1ight ,&i,k on ,o&umnGrou 1 and se&e,t new 4X ,o&umn. 'age 11#

Cha ter V K Ad)an,ed %a$&e 2/. @rag the Address1 .rom .rom the 1esu&ts%a$&e and dro it inside the ,o&umnJ. 2J. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Address1. 2#. 1ight ,&i,k on ,o&umnGrou 1 and se&e,t new 4X ,o&umn. L0. @rag the Cit! .rom .rom the 1esu&ts%a$&e and dro it inside the ,o&umn#. L1. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Cit!. L2. 1ight ,&i,k on ,o&umnGrou 1 and se&e,t new 4X ,o&umn. LL. @rag the State .rom .rom the 1esu&ts%a$&e and dro it inside the ,o&umn10. LG. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to State. LI. 1ight ,&i,k on ,o&umnGrou 1 and se&e,t new 4X ,o&umn.@rag the Countr! .rom .rom the 1esu&ts%a$&e and dro it inside the ,o&umn11. L0. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Countr!. L/. 1ight ,&i,k on ,o&umnGrou 1's ,o&umn7eader and ,&i,k new [ sorta$&e7eader. LJ. Set the 'rom t as Address. L#. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. G0. @rag the @e tname .rom the 1esu&ts%a$&e and dro it inside the ,o&umn12. G1. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to @e t Aame. G2. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new 4X ,o&umn. GL. @rag the Atta,hment .rom the 1esu&ts%a$&e and dro it inside the ,o&umn1L. GG. 1ight ,&i,k on the ,o&umn and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Atta,h. GI. @e&ete the Bo, and @e tno .rom the ta$&e. G0. Sa)e !our work and 1un the *m &o!eeManager'G to test i. the age is 'age 120

Cha ter V K Ad)an,ed %a$&e working .ine.

'age 121

Cha ter V K Ad)an,ed %a$&e

#reate Functionality
Create Fun,tiona&it! ,an $e a,hie)ed in the Ad)an,ed %a$&e $! adding a ta$&e .ooter whi,h in turn ,ontains the Add Another 1ow $utton in the Ad)an,ed %a$&e. Bet us see the ste s in ,reating the $utton. 1. 1ight ,&i,k on the 1esu&tsAd)%a$&e o. the *m &o!eeManager'G and se&e,t Aew [ .ooter. 2. 1ight ,&i,k on ta$&eFooter1 and se&e,t add%a$&e1ow. L. Set the $e&ow ro erties: Add Another Row *ro0erties%
-d / 4dd4no!herRo& %rom$! / 4dd 4no!her Ro& Ro&#7o4dd ( -n#er! Ro&# 4u!oma!i all3 / 2al#e

G. Change the 6tem St!&e o. a&& the items inside the 1esu&tsAd)%a$&e to message%e+t6n ut sin,e the user wi&& ha)e the .&e+i$i&it! to enter data and ,reate a new em &o!ee in the ad)an,ed ta$&e itse&.. I. 1ight ,&i,k on 'ageBa!out1A. Set the 1egion st!&e [ ageButtonBar. 0. 1ight ,&i,k the ageButtonBar and se&e,t new4X 6tem /. Set the $e&ow ro erties:

-D 4$$l3 -!em S!3le / #ubmi!"u!!on %rom$! / 4$$l3

J. 1ight ,&i,k the ageButtonBar and se&e,t new4 6tem.


-D Can el -!em S!3le / #ubmi!"u!!on

'age 122

Cha ter V K Ad)an,ed %a$&e


%rom$! / Can el

'age 12L

Cha ter V K Ad)an,ed %a$&e #. -se the $e&ow ,ode .or de.au&ting a em no in the *m &o!ee*O6m &.<a)a 3efault Em0 no%
,$65&ransaction transaction " get,$65&ransaction( * 'umber employeeId " transaction.get(e;uence<alue("-1P3,8--(=(" * set-mpno(employeeId *

Code Bisting I 4 1: *m &o!ee*O6m &.<a)a Code 10. 1ight ,&i,k on 1esu&tsAd)%a$&e and ,&i,k Set new Contro&&er. 11. Set the $e&ow ro erties 'ontroller %
Name Re#ul!#4dv7ableCO %a 8a9e hola)ora le)a$$#)2nd)adv)&ebui

12. -se the $e&ow ,ode .or hand&ing the Add Another 1ow $utton in the ro,essForm1e3uest o. Resu&tsAd)%a$&eCO . 4andle Add Another Row% im ort ora,&e.a s..nd..ramework.OAA &i,ationModu&e> im ort ora,&e.a s..nd..ramework.we$ui.$eans.OA2e$Bean>
,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * if ("0esults$d%&able".e;uals(pageContext.getParameter((,90C-=P$0$1 >> $66=0,:(=-<-'&.e;uals(pageContext.getParameter(-<-'&=P$0$1 # am.in%oke1ethod("create-mployee" * 2

Code Bisting I 4 2: Add Another 1ow Button Code 1L. 1ight ,&i,k on 'ageBa!out1A and ,&i,k Set net Contro&&er. 'ontroller %

'age 12G

Cha ter V K Ad)an,ed %a$&e


Name Em$lo3eeMana9erCO %a 8a9e hola)ora le)a$$#)2nd)adv)&ebui

1G. -se the $e&ow ,ode in the ro,essForm1e3uest to hand&e A $utton. 4andle A00ly and 'ancel +uttons% im ort ora,&e.a s..nd..ramework.OAA &i,ationModu&e> im ort ora,&e.a s..nd..ramework.we$ui.%ransa,tion-nit7e& er> im ort ora,&e.a s..nd..ramework.we$ui.$eans.OA2e$Bean>

&! and Can,e&

,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * if (pageContext.getParameter("$pply" !" null # am.in%oke1ethod("apply" * 2 else if (pageContext.getParameter("Cancel" !" null # am.in%oke1ethod("rollback-mployee" * &ransaction9nit)elper.end&ransaction9nit(pageContext. "empCreate&xn" * 2

Code Bisting I K L : 'ro,ess Form 1e3uest Code

'age 12I

Cha ter V K Ad)an,ed %a$&e 1I. 6n the Cho&aAd)AM6m &.<a)a use the $e&ow ,ode: 'reateEm0loyee Method% im ort ora,&e.a s..nd..ramework.OAViewO$<e,t> im ort ora,&e.<$o.1ow>
public %oid create-mployee( # ,$<iew,b?ect %o " (,$<iew,b?ect get-mp6etails<,7( * if (!%o.isPrepared/or-xecution( # %o.set1ax/etch(i@e(A * 2 0ow row " %o.create0ow( * %o.last( * %o.next( * %o.insert0ow(row * row.set'ew0ow(tate(0ow.(&$&9(=I'I&I$3IB-6 * 2

Code Bisting I K G : Create *m &o!ee Code 10. 6n the Cho&aAd)AM6m &.<a)a use the $e&ow ,ode: A00ly Method%
public %oid apply( # get&ransaction( .commit( * 2

Code Bisting I K I : A

&! method Code

'age 120

Cha ter V K Ad)an,ed %a$&e 1/. 6n the Cho&aAd)AM6m &.<a)a use the $e&ow ,ode Rollback Method% im ort ora,&e.<$o.%ransa,tion>
public %oid rollback-mployee( # &ransaction txn " get&ransaction( * if (txn.is6irty( # txn.rollback( * 2 2

Code Bisting I K 0 : 1o&&$a,k method Code 1J. Sa)e !our work and run the *m &o!eeManager'G. 1#. C&i,k on Add Another 1ow. A new rows gets inserted with a de.au&t )a&ue on the *m no.

Fig I K 2: Out ut

'age 12/

Cha ter V K Ad)an,ed %a$&e 20. *nter )a&ues .or other .ie&ds and ,&i,k A ta$&e. 21. Set the &ength o. the $e&ow attri$utes: *m Ao K G *name K 10 Fo$ K # @e tAo1 K 2 Sa& K / Comm K / @name K 1G &!. A new row gets added in the

'age 12J

Cha ter V K Ad)an,ed %a$&e

Adding !oplist and .O' to the Advanced &able


'o &ist is nothing $ut a dro down &ist whi,h ,ontains )arious )a&ues and the user ,an ,hoose an! )a&ue .rom the &ist. %he item st!&e .or o &ist is messageChoi,e. BOV is nothing $ut &ist o. )a&ues where the user ,an sear,h .or a re,ord $! gi)ing sear,h ,riteria. %he item st!&e .or BOV is messageBo)6n ut. BOV's ,an $e ,reated in 2 wa!s: 6nterna& BOV 6nterna& BOV is the BOV whi,h wi&& $e ,reated within that arti,u&ar attri$ute and ,annot $e used $! an! other age. 6t is not re4usa$&e. *+terna& BOV *+terna& BOV is the BOV whi,h is ,reated as a new region and ,an $e asso,iated with an! attri$ute in an! age. 6t is a re4usa$&e ,om onent that ,an $e used a,ross ages. 6n this we wi&& $e using the *+terna& BOV whi,h wi&& $e used $! mu&ti &e ages. Bet us see the ste s in ,reating the 'o &ist and BOV. 1. 1ight ,&i,k on the ro<e,t and se&e,t Aew [ Business %ier [ A@F Business Com onents [ View O$<e,t. 2. Set the .o&&owing ro erties: O *ro0erties%
Name / De$!Name#VO %a 8a9e / hola)ora le)a$$#)2nd)lov)#erver

'age 12#

Cha ter V K Ad)an,ed %a$&e

Fig I K L: View O$<e,t 'ro erties L. Go to the SCB statements ste and use the $e&ow 3uer!: S*B*C% @name( @e tno .rom @e t

Code Bisting I K / : SCB Cuer! G. -n,he,k the @e tAamesVO6m &.<a)a8sin,e we won't $e writing an! ,ode in the .i&e; and ,he,k the @e tAamesVO1ow6m &.<a)a8good ra,ti,e to do so; and ,&i,k Finish. I. *dit the Cho&aAd)AM and shutt&e the @e tAamesVO to the right ,&i,k and ,&i,k Ok. 'age 1L0

Cha ter V K Ad)an,ed %a$&e 0. 1ight ,&i,k ro<e,t and se&e,t View O$<e,t in the A@F Business Com onents . Set a,kage as ,ho&a.ora,&e.a s..nd. o &ist.ser)er . /. Aame the VO as -obs O and ,&i,k Ae+t.

'age 1L1

Cha ter V K Ad)an,ed %a$&e

Fig I K G: View O$<e,t 'ro erties J. Go to the SCB statement and aste the $e&ow 3uer!:
(-3-C& meaning. lookup=code /0,1 fnd=lookups :)-0- lookup=type " CC),3$=4,5C

Code Bisting I K J: SCB Cuer! #. Che,k on&! the Fo$sVO1ow6m &.<a)a and ,&i,k Finish. 10. Change the 6tem St!&e o. 3e0tname to message)o&In0ut and -ob to message'hoice.

'age 1L2

Cha ter V K Ad)an,ed %a$&e 11. Set the $e&ow ro erties Fo$: 3e0tname *ro0erties% 'i,k&ist View @e.inition 4 ,ho&a.ora,&e.a s..nd. o &ist.ser)er.Fo$sVO 'i,k&ist View 6nstan,e K Fo$sVO1 'i,k&ist @is &a! Attri$ute K Meaning
%i 8li#! Value 4!!ribu!e / 6oo8u$Code

12. 1ight ,&i,k on the ro<e,t and ,&i,k Aew. 6n the OACom onents [ Se&e,t 1egion. 1L. Set the $e&ow ro erties: Region *ro0erties% 6d 4 @e tAamesBo)1A 'a,kage K ,ho&a.ora,&e.a s..nd.&o).we$ui 1egion St!&e 4 &istO.Va&ues

Fig I K I: 1egion 'ro erties 1G. Set the S,o e to 'u$&i,. 1I. 1ight ,&i,k on @e tAamesBo)1A on the stru,ture ane and ,&i,k %a$&e using wiMard. 10. Choose the Cho&aAd)AM and then ,&i,k on @e tAamesVO1 and ,&i,k Ae+t.

'age 1LL

Cha ter V K Ad)an,ed %a$&e

Fig I K 0: 1egion 'ro erties 1/. Shutt&e the a&& the attri$utes to the right. 1J. C&i,k Ae+t and Finish. 1#. Set the S,o e o. @e tAamesBo)1A in the stru,ture ane to 'u$&i,. 20. Set the Sear,hA&&owed ro ert! .or @e tno and @name to %rue. 21. 6n the 'age set the *+terna& BOV ro ert! o. @Aame to ;chola;oracle;a00s;fnd;lo&;webui;3e0t"ames)o&R".6n the de.au&t &o)ma 22. Set the $e&ow ro erties )o&Ma0 0ro0erties%
-d DnameMa$ 6OV Re9ion -!em Dname Re!urn -!em De$!name Cri!eria -!em / De$!name

'age 1LG

Cha ter V K Ad)an,ed %a$&e

'age 1LI

Cha ter V K Ad)an,ed %a$&e 2L. 1ight ,&i,k on Bo)ma ings and se&e,t new [ &o)Ma . )o&Ma0 0ro0erties%
-d DnoMa$ 6OV Re9ion -!em De$!no Re!urn -!em De$!no(

'age 1L0

Cha ter V K Ad)an,ed %a$&e

Add "ingle "elect %elete functionality


Sing&e @e&ete as the name suggest the user ,an de&ete on&! one re,ord at a time in the ad)an,ed %a$&e. %he sing&e de&ete .un,tiona&it! ,an $e a,hie)ed $! adding a radio $utton to the ta$&e and adding ta$&eA,tions to the Ad)an,ed %a$&e. 2hene)er the user ,&i,ks on the radio $utton and then ,&i,k on @e&ete $utton the re,ord wi&& $e de&eted. 1. *dit the *m @etai&sVO1 and ,&i,k on Attri$utes ta$. 2. C&i,k on Aew. L. Set the $e&ow )a&ues:
Name Sele !.la9 73$e S!rin9 U$da!able 4l&a3#

'age 1L/

Cha ter V K Ad)an,ed %a$&e G. C&i,k Ok.

Fig I K /: Aew Attri$ute I. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new [ sing&eSe&e,tion8 adds a radio $utton in the ta$&e;.

Fig I K J: Aew Sing&e Se&e,tion 'age 1LJ

Cha ter V K Ad)an,ed %a$&e 0. Set the $e&ow )a&ues:


Vie& 4!!ribu!e Sele !.la9 7e:! Sele !

/. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new [ ta$&eA,tions.

Fig I K #: Aew %a$&e A,tion J. 1ight ,&i,k on region2 and se&e,t new [ 6tem.Set the $e&ow ro erties
-d Dele!e %rom$! Dele!e 4 !ion 73$e 2ire4 !ion Even! / dele!e

#. -se the $e&ow ,ode in the ro,essForm1e3uest o. 1esu&tsAd)%a$&eCO. 3elete E&ent%


if ("delete".e;uals(pageContext.getParameter(-<-'&=P$0$1 # am.in%oke1ethod("delete-mp" * am.in%oke1ethod("apply" * 2

'age 1L#

Cha ter V K Ad)an,ed %a$&e Code Bisting I K #: 7and&e @e&ete *)ent 10. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a 3eleteEm0 Method%
public %oid delete-mp( # ,$<iew,b?ect %o " (,$<iew,b?ect get-mp6etails<,7( * -mp6etails<,0owImpl row " null* int fetched0owCount " %o.get/etched0owCount( * int sa%ed0ange(i@e " A* int sa%ed0ange(tart " A* if (fetched0owCount D A # sa%ed0ange(i@e " %o.get0ange(i@e( * sa%ed0ange(tart " %o.get0ange(tart( * %o.set0ange(tart(A * %o.set0ange(i@e(fetched0owCount * set0ange(tart(A * set0ange(i@e(fetched0owCount * 0owEF rows " %o.get$ll0owsIn0ange( * for (int i " A* i G fetched0owCount* i++ # if (rowsEiF !" null >> "8".e;uals(rowsEiF.get$ttribute("(elect/lag" //call to delete api # rowsEiF.remo%e( * 2 2 2 %o.set0ange(i@e(sa%ed0ange(i@e * %o.set0ange(tart(sa%ed0ange(tart * 2

Code Bisting I K 10: @e&ete Method 11. Sa)e !our work and run the *m &o!eeManager'G. 12. C&i,k Go and a&& the re,ords wi&& $e dis &a!ed. 1L. C&i,k on an! o. the radio $uttons and ,&i,k @e&ete. 'age 1G0

Cha ter V K Ad)an,ed %a$&e

Fig I K 10: 1egion 'ro erties 1G. =ou wi&& noti,e that re,ord is not resent.

'age 1G1

Cha ter V K Ad)an,ed %a$&e

#onvert "ingle "elect %elete to *ulti "elect %elete


Mu&ti @e&ete gi)es the user the .&e+i$i&it! to de&ete mu&ti &e re,ords at one time. %his ,an $e a,hie)ed $! adding a ,he,k $o+ to the Ad)an,ed %a$&e8 we a&read! ha)e the ta$&e A,tions that we added in the Sing&e @e&ete; . %he user ,an se&e,t mu&ti &e re,ords and ,&i,k @e&ete and the rows wi&& $e de&eted. 1. For ,on)erting the sing&e se&e,tion to mu&ti se&e,tion de&ete the sing&e se&e,tion in the *m &o!eeManager'G. 2. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new [ mu&tiSe&e,tion.

Fig I K 11: 1egion 'ro erties L. Set the $e&ow ro erties Multi Select *ro0erties%
-D Mul!iSele ! 7e:! Sele ! Vie& 4!!ribu!e Sele !.la9

G. Sa)e !our work and 1un the *m &o!eeManager'G. I. =ou ,an see that there is a ,he,k$o+ in the .irst ,o&umn. Se&e,t the .irst 2 re,ords and ,&i,k @e&ete. 'age 1G2

Cha ter V K Ad)an,ed %a$&e

Fig I K 12: Out ut

'age 1GL

Cha ter V K Ad)an,ed %a$&e 0. =ou wi&& see on&! 1 re,ord now. %he 2 rows ha)e $een de&eted.

Fig I K 1L: Out ut

'age 1GG

Cha ter V K Ad)an,ed %a$&e

Summary% 6n Cha ter V we &earned how to do the $e&ow &a$s : Con)ert 1esu&ts %a$&e into Ad)an,ed %a$&e. Add Create .un,tiona&it! Adding 'o &ist and BOV to the Ad)an,ed %a$&e Add Sing&e Se&e,t @e&ete .un,tiona&it!. Con)ert Sing&e Se&e,t @e&ete to Mu&ti Se&e,t @e&ete

'age 1GI

Cha ter V K Ad)an,ed %a$&e

CHAPTER

'
(ependen )O* and Poplis

'age 1G0

Cha ter V6 K @e endent BOV and 'o &ist

Chapter %I +ependent &O% and )oplist


6n Cha ter V6 ( we wi&& $e ,o)ering the $e&ow to i,s: @e endent 'o &ist @e endent BOV Goog&e St!&e Auto Suggest BOV

'age 1G/

Cha ter V6 K @e endent BOV and 'o &ist

%ependent !oplist
@e endent 'o &ist is one o. the ,ommon re3uirement where one o &ist )a&ue de ends on the )a&ue se&e,ted in another o &ist. For e+am &e the )a&ue o. State o &ist de ends on the )a&ue ,hosen in the Countr! 'o &ist. Bet us see the ste s in)o&)ed in ,reating the @e endent 'o &ist. 1. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd. o &ist.ser)er and se&e,t new [ View O$<e,t. 2. Set the Aame as Countr!VO and ,&i,k Ae+t. L. Go to the SCB Statement and use the $e&ow 3uer!: 'ountry O 2uery%
SE6EC7 meanin9G loo8u$_ ode .ROM 2nd_loo8u$_value#_vl ;HERE loo8u$_!3$e H =CHO64_COUN7RI=

Code Bisting 0 K 1: SCB Cuer! G. -n,he,k the Countr!VO6m &.<a)a and ,he,k the Countr!VO1ow6m &.<a)a and ,&i,k Finish. I. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd. o &ist.ser)er and se&e,t new [ View O$<e,t. 0. Set the Aame as StateVO and ,&i,k Ae+t. /. Go to the SCB Statement and use the $e&ow 3uer!: State O 2uery%
SE6EC7 meanin9G loo8u$_ odeG!a9 .ROM 2nd_loo8u$_value#_vl ;HERE loo8u$_!3$e H =CHO64_S747E= and !a9H:(

Code Bisting 0 K 12 SCB Cuer! J. Che,k the StateVO1ow6m &.<a)a and ,&i,k Finish. #. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd. o &ist.ser)er and se&e,t new [ View 'age 1GJ

Cha ter V6 K @e endent BOV and 'o &ist O$<e,t. 10. Set the Aame as Cit!VO and ,&i,k Ae+t. 11. Go to the SCB Statement and use the $e&ow 3uer!: 'ity O 2uery%
SE6EC7 meanin9G loo8u$_ odeG!a9 .ROM 2nd_loo8u$_value#_vl ;HERE loo8u$_!3$e H =CHO64_C-7I=

Code Bisting 0 K L: SCB Cuer! 12. -n,he,k the Cit!VO6m &.<a)a and ,he,k the Cit!VO1ow6m &.<a)a and ,&i,k Finish. 1L. *dit the Cho&aAd)AM and shutt&e the Countr!VO( StateVO and Cit!VO to the right side. 1G. Go to *m &o!eeManager'G and ,hange the 6tem St!&e o. Countr! to messageChoi,e. 1I. Set the $e&ow ro erties .or Countr!: 'ountry Item *ro0erties%
%i 8li#! Vie& De2ini!ion / hola)ora le)a$$#)2nd)$o$li#!)#erver)Coun!r3VO %i 8li#! Vie& -n#!an e Coun!r3VO( %i 8li#! Di#$la3 4!!ribu!e Meanin9 %i 8li#! Value 4!!ribu!e 6oo8u$Code 4 !ion 73$e 2ire%ar!ial4 !ion Even! / oun!r3

10. A,tion %! e is set in order to .ire an a,tion whi,h wi&& 3uer! .or the data in the StateVO so that a&& the states under the Countr! ,hosen in the o &ist wi&& $e dis &a!ed in the State o &ist. 1/. C&i,k on 'arameters and set the name as 'ountry and gi)e the )a&ue as <=oa5Em03etails O95'ountry> 1J. Go to *m &o!eeManager'G and ,hange the 6tem St!&e o. State to messageChoi,e. 'age 1G#

Cha ter V6 K @e endent BOV and 'o &ist 1#. Set the $e&ow ro erties .or State: State Item *ro0erties%
%i %i %i %i 8li#! 8li#! 8li#! 8li#! Vie& De2ini!ion / hola)ora le)a$$#)2nd)$o$li#!)#erver)S!a!eVO Vie& -n#!an e S!a!eVO( Di#$la3 4!!ribu!e Meanin9 Value 4!!ribu!e / 6oo8u$Code

20. -se the $e&ow ,ode in ro,ess1e3uest o. *m &o!eeManagerCO: *rocessRe1uest 'ode%


,$$d%anced&able5ean ad%&able " (,$$d%anced&able5ean web5ean.findChild0ecursi%e("0esults$d%&able" * ,$1essageChoice5ean empPoplist " (,$1essageChoice5ean ad%&able.findChild0ecursi%e("(tate" * empPoplist.set3ist<,5oundContainerColumn(A. ad%&able."Country" *

Code Bisting 0 K G: 'ro,ess1e3uest Code 21. -se the $e&ow ,ode in ro,essForm1e3uest o. *m &o!eeManagerCO: *rocessFormRe1uest 'ode%
if ("country".e;uals(pageContext.getParameter(,$:eb5eanConstants.-<-'&=P$ 0$1 # am.in%oke1ethod("init(tate<,Huery" * 2

Code Bisting 0 K I: 'ro,essForm1e3uest Code

'age 1I0

Cha ter V6 K @e endent BOV and 'o &ist

22. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a InitState O2uery method%
public %oid init(tate<,Huery( # (tate<,Impl %o " ((tate<,Impl get(tate<,7( * if (%o "" null # 1essage&okenEF err&okens " #new 1essage&oken(",54-C&='$1-". "County<,7" 2* throw new ,$-xception("$I". "/:I=&5J=,54-C&=',&=/,9'6". err&okens * 2 %o.executeHuery( * 2

Code Bisting 0 K 0: 6nitStateVOCuer! method 2L. Sa)e !our work and run the age. 2G. C&i,k on Add Another 1ow and se&e,t the ,ountr! as 6ndia. Aow in the State o &ist !ou wi&& see on&! the states in 6ndia. %hat is we wi&& ha)e on&! one )a&ue %ami& Aadu.

'age 1I1

Cha ter V6 K @e endent BOV and 'o &ist Fig 0 K 1: Out ut

'age 1I2

Cha ter V6 K @e endent BOV and 'o &ist 2I. Aow se&e,t the Countr! as Singa ore. %here are no states in Singa ore( so no )a&ue wi&& $e resent .or Singa ore Countr!.

Fig 0 K 2: Out ut

'age 1IL

Cha ter V6 K @e endent BOV and 'o &ist

%ependent .O'
Simi&ar to the @e endent 'o &ist we ha)e the @e endent BOV where the resu&ts wi&& o. the BOV wi&& de end on the )a&ue ,hosen in the other o &ist or BOV. 6n this we wi&& see the Cit! BOV where the )a&ues in the BOV de ends on the Countr! and State o &ist. Bet us see the ste s in ,reating the @e endent BOV. 1. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd.&o).we$ui and ,&i,k Aew [ 2e$ %ier [ OA Com onents [ 1egion. 2. Set the $e&ow )a&ues: Region *ro0erties%
Name Ci!36ovRN %a 8a9e / hola)ora le)a$$#)2nd)lov)&ebui S!3le li#!O2Value#

Fig 0 K L: Aew 1egion L. 1ight ,&i,k on Cit!Bo)1A on the stru,ture ane and se&e,t new [ ta$&e-sing2iMard. G. Se&e,t the Cho&aAd)AM and ,&i,k on Cit!VO1 and ,&i,k Ae+t.

'age 1IG

Cha ter V6 K @e endent BOV and 'o &ist

Fig 0 K G: 1egion 'ro erties

'age 1II

Cha ter V6 K @e endent BOV and 'o &ist I. Shutt&e a&& the attri$utes to the right and ,&i,k Ae+t.

Fig 0 K I: 1egion 'ro erties 0. C&i,k Ae+t and Finish. /. Set the Sco0e ro ert! o. Cit!Bo)1A to 0ublic. J. Set the Search Allowed ro ert! to %rue .or Meaning and Booku Code. #. Change the rom t and 6d o. Meaning to Cit!( Booku Code to Cit! Code. 10. Change the 6tem st!&e o. %ag to .ormVa&ue. 11. 6n the *m &o!eeManager'G ,hange the Message St!&e o. Cit! to messageBo)6n ut.Set the *+terna& BOV ro ert! o. Cit! to ;chola;oracle;a00s;fnd;lo&;webui;'ity)o&R". 'age 1I0

Cha ter V6 K @e endent BOV and 'o &ist 12. C&i,k =es when rom ted to de&ete the e+isting ma ings. 1L. Set the $e&ow ro erties .or the e+isting BOV ma .

'age 1I/

Cha ter V6 K @e endent BOV and 'o &ist

)O Ma0 *ro0erties%
-d Meanin9Ma$ 6OV Re9ion -!em Ci!3 Re!urn -!em Ci!3 Cri!eria -!em / Ci!3

1G. 1ight ,&i,k on Bo)Ma ings and se&e,t new [ Bo)Ma . 1I. Set the $e&ow ro erties .or the new BOV ma . )O Ma0 *ro0erties%
-d 7a9Ma$ 6OV Re9ion -!em 7a9 Cri!eria -!em / S!a!e

10. 1ight ,&i,k on Bo)Ma ings and se&e,t new [ Bo)Ma . 1/. Set the $e&ow ro erties .or the new BOV ma . )O Ma0 *ro0erties%
-d 6oo8u$Ma$ 6OV Re9ion -!em Ci!3Code Cri!eria -!em / Coun!r3

1J. Sa)e !our work and run the *m &o!eeManager'G. 1#. C&i,k Add Another 1ow and se&e,t Countr! as 6ndia. State as ?arnataka. 20. C&i,k on the Bo) and ,&i,k Go. 21. =ou wi&& noti,e that on&! the ,it! under the state ?arnataka is dis &a!ed.

'age 1IJ

Cha ter V6 K @e endent BOV and 'o &ist

Fig 0 K 0: Out ut 22. Aow ,hange the State to %ami& Aadu and ,&i,k the Bo).

Fig 0 K /: Out ut 'age 1I#

Cha ter V6 K @e endent BOV and 'o &ist 2L. =ou wi&& see 2 ,ities.

Fig 0 K J: Out ut

'age 100

Cha ter V6 K @e endent BOV and 'o &ist

1oogle "tyle Auto "uggest .O'

1.Go to htt :EEs,ri t.a,u&o.usEdown&oads and down&oad the ,urrent )ersion.

Fig 0 K #: S,ri ta,u&ous 2. -nMi the .i&es in !our &o,a& ma,hine. L. Co ! the rotot! e.<s .rom &i$ .o&der to the sr, .o&der.

'age 101

Cha ter V6 K @e endent BOV and 'o &ist G. %he .i&es under the sr, .o&der shou&d &ook &ike $e&ow:

Fig 0 K 10: Fo&ders I. %rans.er a&& these .i&es to ]OAW7%MB in the ser)er.Create a <s .i&e with the name as *m AutoSuggestBo)L.<s under ]OAW7%MB with the $e&ow ,ode:
<%@ page language="java" contentType="text ht!l" charset=#$%&''()&*" i!port="java+s,l+-" i!port="oracle+jdbc+driver+%racle.onnection" i!port="oracle+apps+jtf+ao!+transaction+Transaction$cope" %/ <% %racle.onnection conn = null" 0repared$tate!ent st!t = null" 1esult$et rs = null" int i=0" try 2 conn = 3%racle.onnection4Transaction$cope+get.onnection34" $tring s5a!e = re,uest+get0ara!eter3"$earch6!p5a!e"4 7 "%"" $tring s,l = "$686.T 6na!e96!pno :1%; e!p <here lo<er3ena!e4 li=e 3>4 "" st!t = conn+prepare$tate!ent3s,l4" st!t+set$tring3*9 s5a!e4" rs = st!t+execute?uery34" out+<rite3"<ul/"4" <hile 3rs+next344 2 i = i 7 *"

'age 102

Cha ter V6 K @e endent BOV and 'o &ist


out+<rite3"<li/"4" out+<rite3rs+get$tring3"6na!e"44" out+<rite3"< li/"4" @ if 3i == 04 2 out+<rite3"<li/"4" out+<rite3"<p/<b/5o 1esults :ound< b/< p/"4" out+<rite3"< li/"4" @ out+<rite3"< ul/"4" @ catch36xception e4 2 out+<rite3"failedA" 7 e+to$tring344" @ finally 2 if 3rs B= null4 rs+close34" if 3st!t B= null4 st!t+close34" if 3conn B= null4 Transaction$cope+release.onnection3conn4" @ %/

Code Bisting 0 K /: *m AutoSuggestBo)L.<s 0. Com i&e the <s .i&e using the $e&ow ,ommand: 1. e+ ort 'A%7Q]'A%7:]FA@W%O'E at,hE11IE$in 2. o<s Com i&e. & 44,om i&e 44.ast 443uiet /. Go to the *m &o!eeManager'G or the age where !ou want to im &ement the goog&e st!&e auto suggest BOV and ,&i,k 'ersona&iMe 'age. J. C&i,k on the Create 6tem i,on ne+t to 'age Ba!out. #. Set the $e&ow 'ro erties .or the new 6tem: Item *ro0erties% 6tem St!&e K raw%e+t 'age 10L

Cha ter V6 K @e endent BOV and 'o &ist 6@ K Cho&aG&o$a&Goog&eSt!&e

Fig 0 K 11: Aew 6tem 10. Set the %e+t as :

<html> <head> <title>Chola Global AutoComplete</title> <style type="text/css"> div.autocomplete { position:absolute; idth:!""px; bac#$%ound&colo%: hite; bo%de%:'px solid (ccc; ma%$in:"px; paddin$:"px; )ont&si*e:".+em; text&ali$n:le)t; max&hei$ht:,""px; ove%)lo :auto; - div.autocomplete ul { list&style&type:none; ma%$in:"px; paddin$:"px; div.autocomplete ul li.selected { bac#$%ound&colo%: (.A/,/0; - div.autocomplete ul li { list& style&type:none; display:bloc#; ma%$in:"; paddin$:,px; cu%so%:pointe%; - /1 alte%native style 1/ div.autocomplete, { position:absolute; idth:!""px; bac#$%ound&colo%: hite; bo%de%:'px solid (ccc; ma%$in:"px; paddin$:"px; )ont&si*e:".+em; text&ali$n:le)t; max&hei$ht:,""px;

'age 10G

Cha ter V6 K @e endent BOV and 'o &ist


ove%)lo :auto; - div.autocomplete, ul { list&style&type:none; ma%$in:"px; paddin$:"px; div.autocomplete, ul li.selected { bac#$%ound&colo%: (de)))); - div.autocomplete, ul li { list& style&type:none; display:bloc#; ma%$in:"; paddin$:,px; cu%so%:pointe%; - /1 ne style ve%sion ".! 1/ div.autocomplete! { position:absolute; idth:2""px; bac#$%ound&colo%:blac#; ma%$in:"px; ma%$in&le)t:2px; paddin$:"px; )ont&si*e:".+em; text&ali$n:le)t; max&hei$ht:,""px; ove%)lo :auto; colo%:()!)!)!; - div.autocomplete! ul { list&style&type:none; ma%$in:"px; paddin$:"px; - div.autocomplete! ul li.selected { bac#$%ound&colo%: (3bc+)e; colo%:blac#; div.autocomplete! ul li { list&style&type:none; display:bloc#; ma%$in:"; paddin$:,px; cu%so%:pointe%; </style> <sc%ipt type="text/4avasc%ipt" s%c="p%ototype.4s"> </sc%ipt> <sc%ipt type="text/4avasc%ipt" s%c="sc%iptaculous.4s"> </sc%ipt> <sc%ipt type="text/4avasc%ipt" s%c="e))ects.4s"> </sc%ipt> <sc%ipt type="text/4avasc%ipt" s%c="cont%ols.4s"> </sc%ipt> <sc%ipt type="text/4avasc%ipt"> )unction init56 { ne A4ax.Autocomplete%5"7ea%ch.mp8ame"9".mployee:ptions"9".mpAuto7u$$est;ov<.4sp"6; indo .onload = init; </sc%ipt> </head> <body> <)o%m> <div class="autocomplete" id=".mployee:ptions" style="position:absolute; idth:!""px; bac#$%ound&colo%: hite; bo%de%:'px solid (ccc; ma%$in:"px; paddin$:"px; )ont&si*e:".+em; text&ali$n:le)t; max&hei$ht:,""px; ove%)lo :auto; "> </div> </)o%m> </body> </html>

'age 10I

Cha ter V6 K @e endent BOV and 'o &ist

Code Bisting 0 K J: 1aw %e+t

Fig 0 K 12: Out ut 11. C&i,k A &!. 12. C&i,k on 1eturn to A &i,ation on the $ottom &e.t ,orner. 1L. 6n the Sear,h 'age( enter a )a&ue in *m Aame and !ou shou&d see a&& the em &o!ee names starting with that &etter as a dro down in the BOV.

'age 100

Cha ter V6 K @e endent BOV and 'o &ist Fig 0 K 1L: Out ut

'age 10/

Cha ter V6 K @e endent BOV and 'o &ist 1G. 6. the sear,h ,riteria did not mat,h then 9Ao 1esu&ts Found: wi&& $e dis &a!ed.

Fig 0 K 1G: Out ut 1I. 6. !ou don't want to use this Bo) then !ou ,an use the norma& BOV $! ,&i,king on the BOV i,on. %his wi&& work &ike !our standard BOV .un,tiona&it!.

'age 10J

Cha ter V6 K @e endent BOV and 'o &ist

Summary%
6n Cha ter V6 ( we &earned the $e&ow to i,s: @e endent 'o &ist @e endent BOV Goog&e St!&e Auto Suggest BOV

'age 10#

Cha ter V6 K @e endent BOV and 'o &ist

CHAPTER

+
,as er (e ail Pa%e

'age 1/0

Cha ter V66 K Master @etai& 'age

Chapter %II Master +etail )a(e


6n Cha ter V66 ( we wi&& ,o)er the $e&ow to i,s: Forms St!&e Master @etai& 'age Create @e artment and @ri&& @own to @etai&s 'age

'age 1/1

Cha ter V66 K Master @etai& 'age

Form "tyle *aster %etail !age


1. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd.ad).ser)er and se&e,t Aew [ View O$<e,t.Set the name as 3e0t'reate O. 2. Shutt&e the @e artment*O to the right side and ,&i,k Ae+t. L. Shutt&e the @e tno( @name and Bo, to the right side and C&i,k Ae+t. G. Che,k the @e tCreateVO1ow6m &.<a)a and ,&i,k .inish. I. *dit the Cho&aAd)AM and shutt&e the @e tCreateVO to the right side and ,&i,k ok. 0. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd.ad).we$ui and se&e,t Aew [ 2e$ %ier [ OA Com onents [ 'age. /. Set the name as Create@e t'G. J. C&i,k on region1 and set the $e&ow ro erties: 6d K 'ageBa!out1A AM @e.inition K,ho&a.ora,&e.a s..nd.ad).ser)er.Cho&aAd)AM 2indow %it&e 4 Cho&a's Create @e artment %it&e K Create @e artment #. 1ight ,&i,k on 'ageBa!out1A and se&e,t Aew [ region using wiMard. 10. Choose the Cho&aAd)AM and ,&i,k on @e tCreateVO1 and ,&i,k Ae+t.

'age 1/2

Cha ter V66 K Master @etai& 'age

Fig / K 1: 1egion 'ro erties 11. Set the $e&ow ro erties: 1egion 6@ K Main1A 1egion St!&e 4 de.au&tSing&eCo&umn

'age 1/L

Cha ter V66 K Master @etai& 'age

Fig / K 2: 1egion 'ro erties 12. C&i,k Ae+t and shutt&e a&& the attri$utes to the right side. 1L. C&i,k Ae+t and Finish. Se&e,t the 'ageBa!out1A in the Stru,ture ane( then right4,&i,k and se&e,t Aew X 1egion .rom the ,onte+t menu. 6@ 4 'ageButtons 1egion St!&e 4 ageButtonBar 1G. 1ight4,&i,k 'ageButtons in the Stru,ture ane( and se&e,t Aew X 6tem .rom the ,onte+t menu. Set or )eri.! the .o&&owing ro erties .or this item: 6@ 4 Can,e& 6tem St!&e 4 su$mitButton Attri$ute set 4 Eora,&eEa sE.ndEattri$utesetsEButtonsECan,e& @isa$&e Ser)er Side Va&idation 4 true @isa$&e ,&ient Side Va&idation 4 true 'rom t 4 Can,e&

'age 1/G

Cha ter V66 K Master @etai& 'age 1I. 1ight4,&i,k 'ageButtons in the Stru,ture ane( and se&e,t Aew X 6tem .rom the ,onte+t menu. Set or )eri.! the .o&&owing ro erties .or this item: 6@ 4 A &! 6tem St!&e 4 su$mitButton Attri$ute set 4 Eora,&eEa sE.ndEattri$utesetsEButtonsEA Additiona& %e+t 4 Se&e,t to sa)e this em &o!ee

&!

10. Change the 1egion St!&e o. Main1A to messageCom onentBa!out.1ight ,&i,k on 'ageBa!out1A and se&e,t new [ 1egion. Set the $e&ow ro erties: 6@ K *m @etai&s 1egionSt!&e K ad)an,ed%a$&e View 6nstan,e K *m @etai&sVO1 1/. 1ight ,&i,k on *m @etai&s and se&e,t new 4X ,o&umn. 1ight ,&i,k on ,o&um1 and se&e,t new [ 6tem. 6@ K *name 6temSt!&e K message6n ut%e+t View Attri$ute K *name 'rom t 4 *m Aame 1J. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to *m Aame. 1#. 1ight ,&i,k on *m @etai&s and se&e,t new 4X ,o&umn. 1ight ,&i,k on ,o&umn2 and se&e,t new [ 6tem. 6@ K *m Ao 'age 1/I

Cha ter V66 K Master @etai& 'age 6temSt!&e K .ormVa&ue View Attri$ute K *m no 'rom t 4 *m Aum

'age 1/0

Cha ter V66 K Master @etai& 'age

20. 1ight ,&i,k on *m @etai&s and se&e,t new 4X ,o&umn. 1ight ,&i,k on ,o&umnL and se&e,t new [ 6tem. 6@ K Fo$ 6temSt!&e K messageChoi,e 'i,k Bist View @e.inition 4 ,ho&a.ora,&e.a s..nd. o &ist.ser)er.Fo$sVO 'i,k Bist View 6nstan,e K Fo$sVO1 'i,k Bist @is &a! Attri$ute K Meaning 'i,k Bist Va&ue Attri$ute 4 Booku Code View Attri$ute K Fo$ 'rom t 4 Fo$ 21. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Fo$. 22. 1ight ,&i,k on *m @etai&s and se&e,t new 4X ,o&umn. 1ight ,&i,k on ,o&umnG and se&e,t new [ 6tem. 6@ K Sa&ar! 6temSt!&e K message6n ut%e+t View Attri$ute K Sa& 'rom t 4 Sa&ar! 2L. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to Sa&ar!. 2G. 1ight ,&i,k on *m @etai&s and se&e,t new 4X ,o&umn. 1ight ,&i,k on ,o&umnI and se&e,t new [ 6tem. 6@ K 7ire@ate 6temSt!&e K message6n ut%e+t View Attri$ute K 7iredate 'rom t K 7ire @ate

'age 1//

Cha ter V66 K Master @etai& 'age 2I. 1ight ,&i,k on the ,o&umn7eader and se&e,t new 4X sorta$&e7eader. Se&e,t the sorta$&e7eader and set the *rom0t to 7ire @ate . 20. 1ight ,&i,k on the *m %a$&e o. the Create@e t'G and se&e,t Aew [ .ooter. 2/. 1ight ,&i,k on ta$&eFooter1 and se&e,t add%a$&e1ow. 2J. Set the $e&ow ro erties: Add Another Row *ro0erties%
-d / 4dd4no!herRo& %rom$! / 4dd 4no!her Ro& Ro&#7o4dd ( -n#er! Ro&# 4u!oma!i all3 / 2al#e

2#. 1ight ,&i,k on *m %a$&e and se&e,t new [ mu&tiSe&e,tion. Set the $e&ow ro erties Multi Select *ro0erties%
-D Mul!iSele ! 7e:! Sele ! Vie& 4!!ribu!e Sele !.la9

L0. 1ight ,&i,k on 1esu&tsAd)%a$&e and se&e,t new [ ta$&eA,tions. L1. 1ight ,&i,k on region2 and se&e,t new [ 6tem. L2. Set the $e&ow ro erties
-d Dele!e %rom$! Dele!e 4 !ion 73$e 2ire4 !ion

*)ent 4 de&ete LL. 1ight ,&i,k on 'ageBa!out1A and se&e,t Set new Contro&&er. LG. Set the name as Create@e tCO and a,kage as ,ho&a.ora,&e.a s..nd.ad).we$ui.

'age 1/J

Cha ter V66 K Master @etai& 'age LI. -se the $e&ow ,ode in 'ro,ess1e3uest: *rocessRe1uest 'ode%
if (!pageContext.is5ack'a%igation/ired(false # &ransaction9nit)elper.start&ransaction9nit(pageContext. "deptCreate&xn" * if (!pageContext.is/orm(ubmission( # ,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * am.in%oke1ethod("create6ept". null * am.in%oke1ethod("apply" * 2 2 else # if (!&ransaction9nit)elper.is&ransaction9nitInProgress(pageContext. "deptCreate&xn". true # ,$6ialogPage dialogPage " new ,$6ialogPage('$<IG$&I,'=-00,0 * pageContext.redirect&o6ialogPage(dialogPage * 2 2

Code Bisting /4 1 : 'ro,ess1e3uest Code

'age 1/#

Cha ter V66 K Master @etai& 'age L0. -se the $e&ow ,ode in 'ro,essForm1e3uest: *rocessFormRe1uest%
,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * if (pageContext.getParameter("$pply" !" null # ,$<iew,b?ect %o " (,$<iew,b?ect am.find<iew,b?ect("6eptCreate<,7" * (tring dept'ame " ((tring %o.getCurrent0ow( . get$ttribute("6name" * 'umber dept'umber " ('umber %o.getCurrent0ow( .get$ttribute("6eptno" * (tring 6ept'um " (tring.%alue,f(dept'umber.int<alue( * am.in%oke1ethod("apply" * 1essage&okenEF tokens " # new 1essage&oken("6'$1-". dept'ame . new 1essage&oken("6-P&',". 6ept'um 2* ,$-xception confirm1essage " new ,$-xception("$I". "/:I=&5J=&=-1P=C0-$&-=C,'/I01". tokens. ,$-xception.C,'/I01$&I,'. null * pageContext.put6ialog1essage(confirm1essage * 2 else if (pageContext.getParameter("Cancel" !" null # am.in%oke1ethod("rollback6ept" * &ransaction9nit)elper.end&ransaction9nit(pageContext. "deptCreate&xn" * 2

Code Bisting /4 2 : 'ro,essForm1e3uest Code

'age 1J0

Cha ter V66 K Master @etai& 'age L/. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a . 'reate 3e0artment 'ode%
public %oid create6ept( # ,$<iew,b?ect %o " (,$<iew,b?ect get6eptCreate<,7( * if (!%o.isPrepared/or-xecution( # %o.executeHuery( * 2 0ow row " %o.create0ow( * %o.insert0ow(row * row.set'ew0ow(tate(0ow.(&$&9(=I'I&I$3IB-6 * 2

Code Bisting /4 L : Create @e artment Code LJ. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a . Roll+ack %
public %oid rollback6ept( # &ransaction txn " get&ransaction( * if (txn.is6irty( # txn.rollback( * 2 2

Code Bisting /4 G : 1o&&$a,k method Code L#. -se the $e&ow ,ode in ,reate method o. @e artment*O6m &.<a)a @e.au&t @e t 6@:
,$65&ransaction transaction " get,$65&ransaction( * 'umber deptId " transaction.get(e;uence<alue("6-P$0&1-'&=(" * set6eptno(deptId *

'age 1J1

Cha ter V66 K Master @etai& 'age Code Bisting /4 I : @e artment*O6m &.<a)a Code G0. 1ight ,&i,k on *m %a$&e and se&e,t Set new Contro&&er. G1. Set the name as *m %a$&eCO and a,kage as ,ho&a.ora,&e.a s..nd.ad).we$ui . G2. -se the $e&ow ,ode in ro,essForm1e3uest. *rocessFormRe1uest 'ode%
,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * if ("-mp&able".e;uals(pageContext.getParameter((,90C-=P$0$1 >> $66=0,:(=-<-'&.e;uals(pageContext.getParameter(-<-'&=P$0$1 # (tring 6eptno" ((tring pageContext.getParameter("6eptno7" * (eriali@ableEF param"#6eptno2* am.in%oke1ethod("create-mp". param * 2 if ("delete-mp".e;uals(pageContext.getParameter(-<-'&=P$0$1 # am.in%oke1ethod("delete-mp" * am.in%oke1ethod("apply" * 2

Code Bisting /4 0 : 'ro,essForm1e3uest Code

'age 1J2

Cha ter V66 K Master @etai& 'age GL. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a.
public %oid create-mp((tring 6eptno # ,$<iew,b?ect %o " (,$<iew,b?ect get-mp6etails<,7( * 'umber dept'o " null* try # dept'o " new 'umber(6eptno * 2 catch(-xception e #2 if (!%o.isPrepared/or-xecution( # %o.set:hereClause("7"K" * %o.executeHuery( * 2 0ow row " %o.create0ow( * (ystem.out.println("dept'o"+dept'o * row.set$ttribute("6eptno7". dept'o * %o.last( * %o.next( * %o.insert0ow(row * row.set'ew0ow(tate(0ow.(&$&9(=I'I&I$3IB-6 * 2 // end create-mp(

Code Bisting /4 / : Create *m &o!ee Code GG. Sa)e !our work and 1un the Create@e t'G. GI. A de artment num$er wi&& $e de.au&ted. *nter the @e t name and &o,ation. G0. C&i,k Add Another 1ow. G/. *nter detai&s .or *m &o!ee and ,&i,k A &!.

'age 1JL

Cha ter V66 K Master @etai& 'age

GJ. =ou wi&& see and ,on.irmation message te&&ing the de artment has $een ,reated.

Fig / K L: Out ut

'age 1JG

Cha ter V66 K Master @etai& 'age

"earch %epartment and %rill %own to %etails !age


@ri&& down to detai&s is im &emented $! setting the @estination -16 to the @e t Aame. B! this the @e t Aame $e,omes &ike a h! er&ink and when the user ,&i,ks on the @e t Aame it goes to another age where a&& the detai&s o. the de artment and the users in that de artment wi&& $e dis &a!ed. 1. 1ight ,&i,k on ,ho&a.ora,&e.a s..nd.ad).we$ui and se&e,t Aew. 2. 6n the we$ %ier [ OA Com onents se&e,t 'age. L. Set the name as @e tManager'G and a,kage as ,ho&a.ora,&e.a s..nd.ad).we$ui G. 6n the stru,ture ane o. @e tManager'G( set the $e&ow ro erties .or region1. Region9 0ro0erties%
-d %a9e6a3ou!RN 4M De2ini!ion hola)ora le)a$$#)2nd)adv)#erver)Chola4dv4M ;indo& 7i!le / Chola=# Sear h %a9e %a9e 7i!le Sear h De$ar!men!

I. 1ight ,&i,k 'ageBa!out1A and se&e,t Aew [ 1egion. 0. Set the $e&ow ro erties 2ueryR" 0ro0erties%
-d Buer3RN Re9ion S!3le Cuer3 Con#!ru !ion Mode au!oCu#!omiDa!ionCri!eria

/. 1ight ,&i,k on Cuer!1A and se&e,t Aew [ 1egion using wiMard. J. Se&e,t the Cho&aAd)AM and ,&i,k on Create@e tVO and ,&i,k Ae+t.

'age 1JI

Cha ter V66 K Master @etai& 'age

Fig / K G: Out ut #. Set the $e&ow ro erties:


Re9ion -d MainRN Re9ion S!3le / !able

10. Shutt&e a&& the attri$utes to the right side and ,&i,k Ae+t.

'age 1J0

Cha ter V66 K Master @etai& 'age 11. Set the rom t as er the $e&ow s,reenshot.

Fig / K I: Change 'rom t 12. C&i,k Ae+t and Finish. 1L. Change the 6tem st!&e o. a&& the attri$utes to messageSt!&ed%e+t.Set the width o. Main1A to J0\. 1G. 1ight ,&i,k on Cuer!1A and se&e,t Aew [ sim &eSear,h'ane&. 1I. Set the 6@ .or region2 to Sim &eSear,h7eader. 10. 1ight ,&i,k on region1 and ,&i,k new [ message%e+t6n ut. 1/. Set the .o&&owing ro erties .or the message%e+t6n ut.

'age 1J/

Cha ter V66 K Master @etai& 'age 6@ K Sear,h@e tAame 'rom t 4 Aame

'age 1JJ

Cha ter V66 K Master @etai& 'age 1J. 1ight ,&i,k on region1 and ,&i,k new [ message%e+t6n ut. 6@ K Sear,h@e tAo 'rom t 4 Aum$er 1#. 1ight ,&i,k on Cuer!1A and se&e,t Aew [ sim &eSear,hMa ings. 20. Set the ,riteriaMa 1 ro erties:
-D Sear hNameMa$ Sear h -!em Sear hDe$!Name Re#ul!# -!em Dname

21. 1ight ,&i,k on sim &eSear,hMa ings and ,&i,k new [ ,riteriaMa . 22. Set the $e&ow ro erties:
-D Sear hNumMa$ Sear h -!em Sear hDe$!No Re#ul!# -!em De$!no

2L. 6n the @e tManager'G ( set the 3estination URI ro ert! o. @name to OA58s0? 0age@;chola;oracle;a00s;fnd;ad&;webui;'reate3e0t*6A3e0t"o@=B3e0 tno>AretainAM@C 2G. Add the $e&ow ,ode in ro,ess1e3uest o. @e tCreateCO. *rocessRe1uest 'ode%
(tring dept'umber " pageContext.getParameter("6ept'o" * ,$$pplication1odule am " pageContext.get$pplication1odule(web5ean * (eriali@ableEF parameters " # dept'umber 2* am.in%oke1ethod("init6etails". parameters * am.in%oke1ethod("init-mp6etails". parameters *

Code Bisting /4 J : 'ro,ess1e3uest Code

'age 1J#

Cha ter V66 K Master @etai& 'age 2I. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a
public %oid init6etails((tring dept'umber # 6eptCreate<,Impl %o "(6eptCreate<,Impl get6eptCreate<,7( * if (%o "" null # 1essage&okenEF err&okens " # new 1essage&oken(",54-C&='$1-". "6eptCreate<,7" 2* throw new ,$-xception("$I". "/:I=&5J=,54-C&=',&=/,9'6". err&okens * 2 %o.initHuery(dept'umber * 2

Code Bisting /4 # : 6nit@etai&s Method Code 20. -se the $e&ow ,ode in Cho&aAd)AM6m &.<a)a
public %oid init-mp6etails((tring dept'umber # -mp6etails<,Impl %o "(-mp6etails<,Impl get-mp6etails<,7( * if (%o "" null # 1essage&okenEF err&okens " # new 1essage&oken(",54-C&='$1-". "-mp6etails<,7" 2* throw new ,$-xception("$I". "/:I=&5J=,54-C&=',&=/,9'6". err&okens * 2 %o.init-mpHuery(dept'umber * 2

Code Bisting /4 10 : 6nit*m @etai&s Method Code

'age 1#0

Cha ter V66 K Master @etai& 'age

2/. -se the $e&ow ,ode in @e tCreateVO6m &.<a)a Im0ort Statements% im ort ora,&e.<$o.domain.Aum$er>
public %oid initHuery((tring employee'umber # if ((employee'umber !" null >> (!("".e;uals(employee'umber.trim( #'umber emp'um " null* try # emp'um " new 'umber(employee'umber * 2 catch(-xception e # throw new ,$-xception("$I". "/:I=&5J=I'<$3I6=-1P='915-0" * 2 set:hereClause("6-P&', " L7" * set:hereClauseParams(null * // $lways reset set:hereClauseParam(A. emp'um * executeHuery( * 2 2

Code Bisting /4 11 : 6nitCuer! Method Code

'age 1#1

Cha ter V66 K Master @etai& 'age

2J. -se the $e&ow ,ode in *m @etai&sVO6m &.<a)a Im0ort Statements% im ort ora,&e.<$o.domain.Aum$er>
public %oid init-mpHuery((tring dept'umber # if ((dept'umber !" null >> (!("".e;uals(dept'umber.trim( #'umber dept'um " null* try # dept'um " new 'umber(dept'umber * 2 catch(-xception e # throw new ,$-xception("$I". "/:I=&5J=I'<$3I6=-1P='915-0" * 2 set:hereClause("6-P&', " L7" * set:hereClauseParams(null * // $lways reset set:hereClauseParam(A. dept'um * executeHuery( * 2 2

Code Bisting /4 12 : 6nit*m Cuer! Method Code

'age 1#2

Cha ter V66 K Master @etai& 'age

2#. 6n,&ude the $e&ow ,ode in 'ro,essForm1e3uest a.ter transa,tion ,ode in the Can,e& 6. &oo o. Create@e tCO.
pageContext.forwardImmediately(",$.?spM page"/chola/oracle/apps/fnd/ad%/webui/6ept1anagerPG". null. ,$:eb5eanConstants.I--P=1-'9=C,'&-J &. null. null. false. // retain $1 ,$:eb5eanConstants.$66=50-$6=C0915= ', *

Code Bisting /4 1L : 'ro,essForm1e3uest Code L0. Sa)e !our work and run the @e tManager'G. L1. C&i,k Go $utton. =ou wi&& see a&& the de artments dis &a!ed. %he @e artment

Aame wi&& $e dis &a!ed as a &ink. 'age 1#L

Cha ter V66 K Master @etai& 'age Fig / K 0: Out ut

'age 1#G

Cha ter V66 K Master @etai& 'age L2. C&i,k on Cho&aOAF and it wi&& go to the @e tCreate'G with a&& the detai&s o. the de artment and it wi&& show the em &o!ees under the Cho&aOAF de artment.

Fig / K /: Out ut

'age 1#I

Cha ter V66 K Master @etai& 'age

Summary%
6n Cha ter V66 ( we ,o)ered the $e&ow to i,s: Forms St!&e Master @etai& 'age Create @e artment and @ri&& @own to @etai&s 'age

'age 1#0

Cha ter V66 K Master @etai& 'age

CHAPTER

(eplo.men

'age 1#/

Cha ter V666 K @e &o!ment

Chapter %III +eplo#ment


6n Cha ter V66( we wi&& $e ,o)ering the $e&ow to i,s: @e &o!ment 7ome 'age with %a$s

'age 1#J

Cha ter V666 K @e &o!ment

%eployment
6m ortant ste s in)o&)ed in de &o!ment are as .o&&ows: )ocal Machine% 1. Make a Mi .i&e o. re3uired .i&es to $e migrated. Bet us Mi the ,ho&a .o&der under VF@*VW-S*1W7OM*XEm!,&asses. 2. %he Mi .i&e wi&& ,ontain C&ass .i&es and VOE*OEAM +m& .i&es 'GE1A +m& .i&es. Ser&er Ste0s% 1. F%' the ,ho&a.Mi .i&e to the ser)er. 2. -nMi the ,ho&a.Mi .i&e into ]FAVAW%O'. L. 6m ort 'GE1A +m& .i&es to M@S re ositor!. G. -se the $e&ow ,ommand .or im orting 'ages and 1egions. <a)a ora,&e.<rad.too&s.+m&.im orter.DMB6m orter ]FAVAW%O'E,ho&aEora,&eEa sE.ndEad)Ewe$uiE*m &o!eeManager'G.+m& 4username A''S 4 assword a s 4d$,onne,tion N8@*SC16'%6OAQ 8A@@1*SSQ8'1O%OCOBQt, ;87OS%QV7ost AameX;8'O1%QV ortX;; 8COAA*C%W@A%AQ 8S6@QVS6@X; ; ;N 4rootdir ]FAVAW%O' > Code Bisting J4 1 : DMB 6m orter Command

'age 1##

Cha ter V666 K @e &o!ment I. Simi&ar&! im ort a&& the ages and regions under the ,ho&a $! ,hanging the ath in the ,ommand.

Fig J K 1: 'age 6m ort

'age 200

)ome !age with &abs


A.ter de &o!ing the .i&es into the ser)er we wou&d &ike to ha)e the *m &o!ee and @e artment as se arate ta$s in the a &i,ation. Bet us see how to ,reate %a$s in the A &i,ation and asso,iate with *m &o!ee 'age and @e artment 'age. 1. Aow we wi&& ,reate a .un,tion and menu .or )iewing the age in the a &i,ation. 2. Bogin to the a &i,ation. Go to Fun,tiona& Administrator res onsi$i&it!. L. Go to Core Ser)i,es ta$ [ Fun,tions [ Create Fun,tion. G. Set the $e&ow )a&ues: Function alues%
Name Chola Em$ .un !ion Code CHO64_EM%_.UNC 73$e SS;4 J#$ .un !ional H7M6 Call / O4)j#$J $a9eHK holaKora leKa$$#K2ndKadvK&ebuiKEm$lo3eeMana9er%<

Fig J K 2: Fun,tion 'ro erties

'age 201

I. Create another .un,tion and set the $e&ow )a&ues: Function alues%
Name Chola Em$ .un !ion Code CHO64_DE%7_.UNC 73$e SS;4 J#$ .un !ional H7M6 Call / O4)j#$J $a9eHK holaKora leKa$$#K2ndKadvK&ebuiKDe$!Mana9er%<

Fig J K L: Fun,tion 'ro erties 0. Go the Menu's ta$ and ,&i,k Create Aew Aa)igation Menu. /. Set the $e&ow )a&ues: Menu alues%
Name Chola Em$ Menu Code EM%_MENU 73$e H7M6 7ab .un !ion Chola Em$ .un !ion

'age 202

Fig J K G: Menu 'ro erties J. C&i,k Su$mit. #. Create another menu and set the $e&ow )a&ues: Menu alues%
Name Chola Em$ Menu Code EM%_MENU 73$e H7M6 7ab .un !ion Chola Em$ .un !ion

'age 20L

Fig J K I: Menu 'ro erties 10. Create a new Menu and set the $e&ow )a&ues: Menu alues%
Name Em$ De$! Menu Code EM%_DE%7_MENU 73$e Home %a9e Sub Menu( Chola Em$lo3ee Menu Sub Menu( Chola De$! Menu

'age 20G

Fig J K 0: Menu 'ro erties 11. C&i,k Su$mit. 12. Go to Fun,tion and ,reate a new .un,tion with the $e&ow )a&ues: Function alues%
Name Chola Home %a9e .un !ion Code CH_HOME_.UNC 73$e SS;4 J#$ .un !ion H7M6 Call / OA.<s H

OAFun,QC7OBAW*M'WF-AC^OA7'QC7W7OM*WF-AC^OASFQC7OBAW* M'WF-AC 'age 20I

1L. Go to the 1es onsi$i&it! to whi,h !ou want to atta,h the a &i,ation. 2e wi&& use the A &i,ation @e)e&o er res onsi$i&it! now. 1G. Go to the Menu and sear,h .or FA@\@*V\AAV6GA%* and u date the menu. 1I. Add a new row and set the 'rom t as Cho&a *m @e t Manager 'age and .un,tion as Cho&a 7ome 'age Fun,tion. 10. C&i,k Add Another 1ow and enter the 'rom t as *m &o!ee and se&e,t the Cho&a *m &o!ee Menu in the Su$ Menu. 1/. Simi&ar&! add C&i,k Add Another 1ow and enter the 'rom t as @e artment and se&e,t the Cho&a @e t Menu in the Su$ Menu. 1J. C&i,k Su$mit.

'age 200

Fig J K /: Menu 'ro erties 1#. Go to the A &i,ation @e)e&o er res onsi$i&it! and in the .un,tions !ou wi&& see Cho&a *m @e t Manager 'age. C&i,k on that. 20. =ou wi&& see 2 ta$s( *m &o!ee and @e artment.

'age 20/

Fig J K 0: Menu 'ro erties

'age 20J

Summary%
6n Cha ter V666. we ,o)ered the $e&ow to i,s: @e &o!ment 7ome 'age with %a$s

'age 20#

CHAPTER

/
E0 ension

'age 210

Cha ter 6D 4 *+tension

Chapter I- - ".tension
6n the Cha ter 6D we wi&& $e ,o)ering the $e&ow to i,s:

'age 211

Cha ter 6D 4 *+tension *+tension VO *+tension CO *+tension *O *+tension @e &o!ing the Su$stitution 'ersona&iMation

'age 212

Cha ter 6D 4 *+tension

E(tension
*+tension in OA Framework is nothing $ut adding a new .un,tiona&it! to the a &i,ation without tou,hing the standard o$<e,ts. B! e+tending the standard o$<e,ts we are not tou,hing the standard o$<e,ts. %his wi&& ensure that !our ,hanges wi&& not $e o)erwritten $! at,hing or u grades. %here are L t! es o. *+tension: 1. VO *+tension 2. *O *+tension L. CO *+tension

%O ".tension!
1. O en the a &i,ation and go to 'a!a$&es (Vision O eration8-SA; res onsi$i&it!.

2. 6n the Su

Fig # K 1: 1es onsi$i&it! &iers Menu ,&i,k on the *ntr! .un,tion.

'age 21L

Cha ter 6D 4 *+tension

Fig # K 2: Fun,tion L. C&i,k About This 0age to determine the VO .or the summar! ta$&e.

Fig # K L: A$out %his 'age G. C&i,k *+ and A&& to see a&& the items and regions in the age. 'age 21G

Cha ter 6D 4 *+tension

Fig # K G: *+ and A&&

'age 21I

Cha ter 6D 4 *+tension I. Su &iers ta$&e is the ta$&e whi,h is dis &a!ing the resu&ts o. the sear,h age. %he VO asso,iated with the ta$&e is Su SummVO. 2e are going to e+tend the Su SummVO to in,&ude an attri$ute with a di..erent name.

Fig # K I: View O$<e,t

'age 210

Cha ter 6D 4 *+tension 0. Be&ow i,ture shows !ou a&& the BCGF ,om onents re.eren,ed $! this age.

Fig # K 0: VO's

'age 21/

Cha ter 6D 4 *+tension /. %he age name is Eora,&eEa sE osEsu &ierEwe$uiESu Summ'G .

Fig # K /: 'age J. Create os .o&der under m! ro<e,tsEora,&eEa s. -nder os ,reate su &ier .o&der. -nder su &ier .o&der ,reate we$ui .o&der. From ser)er ,o ! Su Summ'G and aste it in !our m! ro<e,tsEora,&eEa sE osEsu &ierEwe$ui .o&der. #. Co ! ora,&e .o&der .rom the ser)er and aste into the m!,&asses .o&der. 10. Create a new OA 2orks a,e $! right ,&i,king on A &i,ation and se&e,t new OA 2orks a,e.

'age 21J

Cha ter 6D 4 *+tension

Fig # K J: Aew 2orks a,e Set the name o. the works a,e as $e&ow and ,&i,k Ok. Make sure that the new OA 'ro<e,t is ,he,ked.

Aame 4 Cho&aVO*+t

'age 21#

Cha ter 6D 4 *+tension Fig # K #: 'age 'ro erties

'age 220

Cha ter 6D 4 *+tension 11. Set the $e&ow )a&ues .or the ro<e,t: Aame K Cho&aVO*+t 'a,kage K ++,ho&ae+t.ora,&e.a s. os.su &ier 12. Se&e,t the @B ,onne,tion as Cho&a.Create the @$,onne,tion i. it doesn't a&read! e+ist.

Fig # K 10: @ata$ase 'ro erties 1L. %o determine the res onsi$i&it! asso,iated with the 'a!a$&es Vision O erations go to the a &i,ation and go to S!stem Administrator res onsi$i&it! and go to Se,urit! [ 1es onsi$i&it! [ @e.ine. 1G. Sear,h .or the 1es onsi$i&it! Aame 9'a!a$&es( Vision O erations 8-SA;:.%he 1es onsi$i&it! ?e! is 9'A=ABB*SWO'*1A%6OAS:. 'age 221

Cha ter 6D 4 *+tension 1I. O en the A &i,ation @e)e&o er res onsi$i&it! and go to A 1egister.Cuer! .or the a &i,ation 'a!a$&es. &i,ation [

Fig # K 11: 'age 'ro erties 10. Set the $e&ow )a&ues .or ro<e,t: @BC Fi&e K C:YCho&aFde)Y<de)homeY<de)Yd$,W.i&esYse,ureYV6S.d$, -sername K o erations 'assword K we&,ome A &i,ation Short Aame 4 SCBA' 1es onsi$i&it! ?e! 4 'A=ABB*SWO'*1A%6OAS

'age 222

Cha ter 6D 4 *+tension 1/. 1ight ,&i,k on Cho&aVO*+t and ,&i,k Add to ro<e,t ,ontent.

Fig # K 12: 'ro<e,t Content

'age 22L

Cha ter 6D 4 *+tension 1J. Se&e,t Ora,&e4XA s4X os. And the ++,ho&ae+t.

Fig # K 1L: Add 'a,kage

'age 22G

Cha ter 6D 4 *+tension 1#. 1ight ,&i,k on ++,ho&ae+t.ora,&e.a s. os.su O$<e,t. &ier.ser)er and ,&i,k View

Fig # K 1G: Aew View O$<e,t 20. Set the $e&ow )a&ues .or the VO: Aame K Cho&a*+tSu SummVO 'a,kage K ++,ho&ae+t.ora,&e.a s. os.su &ier.ser)er *+tends 4 ora,&e.a s. os.su &ier.ser)er.Su SummVO

'age 22I

Cha ter 6D 4 *+tension

Fig # K 1I: VO 'ro erties 21. -se the $e&ow 3uer! in the SCB Statement window: VO Cuer! .or the *+tended VO se&e,t h . art!Wname( h . art!Wid as art!Wid( h .dunsWnum$erW, as duns( ).)endorWid( ).)endorWname( de,ode8 ).organiMationWt! eW&ooku W,ode( '6A@6V6@-AB'( ).indi)idua&W10##( 'FO1*6GA 6A@6V6@-AB'( ).indi)idua&W10##( ).numW10##; ta+ a!erWid( ).)atWregistrationWnum as ta+WregWnum( ).segment1( ).V*A@O1WAAM*WAB% as a&ternateWname( ).endWdateWa,ti)e as endWdateWa,ti)e( 'age 220

Cha ter 6D 4 *+tension ).startWdateWa,ti)e as startWdateWa,ti)e( ).OA*W%6M*WFBAG( ).V*A@O1W%='*WBOO?-'WCO@*( ).'A1*A%WV*A@O1W6@( arent.)endorWname as arentW)endorWname( ).'A=M*A%W'16O16%=( arent.segment1 as arentWSegment1( ).%ADW1*'O1%6AGWAAM*( ).termsWid( terms.name as termsWdes,( ).F*@*1ABW1*'O1%ABB*WFBAG( ).S%A%*W1*'O1%ABB*WFBAG( ).'A=WG1O-'WBOO?-'WCO@*( a!Wgrou .des,ri tion as a!Wgrou Wdes,( a tt.des,ri tion as in,omeWta+Wt! e( h .organiMationWnameW honeti,( &,.@6S'BA=*@WF6*B@ as V*A@O1W%='*W@6S'BA=( ).t! eW10## as in,omeWta+Wt! eW,ode( ).em &o!eeWid as em &o!eeWid( h050artyDid as e/tD0artyDid .rom hMW arties h ( a Wsu &iers )( a Wsu &iers arent( a WtermsWt& terms( .ndW&ooku W)a&ues a!Wgrou ( A'W6ACOM*W%ADW%='*S a tt( oW&ooku W,odes &, where ). art!Wid Q h . art!Wid and arent.)endorWid 8Z; Q ). arentW)endorWid and ).termsWid Q terms.termWid 8Z; and terms.&anguage 8Z; Q useren)8'BAAG'; and terms.ena$&edW.&ag 8Z; Q'=' and ). a!Wgrou W&ooku W,ode Q a!Wgrou .&ooku W,ode 8Z; and a!Wgrou .&ooku Wt! e 8Z;Q''A= G1O-'' and a!Wgrou .&anguage 8Z;Quseren)8'&ang'; and ).t! eW10## Q a tt.in,omeWta+Wt! e 8Z; and ).V*A@O1W%='*WBOO?-'WCO@* Q &,.BOO?-'WCO@* 8Z; and 'age 22/

Cha ter 6D 4 *+tension &,.&ooku Wt! e 8Z; Q 'V*A@O1 %='*' Code Bisting #4 1 : SCB Cuer! 22. C&i,k Ae+t and then Finish. 2L. 1ight ,&i,k on Cho&a*+tVO ro<e,t and ,&i,k 'ro<e,t 'ro erties.

'age 22J

Cha ter 6D 4 *+tension 2G. C&i,k Business Com onents4X Su$stitution. 2I. 6n the A)ai&a$&e se&e,t ora,&e.a s. os.su &ier.ser)er.Su SummVO.6n the Su$stitute se&e,t ++,ho&ae+t.ora,&e.a s. os.su &ier.ser)er.Cho&a*+tSu SummVO.

Fig # K 10: Su$stitution

'age 22#

Cha ter 6D 4 *+tension 20. 6n the 'ro<e,t ro erties go to 1unE@e$ug. C&i,k *dit.

Fig # K 1/: 1unE@e$ug 'ro erties

'age 2L0

Cha ter 6D 4 *+tension 2/. 6n the Fa)a o tions at the &ast add a s a,e and then aste the $e&ow: #38bo50ro8ect@'hola OE/t

Fig # K 1J: *dit 'ro erties 2J. Se&e,t the Su Summ'G and in the stru,ture ane go to the 1esu&ts1A and add a new attri$ute in the ta$&e. 6@ K *+t'art!6d View 6nstan,e K Su SummVO View Attri$ute K *+t'art!6d 'rom t 4 *+tended 'art! 6d 2#. Sa)e and 1un the age( L0. 2e do this ste <ust .or testing ur ose .rom Fde)e&o er without a..e,ting the a &i,ation.

'age 2L1

Cha ter 6D 4 *+tension L1. Cuer! .or a re,ord and !ou wi&& see an e+tra ,o&umn names *+tended 'art! 6d.

Fig # K 1#: Out ut

'age 2L2

Cha ter 6D 4 *+tension

CO ".tension
First ste in doing the CO *+tension is to .ind the Contro&&er asso,iated with the 'age. Bet's see the ste s in)o&)ed in doing the CO *+tension. 1. Go to 'a!a$&es Vision O erations -SA res onsi$i&it! and ,&i,k on *ntr!. 2. C&i,k on A$out %his 'age &ink at the $ottom o. the age. L. C&i,k on Business Com onent 1e.eren,es O$<e,ts. G. %he ,ontro&&er asso,iated with the age wi&& $e dis &a!ed.

Fig # K 20: Contro&&er I. Sin,e we had a&read! ,o ied the entire os .o&der we don't ha)e to ,o ! the .i&es again into our m! ro<e,ts .o&der. 0. 1ight ,&i,k on ++,ho&ae+t.ora,&e.a s..nd. os.we$ui and ,&i,k Aew. 6n the Sim &e Fi&es se&e,t Fa)a C&ass. /. *nter the $e&ow )a&ues:
Name E:!Su$$SummCO %a 8a9e / :: holae:!)ora le)a$$#)2nd)$o#)&ebui E:!end# / ora le)a$$#)2nd)$o#)&ebui)Su$$SummCO

'age 2LL

Cha ter 6D 4 *+tension

Fig # K 21: Aew C&ass

'age 2LG

Cha ter 6D 4 *+tension J. -se the $e&ow ,ode in the .i&e: Im0ort Statements% im ort ora,&e.a s..nd..ramework.we$ui.OA'ageConte+t> im ort ora,&e.a s..nd..ramework.we$ui.$eans.OA2e$Bean> im ort ora,&e.a s..nd..ramework.we$ui.$eans.message.OAMessage%e+t6n utBean> im ort ora,&e.a s. os.su &ier.we$ui.Su SummCO> im ort ora,&e.,a$o.st!&e.CSSSt!&e>
public C(((tyle cell9pperCase* public %oid process0e;uest(,$PageContext pageContext. ,$:eb5ean web5ean # super.process0e;uest(pageContext. web5ean * cell9pperCase " new C(((tyle( * cell9pperCase.setProperty("textNtransform"."uppercase" * ,$1essage&extInput5ean msgbean"(,$1essage&extInput5ean web5ean.findChild0ecursi%e("(earch(upp 'ame" * if (msgbean !" null msgbean.setInline(tyle(cell9pperCase * 2

Code Bisting #4 2 : 'ro,ess 1e3uest Code #. 1un the Su Summ'G and ,&i,k on 'ersona&iMe 'age.2e need to ,hange the ,ontro&&er and set the new ,ontro&&er to the 'age.C&i,k on 'ersona&iMe ne+t to 'age Ba!out : Su &iers.

'age 2LI

Cha ter 6D 4 *+tension Fig # K 22: 'ersona&iMe 10. 6n the Contro&&er C&ass set the new ,ontro&&er. Set the )a&ue as ++,ho&ae+t.ora,&e.a s. os.su &ier.we$ui.*+tSu SummCO 11. C&i,k A &!. &ier Aame !ou wi&& noti,e that the )a&ues 12. 6n the sear,h enter )a&ue .or Su entered wi&& $e in u er ,ase.

Fig # K 2L: Out ut

'age 2L0

Cha ter 6D 4 *+tension

"O ".tension
1. Bogin to the a &i,ation as O erations user. 2. C&i,k on Fun,tiona& @e)e&o er res onsi$i&it!. L. C&i,k on Core Ser)i,es [ 'ro.i&es.

Fig # K 2G: 'ro.i&es G. C&i,k on Create 'ro.i&e Button. I. C&i,k on A$out %his age at the &e.t hand ,orner. 0. C&i,k on Business Com onent 1e.eren,es @etai&s to )iew the BCGF o$<e,t asso,iated with the age. /. =ou wi&& noti,e that the *O asso,iated with the age is Fnd'ro.i&e*O.

'age 2L/

Cha ter 6D 4 *+tension Fig # K 2I: *O J. 2e wi&& e+tend this *O. #. Go to the ser)er $a,kend and ,o ! the asn .o&der under ora,&e.a s to the m!,&asses.ora,&e.a s .o&der. 10. Create the a new .o&der with name .nd under ora,&e.a s .o&der in m! ro<e,ts. -nder fnd ,reate &ead and under messages ,reate webui .o&der. 11. 1ight ,&i,k and se&e,t Aew [ A@F Business Com onents [ *ntit! O$<e,t. 12. Set the $e&ow ro erties
Name E:!.nd%ro2ileEO %a 8a9e :: holae:!)ora le)a$$#)2nd)# hema)$ro2ile)#erver E:!end# ora le)a$$#)2nd)# hema)$ro2ile)#erver).nd%ro2ileEO

'age 2LJ

Cha ter 6D 4 *+tension Fig # K 20: Aew *ntit! O$<e,t 1L. C&i,k Ae+t.C&i,k Aew .rom %a$&e and shutt&e a&& the attri$utes to the right side e+,e t the 1ow6d . 1G. C&i,k Ae+t and ,he,k on&! the ,reate method sin,e we are not going to write an! ,ode in the other methods.

Fig # K 2/: Fa)a Methods 1I. C&i,k Finish. 10. %he 'age asso,iated is Fnd'ro.i&eCreate'G. 1/. Co ! the Fnd'ro.i&eCreate'G .rom mds re ositor! Ed01Eora,&eEV6SEa sEa sWstEa &E.ndE12.0.0EmdsEmessagesEwe$ui and aste 'age 2L#

Cha ter 6D 4 *+tension in the ++,ho&ae+t.ora,&e.a s..nd.messages.we$ui .o&der. 1J. O en Fde)e&o er and !ou wi&& see the age.

'age 2G0

Cha ter 6D 4 *+tension 1#. 6n the $e&ow ,ode in setStart@ateA,ti)e in FndMessage*O6m & use the $e&ow ,ode:
Da!e #!ar!Da!e H 9e!S!ar!Da!e4 !ive@AL O4D"7ran#a !ion !:nH@O4D"7ran#a !ionA9e!O4D"7ran#a !ion@AL Da!e endDa!eH@Da!eA!:n)9e!Curren!D"Da!e@AL i2 @endDa!e MH nullA N lon9 endDa!e6on9 H endDa!e)da!eValue@A)9e!7ime@AL i2 @endDa!e6on9 0 #!ar!Da!e)da!eValue@A)9e!7ime@AA N !hro& ne& O4Ro&ValE: e$!ion@O4Ro&ValE: e$!ion)7I%_EN7-7I_O"JEC7G 9e!En!i!3De2@A)9e!.ullName@AG 9e!%rimar35e3@AG O45OG KK Me##a9e $rodu ! #hor! name O.;5_7"P_7_S74R7_END_"4DOAL KK Me##a9e name Q Q

Code Bisting #4 L : FndMessage*O6m & Code

20. 1ight ,&i,k on Cho&a*+tVO ro<e,t and ,&i,k 'ro<e,t 'ro erties. 21. C&i,k Business Com onents4X Su$stitution. 22. 6n the A)ai&a$&e se&e,t
ora le)a$$#)2nd)# hema)$ro2ile)#erver).nd%ro2ileEO.

2L. 6n the su$stitute se&e,t


:: holae:!)ora le)a$$#)2nd)# hema)$ro2ile)#erver).nd%ro2ileEO) +>)Save 3our &or8 and Run !he .nd%ro2ileCrea!e%<)

2I. Se&e,t the Start @ate $e.ore the ,urrent date and ,&i,k A
+R)4n error me##a9e &ill be di#$la3ed ne:! !o !he da!e)

&!.

'age 2G1

Cha ter 6D 4 *+tension

%eploying the 'O "ubstitution


A.ter er.orming the e+tension !ou need to de &o! the su$stitution to the mds .or the ,hanges to take e..e,t in the a &i,ation. 1. Co ! the < + .i&e to the ser)er. < + is the .i&e that gets u dated with the su$stitution entr! when we ,reate the su$stitution. Be.ore !ou ,o ! the .i&e )eri.! !our su$stitution de.inition inside the < + .i&e. %he < + .i&e shou&d &ook &ike $e&ow:

Fig # K 2J : F'D Fi&e 2. Co ! the Cho&aVO*+t.< + .i&e to the ]FAVAW%O'. L. *+e,ute the $e&ow ,ommand to de &o! the Cho&aVO*+t.< + whi,h wi&& ,reate a site &e)e& ersona&iMation do,ument in the mds.

<a)a ora,&e.<rad.too&s.+m&.im orter.F'D6m orter ]FAVAW%O'ECho&aVO*+t.< + 4username A''S 4 assword a s 4d$,onne,tion N8@*SC16'%6OAQ 8A@@1*SSQ8'1O%OCOBQt, ;87OS%QVhost nameX;8'O1%QV ort num$erX;; 8COAA*C%W@A%AQ 8S6@QVS6@X; ; ;N Code Bisting # 4 G : F'D 6m orter Command

'age 2G2

Cha ter 6D 4 *+tension G. -se the $e&ow ,ommand to )iew the ersona&iMation do,ument de.inition ,reated through < + im orter.

$egin <drWuti&s. rint@o,ument8'Eora,&eEa sE osEsu SummVO'; end>

&ierEser)erE,ustomiMationsEsiteE0ESu

Code Bisting # 4 I : <dr -ti&s Command Aow use the ersona&iMation to e+ ose the new ,o&umn to the su $! asso,iating the new&! ,reated attri$ute $! VO *+tension. &ier sear,h ta$&e

Aa)igate to Fun,tiona& Administrator res onsi$i&it!. C&i,k on 'ersona&iMation ta$.

Fig # K 2# : 'ersona&iMation @o,ument Veri.! that Site &e)e& is ,he,ked and ,&i,k A &!. 'age 2GL

Cha ter 6D 4 *+tension

Fig # K L0 : 'ersona&iMation @o,ument C&i,k on Com &ete View and then *+ and A&&.C&i,k on Create 6tem i,on ne+t to the Su &ier %a$&e.

Fig # K L1 : 'ersona&iMe 'age

'age 2GG

Cha ter 6D 4 *+tension Set the $e&ow ro erties:

6@ K Cho&a*+t'art!6@ 'rom t K *+tended 'art! 6d View 6nstan,e K Su SummVO1 View Attri$ute 4 *+t'art!6d

Fig # K L2 : Add new Fie&d

'age 2GI

Cha ter 6D 4 *+tension

Fig # K LL : Add new Fie&d

'age 2G0

Cha ter 6D 4 *+tension Final Out0ut%

Fig # K LG : Out ut

'age 2G/

Cha ter 6D 4 *+tension

!ersonali/ation
'ersona&iMation re.ers to the a$i&it! to de,&arati)e&! a&ter the -6 to suit user or $usiness needs. 'ersona&iMation is the 3ui,kest and easiest wa! o. a&tering the OAF -6( ,hanges are rote,ted .rom .uture u grades. 6. !ou ha)e an! re3uirement to a&ter the OAF -6( ersona&iMation shou&d $e !our .irst sto . Aow &ets see how to add an atta,hment to the resu&ts ta$&e o. the Su 1. Bogin with o erations user to the a &i,ation. 2. Be.ore starting with 'ersona&iMation we need to ena$&e ersona&iMation. Go to Fun,tiona& Administrator res onsi$i&it! and ,&i,k on Core Ser)i,es [ 'ro.i&e. L. Sear,h .or 9 ers\se&.\ and C&i,k on - date. &ier age.

Fig # K LI: Set ro.i&e )a&ue 'age 2GJ

Cha ter 6D 4 *+tension G. Set the ro.i&e )a&ue to =es.

Fig # K L0: Set Va&ue I. Bogout and &ogin to the a &i,ation again. 0. =ou wi&& noti,e 'ersona&iMe 'age &ink at the to right ,orner. /. Go to 'a!a$&es Vision O erations -SA res onsi$i&it! and ,&i,k on *ntr! .un,tion.

Fig # K L/: Fun,tion J. 6n the resu&ts ta$&e we wi&& $e adding a new ,o&umn where atta,hments ,an $e added. #. C&i,k On 'ersona&iMe 'age.

'age 2G#

Cha ter 6D 4 *+tension

10. C&i,k on the Create 6tem $utton ne+t to Su

&iers %a$&e.

Fig # K LJ: Create 6tem 11. Set the $e&ow ro erties


6evel Si!e -!em S!3le 4!!a hmen! -ma9e -D 4!!a h Vie& -n#!an e Su$$SummVO(

Fig # K L#: Aew 6tem 'age 2I0

Cha ter 6D 4 *+tension 12. C&i,k A &!.

1L. C&i,k on Create 6tem $utton ne+t to the entit!Ma ings.

Fig # K G0: Create *ntit! Ma ings 1G. Set the $e&ow )a&ues:
-d En!i!3Ma$ En!i!3 / CholaEn!i!3

Fig # K G1: *ntit! Ma Va&ues 'age 2I1

Cha ter 6D 4 *+tension C&i,k A &!. 1I. C&i,k Create 6tem ne+t to the rimar!?e!s.

'age 2I2

Cha ter 6D 4 *+tension 10. Set the $e&ow )a&ues:


-d %rimar35e3

1/. C&i,k A &e.t side.

Fig # K G2: 'rimar!?e! &! and ,&i,k on 1eturn to A &i,ation at the end o. the age in the

1J. C&i,k go and !ou wi&& see a Atta,hment ,o&umn in the resu&ts ta$&e.

'age 2IL

Cha ter 6D 4 *+tension Fig # K GL: Out ut

'age 2IG

Cha ter 6D 4 *+tension

Summary%
6n the Cha ter 6D we ,o)ered the $e&ow to i,s: *+tension VO *+tension CO *+tension *O *+tension 'ersona&iMation

'age 2II

Cha ter 6D 4 *+tension

CHAPTER

11
(e2"%%in%

'age 2I0

@e$ugging OA Framework 'age

+eb ((in( OA Framework )a(e


1. %he .irst ste in de$ugging an! OAF 'age is to ut $reak oints in the ,ode where !ou think might $e a ro$&em. For utting $reak oints ,&i,k on the outer side o. the ,ode where !ou need to set the $reak oint. 2. Bet us take the Create *m &o!ee ie. *m &o!eeManager'G. 6n the 1esu&tsAd)%a$&eCO whene)er the user ,&i,ks on Add Another 1ow !ou want to ,he,k what is ha ening. So we set a $reak oint on the i. ,ondition.

Fig 10 K 1 : Break oints L. %hen in the Cho&aAd)AM6m &.<a)a set another $reak oint in the Create*m &o!ee ,ode.

Fig 10 K 2 : Break oints 'age 2I/

@e$ugging OA Framework 'age G. 1ight ,&i,k on *m &o!eeManager'G and ,&i,k on @e$ug. I. C&i,k on Add Another 1ow and !ou wi&& noti,e that the ,ontro& wi&& go Fde)e&o er ,ode 81esu&tsAd)%a$&eCO;

Fig 10 K L : Out ut 0. C&i,k on Ste O)er to go to the ne+t ste . /. %he ,ontro& wi&& go to the ne+t ste in the ,ode. %hen ,&i,k Ste out. *nter )a&ues in the rows and ,&i,k A &!. J. %he ,ontro& wi&& go to the ne+t $reak oint.

'age 2IJ

@e$ugging OA Framework 'age

Appendi( A 2 %atabase "cripts


*m %a$&e S,ri t : C1*A%* %ABB* *M' 8 *M'AO A-MB*18G(0; ( *AAM* VA1C7A12810;( FOB VA1C7A128# ;( MG1 A-MB*18G(0;( 761*@A%* @A%*( SAB A-MB*18/(2;( COMM A-MB*18/(2;( @*'%AO A-MB*182(0;( BAS%W-'@A%*W@A%* @A%*( BAS%W-'@A%*@WB= A-MB*1( C1*A%6OAW@A%* @A%*( C1*A%*@WB= A-MB*1( C7A1G*W%='* VA1C7A128L0 ;( BAS%W-'@A%*WBOG6A A-MB*1( A@@1*SS1 VA1C7A128I0 ;( C6%= VA1C7A128I0 ;( S%A%* VA1C7A128I0 ;( CO-A%1= VA1C7A128I0 ; ;> @e t %a$&e S,ri t: C1*A%* %ABB* @*'% 8 @*'%AO A-MB*182(0;( @AAM* VA1C7A1281G B=%*;( BOC VA1C7A1281L B=%*;( BAS%W-'@A%*W@A%* @A%*( BAS%W-'@A%*@WB= A-MB*1( C1*A%6OAW@A%* @A%*( C1*A%*@WB= A-MB*1( BAS%W-'@A%*WBOG6A A-MB*1 ;> 'age 2I#

@e$ugging OA Framework 'age

*m Ao Se3uen,e S,ri t: C1*A%* S*C-*AC* *M'BO=**SWS M6AVAB-* 1 6AC1*M*A% B= 1 S%A1% 26%7 100 > @e t Ao Se3uen,e S,ri t : C1*A%* S*C-*AC* @*'A1%M*A%WS M6AVAB-* 1 6AC1*M*A% B= 1 S%A1% 26%7 100>

'age 200

@e$ugging OA Framework 'age

Appendi( $ Creatin( Attrib te ,ets!


Attri$ute Sets are nothing $ut a ,o&&e,tion o. ro erties. Bets take .or e+am &e the *m Aame in our *M' ta$&e. %he $asi, ro erties that needs to $e set .or the *m Aame attri$ute is 'rom t( Ma+ Bength( Bength and CSS. %he main ad)antage o. the attri$ute set is that we don't need to go and set ea,h and e)er! ro ert! .or *m Aame. A sing&e ro ert! wi&& set a&& the a$o)e mentioned ro ert!8 Attri$ute Set ro ert!;. Bet us see the ste s in ,reating the Attri$ute Set. 1. 1ight ,&i,k on the ro<e,t and ,&i,k new [ 2e$ %ier [ OA Com onents [ 'a,kage Fi&e 2. Set the $e&ow ro erties Aame K Attri$uteSets 'a,kage 4 ++,ho&as.ora,&e.a s..nd.attri$utesets.em

'age 201

@e$ugging OA Framework 'age

'age 202

@e$ugging OA Framework 'age

L. C&i,k on the Attri$uteSets.+m& .i&e and in the stru,ture ane right ,&i,k on Attri$uteSets and then ,&i,k Aew [ Attri$ute Set.

G. Set the name as *name and shutt&e the .o&&owing ro erties to the right side. 1. CSS C&ass 2. Bength L. Ma+imum Bength G. 'rom t

'age 20L

@e$ugging OA Framework 'age

I. %hen set the ro erties .or the *name. Ma+imum Bength K G0 Bength K 20 'rom t K Aame CSS C&ass 4 Ora@ata%e+t

'age 20G

@e$ugging OA Framework 'age

Creatin( &ook /ps!


'ountry )ooku0% 1. Bogin to the a &i,ation as s!sadminEs!sadmin. 2. Go to Fun,tiona& Administrator res onsi$i&it!. L. Go to Core Ser)i,es [ Boo u s. G. C&i,k on Create Booku %! e $utton. I. *nter the $e&ow )a&ues .or ,reating the Countr! Booku : Aame 4 Cho&a Countr! Code K C7OBAWCO-A%1= A &i,ation Aame 4 A &i,ation O$<e,t Bi$rar! 0. 6n the Booku Codes enter the $e&ow )a&ues: Code K 6A@ @es,ri tion K 6ndia

'age 20I

@e$ugging OA Framework 'age /. Simi&ar&! !ou ,an add as man! ,ountries !ou want $! ,&i,king on Add Another 1ow.

'age 200

@e$ugging OA Framework 'age

State )ooku0% 1. C&i,k on Create Booku %! e and enter the $e&ow )a&ues: Aame 4 Cho&a State Code K C7OBAWS%A%* A &i,ation Aame 4 A &i,ation O$<e,t Bi$rar!

'age 20/

@e$ugging OA Framework 'age 2. 6n the Booku Codes enter the $e&ow )a&ues: Code K %A @es,ri tion K %ami& Aadu %ag 4 6A@ L. 2e are using the %ag ,o&umn here in order to di..erentiate the states a,,ording to the Countr!. G. Simi&ar&! !ou ,an as mu&ti &e states with %ag as their Countr! and C&i,k A &!.

'age 20J

@e$ugging OA Framework 'age 'ity )ook u0% I. C&i,k on Create Book u %! e and enter the $e&ow )a&ues Aame 4 Cho&a Cit! Code K C7OBAWC6%= A &i,ation Aame 4 A &i,ation O$<e,t Bi$rar! 0. 6n the Codes se,tion enter the $e&ow )a&ues Code K C7A @es,ri tion K Chennai %ag 4 %A /. %he tag .ie&d wi&& $e used to identi.! the state o. the Cit!. J. Simi&ar&! mu&ti &e ,ities ,an $e added $! ,&i,king on Add Another 1ow.

'age 20#

@e$ugging OA Framework 'age

'age 2/0

6nter)iew Cuestions

Interview 0 estions
1. 7hat is +',- and what are all the com0onents of +',-? Business Com onents .or Fa)a is F@e)e&o er's rogramming .ramework .or $ui&ding mu&titier data$ase a &i,ations .rom reusa$&e $usiness ,om onents. Su,h a &i,ations t! i,a&&! ,onsist o.: _ A ,&ient4side user inter.a,e written in Fa)a andEo 7%MB. _ One or more $usiness &ogi, tier ,om onents that ro)ide $usiness &ogi, and )iews o. $usiness o$<e,ts. _ %a$&es on the data$ase ser)er that store the under&!ing data. 'om0onents of +',-% _ *ntit! O$<e,t 4 *O en,a su&ates the $usiness &ogi, and ru&es.*O`s are used .or 6nserting(- dating and @e&eting data. %his is used .or )a&idating a,ross the a &i,ations. _ View O$<e,t 4 View o$<e,t en,a su&ates the data$ase 3uer!. 6t is used .or se&e,ting data. 6t ro)ides iteration o)er a 3uer! resu&t set.VO`s are rimari&! $ased on *o`s. 6t ,an $e used on mu&ti &e *O`s i. the -6 is .or u date. _ A &i,ation Modu&e 4 A &i,ation Modu&es ser)e as a ,ontainers .or re&ated BCGF ,om onents. %he ages are re&ated $! arti,i ating in the same task. 6t a&so de.ines the &ogi,a& data mode& and $usiness methods needed. 2. 7hat is an EO? *O en,a su&ates the $usiness &ogi, and ru&es.*O`s are used .or 6nserting(- dating and @e&eting data. %his is used .or )a&idating a,ross the a &i,ations. 2e ,an a&so &ink to other *O`s and ,reate a Asso,iation o$<e,t. E5 7hat is an O? View o$<e,t en,a su&ates the data$ase 3uer!. 6t is used .or se&e,ting data. 6t ro)ides iteration o)er a 3uer! resu&t set.VO`s are rimari&! $ased on *o`s. 6t ,an $e used on mu&ti &e *O`s i. the -6 is .or u date. 6t ro)ides a sing&e oint o. ,onta,t .or getting and setting entit! o$<e,t )a&ues. 6t ,an $e &inked together to .orm View Binks.

'age 2/1

6nter)iew Cuestions G. 7hat is an AO? An asso,iation o$<e,t is ,reated where we &ink *O`s. For e+am &e take the sear,h age where we &ink the same *O to .orm a asso,iation $etween the manager and em &o!ee. *)er! em &o!ee shou&d ha)e a manager asso,iated. But i. it 'resident then no there is no manager asso,iated. %his is a er.e,t e+am &e to understand the AO.

F5 7hat is an )? A )iew &ink is an a,ti)e &ink $etween )iew &inks. A )iew &ink ,an $e ,reated $! ro)iding the sour,e and destination )iews and sour,e and destination attri$utes. %here are two modes o. View &ink o eration that ,an $e er.ormed. A do,ument and MasterE@etai& o eration. G5 7hat is UI.? -6D is an e+tensi$&e( F2**4$ased .ramework .or $ui&ding we$ a &i,ations. 6t is $ased on the Mode&4View4Contro&&er 8MVC; design attern( whi,h ro)ides the .oundation .or $ui&ding s,a&a$&e enter rise we$ a &i,ations. H5 7hat is M ' Architecture? MVC Ar,hite,ture is a Mode& View Contro&&er Ar,hite,ture. %he ,ontro&&er res onds to user a,tions and dire,ts a &i,ation .&ow. %he mode& en,a su&ates under&!ing data and $usiness &ogi, o. the a &i,ation. %he )iew .ormats and resents data .rom a mode& to the user. I5 7hich is the M ' layer O located? VO is &o,ated in the View Ba!er whi,h is res onsi$&e .or resenting the data to the user.

'age 2/2

6nter)iew Cuestions

#. 7hich 0ackage should include EO and AO5 %he *O and AO wi&& $e resent in the s,hema.ser)er a,kage.

9J5 7hat is the difference between inline lo& and e/ternal lo&5 6n&ine &o) is a &o) whi,h is used on&! .or that arti,u&ar age .or whi,h it was ,reated and ,annot $e used $! an! other age. *+terna& &o) is a ,ommon &o) whi,h ,an $e used $! an! age. 6t is a ,ommon ,om onent .or an! age to use it. 6t ,an $e used $! gi)ing the .u&& ath o. the &o) in the ro erties se,tion 9*+terna& BOV: o. the item. 995 7hat is a -a&abean? Fa)aBeans is an o$<e,t4oriented rogramming inter.a,e that &ets !ou $ui&d re4 usea$&e a &i,ations or rogram $ui&ding $&o,ks ,a&&ed ,om onents that ,an $e de &o!ed in a network on an! ma<or o erating s!stem &at.orm. 9:5 7hat is 1uery +ean? Cuer!Bean is used to e+e,ute and return the resu&ts o. a 3uer! on $eha&. o. the Cuer!'ort&et a &i,ation. 9E5 7hat is the difference between autocustomiKation criteria and result based search? 1esu&ts $ased sear,h generates sear,h items automati,a&&! $ased on the ,o&umns on the resu&ts ta$&e. 6n Auto,ustomiMation sear,h we need to set what a&& .ie&ds are re3uired to dis &a! as a sear,h ,riteria.

'age 2/L

6nter)iew Cuestions

9,5 7hat is M3S? M@S is Meta@ata Ser)i,e. 2hen a we$ age is $roken into sma&& units &ike $uttons(.ie&ds et, the! are stored in a data$ase. %hese are not stored as $inar! .i&es $ut as data in ta$&es. %he data are resent in F@1 ta$&es. M@S ro)ides ser)i,e to store ^ return age de.initions. M@S ,o&&e,ts those de.initions in ,om onentsE.ie&ds in a meaning.u& manner to $ui&d a age. 1I. 7hat is .M)? DMB is a marku &anguage .or do,uments ,ontaining stru,tured in.ormation.Stru,tured in.ormation ,ontains $oth ,ontent 8words( i,tures( et,.; and some indi,ation o. what ro&e that ,ontent &a!s 8.or e+am &e( ,ontent in a se,tion heading has a di..erent meaning .rom ,ontent in a .ootnote( whi,h means something di..erent than ,ontent in a .igure ,a tion or ,ontent in a data$ase ta$&e( et,.;. 9G5 7hat is the difference between customiKation and e/tension? CustomiMation is under dire,t user ,ontro&. %he user e+ &i,it&! se&e,ts $etween ,ertain o tions. Some ,ustomiMation e+am &es in,&ude: A&tering the .un,tiona&it! o. an a &i,ation A&tering e+isting -6 A&tering e+isting $usiness &ogi, *+tension is a$out e+tending the .un,tiona&it! o. an a &i,ation $e!ond what ,an $e done through ersona&iMation. Some e+tensi$i&it! e+am &es in,&ude: Add new .un,tiona& .&ows *+tend or o)erride e+isting $usiness &ogi, Aew a &i,ationEmodu&e Aew age Aew attri$ute *+tendEO)erride de.au&ts ^ )a&idations

'age 2/G

6nter)iew Cuestions 1/. 7hat is *ersonaliKation? 'ersona&iMation ena$&es !ou to de,&arati)e&! tai&or the -6 &ook4and4.ee&( &a!out or )isi$i&it! o. age ,ontent to suit a $usiness need or a user re.eren,e. Some ersona&iMation e+am &es in,&ude: _ %ai&or the order in whi,h ta$&e ,o&umns are dis &a!ed. _ %ai&or a 3uer! resu&t. _ %ai&or the ,o&or s,heme o. the -6. _ Fo&der Forms _ Forms 'ersona&iMation _ Ora,&e A &i,ation Framework 8OAF; 1J. 7hat is rootAM? %he a &i,ation modu&e whi,h is asso,iated with the to 4&e)e& age region 8the ageBa!out region; is root a &i,ation modu&e. 1#. 7hy Should we gi&e retainAM@C? %he AM shou&d $e retained whene)er !ou are na)igating awa! .rom a age and when !ou know that there is a ossi$i&it! to ,ome $a,k to the age again and data is to $e retained. *+am &e : An! na)igation &ink that o ens in a new age or an! na)igation whi,h has a $a,k $utton to ,ome $a,k to the initia& age. %he AM shou&d not $e retained .or two inde endent ages( es e,ia&&! i. the! ha)e ,ommon VOs whi,h .et,h di..erent resu&t sets. 6n su,h ,ases( retaining the AM ma! not remo)e the ,a,he o. VOs and so the resu&t ma! not $e as e+ e,ted. 20. 7hat is the significance of add+read'rumb@C? %he $asi, intention o. the $read,rum$ is to &et the user know o. the na)igation ath he took to rea,h the ,urrent age.

'age 2/I

6nter)iew Cuestions 21. 4ow do you find right 8de& 0atch for your oracle a00lication &ersion? Sear,h in ora,&e.meta&ink.,om as Fde) with OA *+tension. 22. 7hat are the tools you had used for decom0iling 8a&a class? FA@ is one o. the too& .or de,om i&ing the <a)a ,&ass.

2L. 7hat will setma/FetchSiKe!J$ will do? setma+Fet,hSiMe <ust determines how mu,h data to $e sent at a time.2hen !ou e+e,ute the 3uer! a.ter setting the setma/FetchSiKe!J$Lno rows wi&& $e .et,hed to the midd&e tier.

:,5 'an we use dynamically created O in OAF?7hat is the 0ros and cons? =es we ,an.But as .ar as ossi$&e tr! to ,reate the VO during the design time due to er.orman,e ,onsideration. :F5 7hat is ad&anced table in table? Ad)an,ed %a$&e o..ers &ot o. .&e+i$i&it! to the de)e&o ers $! ro)iding .o&&owing .un,tiona&ities. 1; Mu&ti Se&e,t. 2; Se&e,t(Create(- date and @e&ete on the same age itse&.. L; =ou ,an grou Co&umns in the ta$&e.

'age 2/0

6nter)iew Cuestions :G5 7hat is a 46rid? A 7Grid( otherwise known as a hierar,h! grid( a&&ows users to $rowse through ,om &e+ sets o. hierar,hi,a& data.

:H5 Tell me the OAF com0onents re1uired for a sim0le search 0age? At&east VO(AM and 'age. 2J. 7hat is a switcher in OAF and when it is used? A swit,her is a ,ontro&( that a&&ows the se&e,ti)e dis &a! o. in.ormation.For e+am &e i. !ou want to dis &a! a image .or u date ena$&ed and u date disa$&ed !ou ,an use swit,her. :M5 7hat are all the methods in 'O? ro,essFor1e3uest ro,ess1e3uest ro,essForm@ata L0. 7hen a 0age renders which method in 'O fires? ro,ess1e3uest E95 4ow do you handle back button na&igation in OAF based a00lication? -sing %ransa,tion -nit and isBa,kAa)igationFired in ro,ess1e3uest E:5 7here will you write your business logic? Mode& Ba!er8BCGF;

'age 2//

6nter)iew Cuestions

EE5 7hat will &o5createRow!$ do? ,reate1ow ,reates a em t! row instan,e in the VO and *O. LG. 4ow do you catch the button e&ent on *rocessFormRe1uest Method? 6. 8Nu date1N.e3ua&s8 ageConte+t.get'arameter8OA2e$BeanConstants.*V*A%W'A1 AM;;; 7ere u date1 is the e)ent. LI. 7hat is 0age+utton bar? 2hen !ou want to dis &a! $uttons on to and $ottom o. the age then !ou ,reate a region as ageButton$ar and ,reate $uttons within this region. EG5 4ow do you add a link to OAF *age? Create a new item with st!&e as &ink and gi)e its destination uri ro ert! whi,h is the ur& where !ou want to na)igate to. EH5 7hich is the to0 most region in OAF 0age? 'ageBa!out1A EI5 4ow do you enable custom footer in OAF 0age? Set AutoFooter %o %rue and then ,&i,k on ageCom onents Ba!out to Create a Custom Footer EM5 7hat are all the se&eral ways to debug an OAF based a00lication? 2e ,an use the de$ugger o tion .Set $reak oints and run the age in de$ug mode.

'age 2/J

6nter)iew Cuestions ,J5 4ow do you call an 0l;s1l a0i from OAF 0age5 Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. ,95 Should a search 0age ha&e an EO? Aot ne,essar!. 6. !ou are ,reating a re,ord then we need a *O. G2. 4ow do you get the current url for forward? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. GL. 7hat will ha00en when you set 3isable'lientSide alidation 0ro0erty to True? 6. !ou set the ro ert! to %rue it shows that there wi&& no )a&idation that wi&& o,,ur on the we$ tier as art o. the .orm su$mit. GG. 7hat is S*E)? 6t is an Sim &e e+ ression that wi&& ,an return the ,urrent VO attri$ute Va&ues. GI. 7here is a S*E) used? S'*B is used in &a,es where !ou want to show or hide an item rogramati,a&&!.6t ,an a&so $e used to get the Fun,tion Se,urit! and VO attri$ute )a&ues. ,G5 7hat is **R? ''1 is 'artia& 'age rendering. 2hi,h means that on&! a arti,u&ar art o. the age is re.reshed and not the entire age.

'age 2/#

6nter)iew Cuestions ,H5 E/am0les of **R scenarios? 7idingEShowing O$<e,ts 1e3uiredEO tiona& @isa$&edE*na$&ed 1ead on&!E- data$&e ,I5 7hat is the 0rocedure to add new &iewattribute in a s1l based O? Add the attri$ute to the &ast in &ist o. the se&e,t statement or e&se !our attri$ute ma ing wi&& go .or a toss. G#. 4ow do you raise an e/ce0tion in OAF? throw new OA*+,e tion8N*rror with reading B&o$@omain.N( OA*+,e tion.*11O1;> I0. 7ow do you generate stack of e/ce0tion and dis0lay the list of error messages in OAF 0age? Arra!Bist e+,e tions Q new Arra!Bist8;> e+,e tions.add8new OA*+,e tion8NStart @ate Shou&d $e Greater %han S!sdateN;;> e+,e tions.add8new OA*+,e tion8NStart @ate Shou&d $e Bess %han *nd @ateN;;> OA*+,e tion.raiseBund&edOA*+,e tion8e+,e tions;> F95 7hat is the significance of *rocessForm3ata method? Fires when ost a,tion ha ens on the age I2. @es,ri$e the ste0s for O E/tension? 1ead through the e+tension se,tion o. this $ook.

'age 2J0

6nter)iew Cuestions FE5 4ow do we set the conte/t in AM? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. F,5 4ow do we im0lement a 0o0u0 0age in OAF? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. FF5 4ow do we set design time hint to a O? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. FG5 4ow to enable 0ersonaliKation? 1.Bogin to the a &i,ation. 2.C&i,k on Fun,tiona& Administrator res onsi$i&it!. L.C&i,k on Core Ser)i,es %a$. G.C&i,k on 'ro.i&es. I.*nter 'ers\Se&.\ in Aame and ,&i,k Go. 0.6n the resu&ts !ou wi&& see 'ersona&iMe Se&.4Ser)i,e @e.n. - date it and enter =es in the Site Va&ue FH5 7hen we should bounce the 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. FI5 4ow do we set an OAF 4ome 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me.

'age 2J1

6nter)iew Cuestions FM5 4ow do we add 'ustom region to e/isting OAF 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. GJ5 4ow do we com0ile a 8a&a files under subdirectories at once? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. G95 7hat is the command used to im0ort an oaf 0age and region? <a)a ora,&e.<rad.too&s.+m&.im orter.DMB6m orter ]FAVAW%O'E 4username VX4 assword VX4d$,onne,tion N8@*SC16'%6OAQ 8A@@1*SSQ8'1O%OCOBQt, ; 87OS%Q;8'O1%Q1IIJ;; 8COAA*C%W@A%AQ 8S6@QVX; ; ;N 4rootdir . >

G:5 7here to locate the definition of standard OAF *ages and regions? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. GE5 4ow to automate the de0loyment 0rocess of OAF a00lication? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. G,5 4ow to add dff to a custom oaf 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me.

'age 2J2

6nter)iew Cuestions GF5 4ow do you u0load an file to database from an OAF 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. 00. 4ow do you dis0lay thumbnail images in OAF? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. 0/. 7hat is the use of rawTe/t bean? 1aw %e+t $ean item is used to em$ed htm& ,ontent in a age. 0J. 4ow to set the 'SS class 0ro0erty of an item 0rogramatically? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. 0#. 'an a 0age ha&e multi0le 'Os and AMs? =es. /0. 4ow to change the lo&&o dynamically for an )O ? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. /1. 7hat is *assi&ation? 'assi)ation is the ro,ess o. sa)ing a &i,ation state to a se,ondar! medium 8the data$ase; at s e,i.i, e)ent oints so it ,an $e restored 8a,ti)ated; when needed. /2. 4ow do you iterate throw the O rows? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need

'age 2JL

6nter)iew Cuestions answer .rom me. /L. 4ow do you get the &alue from the database se1uence? OA@B%ransa,tion transa,tion Q getOA@B%ransa,tion8;> Aum$er em &o!ee6d Q transa,tion.getSe3uen,eVa&ue8NS*C AameN;> set*m &o!ee6d8em &o!ee6d;> H,5 4ow do you 0erform your &alidation in OAF? A&& OAF )a&idations are done in the BCGF Ba!er. /I. 4ow do you co0y rows from one &o to another? %o ,o ! mu&ti &e rows !ou ,an add the mu&ti &eSe&e,tion item .or the ta$&e. Che,k whi,h row is se&e,ted and write ,ode .or im &ementing this. /0. 7hat is a transaction unit in OAF? 2ith the transa,tion unit identi.ier( !ou ,an indi,ate when a s e,i.i, -6 task $egins and ends( and i. the user na)igates in an une+ e,ted manner su,h as using the $rowser Ba,k $utton. =ou ,an ,he,k the transa,tion unit status and rea,t to ensure that ina ro riate a,tions are not er.ormed and unwanted data in the BCGF ,a,he is not ,ommitted. //. 4ow to im0lement a de0endent 0o0list? @e endent o &ist ,an $e im &emented $! ena$&ing .ire'artia&A,tion and ,a turing the e)ent .or the sour,e o &ist and assing the )a&ue se&e,ted in the sour,e to the method where we set the where ,&ause and e+e,ute the 3uer! .or the destination o &ist. HI5 4ow do you im0lement de0endent )O ? @e endent BOV ,an $e im &emented $! setting the ,riteria item in the &o) ma to the item to whi,h the )a&ue o. &o) shou&d de end on. HM5 4ow to add attachment functionality to the standard OAF 0age?

'age 2JG

6nter)iew Cuestions Atta,hments ,an $e added to a sim &e ta$&e or Ad)an,ed ta$&e $! in,&uding an item o. t! e atta,hment6mage. 6t wi&& automati,a&&! ,reate a new entit!Ma 1 and 'rimar!?e!1. Set the *ntit! as an! uni3ue )a&ue. J0. 4ow do you set a default &alue for an item 0rogramatically in a standard OAF 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. J1. 4ow do you migrate 0ersonaliKation from one instance to another? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. I:5 7hat is the diff between setforwardurl and setforwardimmediately? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. IE5 'an we e/tend rootAM? Ao(A&& BCGF su$stuitions are stored as a ersona&iMation do,ument and rootAM gets initia&iMed $e.ore the ersona&iMations are a &ied during the runtime. JG. 4ow do we 0ass 0arameters between 0ages? ageConte+t..orward6mmediate&!8NOA.<s H ageQE++,hEora,&eEa sE.ndEtestEwe$uiE@etai&s'G^.nameQNZ.name. 7ere .name is the )aria$&e we are assing to the @etai&s'G. IF5 4ow do you im0ort cs& file into a OAF table region? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need 'age 2JI

6nter)iew Cuestions answer .rom me. J0. Ste0s to im0lement E/0ort button? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. J/. 4ow do we dis0lay .M) *ublisher re0ort from OAF 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. JJ. 4ow do we 0erform +',- substitution? 1ight ,&i,k on the ro<e,t and go to Su$stitution ta$. VO and *O su$stitution ,an $e made $! ,hoosing the a)ai&a$&e *OEVO and the su$stitute *OEVO. J#. 7ill 0atching erase custom e/tensions? Ao #0. 4ow do you do onscreen debugging of an OAF 0age? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. #1. 7hat are all the know issues in OAF? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. M:5 4ow do I 0ass different kinds of 0arameters together to AM method from 'O!)ike +ooleanLStringL"umber$? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need 'age 2J0

6nter)iew Cuestions answer .rom me. ME5 7hat is serialiKable? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. #G. In which layer of +',-L AM and ONs are included?

Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. #I. 4ow do we synchroniKe a EO and Table in the database? 1ight ,&i,k on the *O and ,&i,k S!n,hroniMe. #0. Ste0s for im0lementing a three frame -S*? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me. #/. 4ow to set currency formatting in an OAF ad&ance table region? Be.t out .or !our Answer. Conta,t me at asksudhakar.,om i. !ou need answer .rom me.

'age 2J/

@e$ugging OA Framework 'age

1lossary
+',Business Com onents For Fa)a is F@e)e&o er's rogramming .ramework .or $ui&ding mu&ti4tier data$ase a &i,ations .rom reusa$&e $usiness ,om onents. Su,h a &i,ations t! i,a&&! ,onsist o.: A ,&ient4side user inter.a,e written in Fa)a andEor 7%MB. One or more $usiness &ogi, tier ,om onents that ro)ide $usiness &ogi, and )iews o. $usiness o$<e,ts. %a$&es on the data$ase ser)er that store the under&!ing data. A mu&ti4tier a &i,ation $ui&t with the Business Com onents .or Fa)a .ramework de &o!s )iews( $usiness ru&es( and ,ustom ,ode in ,om onents that ,&ients ,an share. 2ith the Business Com onents .or Fa)a .ramework( su,h ,om onents are eas! to $ui&d and maintain( eas! to use and reuse( and eas! to ,ustomiMe. Com onents do not need modi.i,ation to $e de &o!ed to an! su orted &at.orm. AM An a &i,ation modu&e is a &ogi,a& ,ontainer .or instan,es o. )iew o$<e,ts( )iew &inks( and transa,tions s e,i.ied $! other a &i,ation modu&es. O View o$<e,ts use SCB 3ueries to s e,i.! .i&tered su$sets o. attri$utes .rom entit! o$<e,ts. C&ients mani u&ate data $! na)igating through the resu&t set( getting and setting attri$ute )a&ues. 1e&ationshi s $etween )iew o$<e,ts are e+ ressed using )iew &inks. EO An entit! o$<e,t en,a su&ates $usiness &ogi, .or a data$ase ta$&e( )iew or s!non!m. C&ients a,,ess an entit! o$<e,t's data through one or more )iew o$<e,ts. A gi)en entit! o$<e,t ,an $e used $! an! num$er o. )iew o$<e,ts. 1e&ationshi s $etween entit! o$<e,ts are e+ ressed using asso,iations. S*E) S'*B is nothing $ut Sim &est 'ossi$&e *+e,ution Banguage I3E 'age 2JJ

@e$ugging OA Framework 'age 6ntegrated @e)e&o ment *n)ironment. Fde)e&o er is the 6@* to $e used .or OA Framework de)e&o ment.

'age 2J#

@e$ugging OA Framework 'age

Foin the wor&d's smartest OA Framework ,ommunit! at htt :EEora,&eareaI1.,om and htt :EEora&inked.,om A&& our $ooks are a)ai&a$&e at the $e&ow &ink. htt :EE,ho&ag&s.,omE$ooksEora,&e4$ooks

1e3uest .or .ree su

ort to ,om &ete the &a$s on this $ook at $e&ow &ink.

htt :EEora,&eareaI1.,omE.orums.htm& Aeed .u&& .&edged ora,&e trainingH7a)e a &ook at our re,i e here. htt :EE,ho&ag&s.,omEtraining4

'age 2#0

You might also like