You are on page 1of 164
Oracle Application Framework . a < Introduction to OA Framework. Introduction to OA Framework. OA Framework is a JZEE (Enterprise Edition) based application development platform to develop HTML based Oracle EBS applications. OA Framework is designed around the simple Model- Yiew-Controller (MVC) frchitecture design pattem. The MVC paradigm is a way of breaking an application} into three arts: the model, the view, andthe controller. The controller Jr encapsiates, an application's business logic or state. It captures not only the Pua gra brocess or system, but also how the system works. Control is then usually forwanhe back through the controler to the appropriate view. The view is responsible for the output of the model. " | User Interface We can use ADF to develop the business application; it’s just that it ADF is not yet tightly (jul! with Oracle EBS. The OA Framework Model is implemented using Oracle Buscss Corpponents for Java (C42). The OA Framework View is implemented using UI XML (UIX), implemented using « simple plain old java class And the Controller Il [ controtter Tain mye svn J Let's see each of these components in bit detail. ‘The Mod The model component is implemented using the BC4J. BC4J consists of three components ->Entity Object and Associations. . . ->View’Object and View Link objects. ‘ Application Module. Entity Object: - Entity Objects represents a database row in middle-tier. Database rows are represented as individual entities, in which attributes typically correspond to columns in the corresponding table to automatically implement queries, inserts, updates and deletes. Entity objects can also be based on views, synonyms or snapshots. Most entity objects that you create subelass the oracle.apps.fnd.framework server. OAEntityimpl class. Entity Objects are also used to implement the business validations. Associations are used to establish the relationship between the entity objects. When you create an Entity Object, framework will provide you a Java class with the setter and getter methods corresponding to each column of the table to which you're Entity Object is based on, And along with that it will provide you following methods which are called by framework itself on appropriate even protected void validateEntiy() ~ Any validation involving two or more attribute values on the entity should be included in the validateEntity() method. public void create() - add any defaulting/initialization code, such as getting the value ofa sequence and then assigning it to the corresponding attribute. public void remove() - If you need to implement any special delete behavior (like ‘checking to see whether the delete action is allowed, or implementing cascade-delete), you should add code to your entity's removet) methind. View Object: View Object accesses the result set of a SQL statement. [t can be either based on the Entity Object or on plain SQL query. A view object is a business component that encapsulates SQL code and metadata that maps columns in the select statement to the attributes of one or more entity objects, iPit is based on the Entity Ohject. A view object use SQL to join, filter or sort business data or to shape it for presentation, View objects provide yaw sets that ean he viewed of used to update the underlying entity objects. You can define multiple view objects per entity object or a view object can select data from multiple entity objects, View Object can be created declaratively or programmatically. Which ever way you ereate it, you need an application module to contain it. View objects are not an appropriate home for business logic; we should not be writing validation rules in our view objects or view rows, All view objects that you createsubelass the oracle.apps.find.tramework server. OAViewObjectlmp! cla ‘ [ore me 300 WROTE at co remo | Application Module A logical container that manages and provides access to "reldted" BCA) model obivcts. Fepresents the cata model that client uses. To create the data model, he application moxlle Contains business components, including instances of view objects and view links, An application module may be a r00t application module or a nested application module. A root app! module isnot contained in another application module. It provides transaction context fora cece it contains. Root application moxlule also maintains the database connections ‘application modules that you create subclass thy ric le.apps (nd. framework server.OAApplicationMoculelmpl class, The View poe View formats the data and presents the data tothe user, In OAR View is implemented ws ng the Ut ULX uses XML. to describe the components and hierarchy that make up an application Page, ULX also provides runtime capabilities to translate that metadata into HiT MIL output so that it ca be shown on a Browser or a mobile device. The metadata used to describe the Ut is loatet into a database repository, called Meta Data Services (MDS) at design time as well, P ation at deployment time and optionally es are developed declaratively using the Oracle 91 Jdeveloper OA Extension, Pages are made up of hierarchy of regions and items. Each UL widget oo sponds to When more Java objects (beans). And these java beans are used to create the HTML at sentine Wien you design a page, you store "page definition” in XML format on your local machine When deploying to our system/server, we load this XML file into ML Fepository using the xml the nie ements: When the user ran the page in the browser, the page definition is fetehed [roan {he MDS repository and is converted into the XML. tile by the MDS engine Each component in Entity ‘Object Qatbase Table : Application Module A logical container that man: represents the data model that client uses. To create the data model, the application module contains business components, including instances of view objects and view links. An auc provides access to "reldted" BCAT model obiects, It application ‘module may be a oot application module or a nested application module.A root application module is not contained in another application module. It provides transaction context for all objects it contains. Root application module also maintains the database connection. All ‘application modules that you ereute subclass the ofacle.apps. tnd framework.setver: OA ApplicationModulelipl class. The View The View formats the data and presents the data to the user. In OA View is implemented using the UIX. UIX uses XML to describe the components and hierarchy that make up an application age. ULX also provides runtime capabilites to translate that metadata into HETML output so thal itcan be shown on a Browser or a mobile device. The metadata used to describe the UI is loaded into a database repository, called Meta Data Services (MDS), at deployment lime and optionally design time as well. Pages are developed declaratively using the Oracle 91 Jdeveloper OA Extension, Pages are mide up of hierarchy of regions and items. Each Ul widget corresponds to One or more Java objects (beans). And these java beans are used to create the HTML at runtime When you design a page, you store "page definition" in XML format on your local machine When deploying to our systenv/server, we load this XML file into MDS repository using the xial import statements. When the user run the page in the browser, the pag hed from the MDS repository and is converted into the XML file by the MDS tin definition is fe ne. Each compo ‘ XML is translated into the Java web bean object. And this web bean is rendered by the OA Framework. Page definition is cached in to the memory, and if it is there, framework will not go to MDS repository to get the page definition. The Controller The Controller between the oracle.apps. (nd. framework.webui.AControllertmp!, When the bro request:- The oracle.apps.{nd framework. webui. OAPageBean( the main OA Framework page processing lass) uses the page name to determine which root AM itrefers to, so thatthe VO's related to the page can be accessed. Then user session is validated and then QAPageBean evaluates request retmcter of figure out if it dealing with an HTTP POST or GET request. During the iteration, if the feamework fiids a web bean referencing a controller class itwill call one of the following espondls to user action and difect application flow, It provides the wiring X wab bean and the middle-tier. All the controllers that we create subclass the fssues an OA,jsp methods Process Request This phase is invoked upon at browser ‘Get or redireet/forwand. This is where ‘custom code can call the application module to initialize and query the data, This phase may optionally constructor modify the web beans to create or alter the page structure and web bean properties. Process Form Date ~ framework will automatically applies form cla sustom code required inthis phase. If exceptions are thrown during this phase, the Process Form Request phase is skipped and the page is redisplayed. Process Form Request - This phase is invoked upon a browser Post, assuming no exceptions swore thrown during the Process Form Datta phase. This is were custom code can jvandte the form ‘submit events and call the application module to process the event. Prarnework passes two parameters OAPageContext and OAWebBean to the proces te * eeegen this phase is invoked upon a browser Post’. During this phase the ss back to the underlying view objects. Rarely Request and ‘ processFormRequest. Following are the usages of OAPAgeContext pécamncters 1. To get and set values of the fields, using oapagecontext.getParameter and oapagecontext.putParameter 2, For redirecting to the current page or another page. For example to redirecting to current page itself use oapagecontext forwardimmediatelyToCurrentPage, Or you may use capagecontext.sendRedirect(snewpage) . 3. To get a handle to application module(remember we attached AM to page) ‘apagecontext.getRootApplicationModule() 4. Write debug messages, using oapagecontext.writeDiagnostics 5. Get message text from FND Message dictionary, using oapagecontext.getMessage Usages of parameter OA WebBean:- Remember that webbean represents the hierarchy/structure of components in the page. Hence using this paremeter object, you can get a handle to any bean/component in that page hierarchy field bean or button bean), you can then invoke Once you have a handle to that bean (s methods like setRendered etc to change the behaviour of page at runtime. Some examples are 1. OAWebBean LastName = oawebbean.findIndexedChildRecursive("personLastName"); must have just one field whose name is personLastName Note: In this example, our pi 2. Get-a handle to region ‘OAStackLayoutBean oastacklayouthean (OAStackLayoutBean)oawebbean,findindexedChildRecursive( ackRegionName"); Hello World isthe basic tutor! for any language. Far creating» project in OAF we need to ‘have a workspace crested. hand comer. Diviatniwnetnomamts | |_ Rha RAEN seinen tnter ane # ng 1. create a workspace named HelloWord by right clicking on Aapicatons onthe lft 3. Enter the name of the project as HelloWorld.For the det fault package prefix with any vaiue as a third party Identifier and then ‘racle.apps.tnd.hello.webul. Eg: chola.apps.tnd.hetlo.webul. frie recerynawe:_ [Dlidevinenheetiiras tel nade eo a _ 4. For using the database connection check the Use repository for Design Time. cook |) co | SE e . we | ( Sk ie] ened )| t Username apps Password ~ \dbe_fles\secure\VIS dtc + User Name = sysadmin {Password ~ sysadmin {Application Short Name - FND. + Responsibility Key - APPLICATION DEV 1, Right Chek on HelleWorld project and clic ew. 7. In the OA Components tab dick Page for creating @ new page i Ee page as HellaPG and make sure i is present in apps.{nd.hello.wvebul package, inthe Structure Pane there walt Teated by default whenever 3 pa9h + Title = Hello Wortd o.Right cick on PageLayoutRN ang clk New and then Region “sro eon en coat = 111, Name the region as Main and set MessagecomponentLayout. 12 eae or ate text box where the user wil enter dats. For acing so aie click on MainRN => Neve >messogeTeytnPut 1. eke these properties for the textinput 10 HelioName Maximurd Langth ~ 50 Prenpt — Name Length = lo the region style a5 a igheroesnnerey ge 14 Right click on MainRN and click New - > message Layout nesaeeshinner L Seen 25.Set thé 19 property for messageLayout to BultonLayout 6. Right Click ButtonLayout - > New + > them. Properties for Iker + ID - Ga + Hem Style submitButten + Prompt ~ Go Til now we have crested 3 page with a textbox and a button, Now we need to write few tines of code to concat and dlsplay the Hello 17, For witing cade we Higed to set a new Controller, Right cick on MalnRN = > ‘set. New controller. tetee 18. Name the controller as helloCO and change the package: 1 the last of the package name, ‘0.jave tor handling the exceptions: emave the webu a 29. tnehide an import statement in the Helle 20. Foch 1 (oaeconat geturameten Ge) Jn) String usercontent = pageContext getParameter(“HelaName’); Sring mestage = Melo," + woncentant Throw new OAExcepticn(message, OAException INFORMATION); ‘ y ? 21, Save your work and right lick on HeloWoHldPG. xml and click Run to test the page. 2a Enter fete blow tines a code ithe protesFomRecuest: | «4 the Input as Chola 23.The output should be Hello, Chote! | Item Styles n OA Framework d- Wher messageStyledTexi you want lo display only the text and the user should not be. able to edit the text then we use the messageStyledText messageRadioGroup- [his f uitons Tn your page messageCheckBo: messageTextinput messagelovinput selec! from the val As the name implies it helps the users to enter data into this box ni the uses to select from a lis! of values and quick e messageLovinput,This will open a pop up and when you'w lues then we use tt you can search for values and select trom the results, messageChoice then you use the messageChoic messageDownload - Us When you want to display a list of values in a drop down fashion er needs to download a file or attachment. 15 when the messageflleUpload' Used for isplaying a button with a messageTextinput User can browse from the local machine and upload a file using this. button -Itis.a.gen@thl button which has an action ossociated with t.You can set the fire action property which ‘will inturn call a method which will perform that action. submitButton - This s the button used when you want to submit data to ¢ OAF page: Link - Used for creating links.There are many types of links that can be created. formValue ~ This t used fo send value fo an OAF page but without being displayed in the page. spacer - This is used when you want to-add space between your items ploced in the page: seperator- This creates a horizontal tine in an oaf page. Flex: This sa flexfield. There are 2 types of flexfields. Key and Descriptive flex fields | uilinclude - This helps fo include HTML content Implementing Create Page in OA Framewor A very simple tutorial for implementing a create excersse. The page has few fel lke First Noe act Name, Salary ete. After entering the values in the text boxes click on Submit bution After clicking Submit and ifthe create fs successfull then you will get a coalimration message {elling that Employee with particular employee il has been ereited So now lets see how we are going to implement this 1. "Right click Workspaces andl click create new OAwerkspace and nome Ios “crecteEmp". Automatically a new OA Project is alo created. Name the project as Employee and package os chola.cracle.apps.indiemp.at Properties that needs to be'set for the project are: DBC File Name - dbc_files/secure/ User name for DB Password for DB. Application Short Narhe ~ FND Responsibility Key - APPLIC We need to create two Bi ICATION_DEVELOPER usiness component package. Right click on Employee pr and click on new Business Corpponent Package. i Name - chola.oracle.apps.fnd.emp.server Similarly create another BC4J package as chola.oracle.apps.ind.emp.schema.server, 3.Right click on chola.orac Module, cle.apps.ind.demo.server and click new Application Name - Empam, $ Schema server package is going to contain the Entity Object 5.Because we are going to insert data into the database we will need a Entity Object ight click on chols.oracle.apps.fhdemp schema server and select the new Entity Object. jame - EmployeeKO, Package - chola.oracle.apps. Select the Create, ee It will show all the attributes i 6. A view object has to be crea chola.oracle.apps.fd.emp serv Name - EmployeeVO -fnd.emp.schema.server Object - FWK_TBX_EMPLOPYEES. ‘emove and Validation methods in the list of java methics, a the table and click finish, ted for th EO created. Right click on er and select new View Object * PAckage - chola.oracle.apps.fnd.emp.server Entity Object - EmployeeEO - Expand the schema server package and shuttle the EmployeeEO to the right side. ~ Select the attributes what all needs to be displayed for creating the employee. Employee Id First Name Last Name Salary Email Id Click Next. Check if EmployeelD is selected as Key Attribute. Add the VO to the AM by editing the AM and shuttling the VO to the right side. 7. Right click on Employee,jpr and select New. In the web tiet->OA Components select Page. 8, Select region! and set the following properties: ID-PageLayoutRN kage - chola.oracle.apps.fud.emp Namie - EmployeePG AM Definition - chola.oracte.apps.fud.emp.server-EmployeeAM ‘Window Title - Chola Employee Page Title Create Employee Region Style Click Next 10, Select the EmployeeAM and from the list below choose the EmpVO which we created and click next T1Shutfle all the attributes trom the left side'to the right side. Click Next and then Finish, 12.Click on EmployeeRN and change the regionStyle to mes will prompt telling that the child will be deleted. Click on yes. ComponentLayout {1 13, Right click on PageLayoutRN and select I Name - ButtonRN RegionStyle - pageButtonBar 14, Right click on ButtonRN and select new Item. Id - Submit ITem Style - submitButton Prompt - Submit gh onnei® asad gies wees ‘ C] ll ll Ml Ml ll * 15, Right click on ButtonN and select new Item, Id - Cancel TTem Style - submitButton Prompt-Cancel * We have successfully completed treating the page. The page will look like this after you run the “4 aie. Create Employes (Gut) (Cancer) Enployeld FisName | MideNanes | Lastome Emacs ro "he fines this is woreate mod we need to ereale a view object Tow which Wil ave the gorm values once the submit is clicked, bringing the values to the middle tx | 12.Impore Statements: B Ma Isc 17 Is 19, 24.12. Row 25,1 fF 6, weseth ul 29, 30,18. gett 0 cot nd apply 31.19 32. Click on EmployeePG. Right click on PageLayoulRN and click on set New Controller 33. Name -EmployeeCO M4. Package - chola.oracle.apps.tnd.emp.webui Men 435. In the processRequest Method add the following code: Here-we check ifit if for form tripmission, Ifyes then we call the createEmptoyee method in the AM. 36. Import Statements: 37.01 import oracle. apps. £nd. franework.OBApplScationtvodste7 38. 02. import oracle. Jbo-donain.Nunber 39. 03. import oracle.apps. tnd. common. NessageToken 40. 04, import oracle. apps. fnd. framework. OABxcoption? 41, 05. import oracle apps-fnd. framework. OAViewObject 22.06, import oracle -apps. fnd. framework. webui .oaWebBeanconstan's/ 43.07. //code: 4d, 08. //ProcessRequest Method: 45.09. if ({pageContext .isFornsubmission()) 46.10. ( 47.11. ORApplicationlledile am = pagecontext getapplicationilodule (webBean) ¢ ~ am. invoketlethed (*createimployee", mally 49.13. 1 50.14. $1.15 32.16. //ProcessFormRequest Method: tapplicatiionMedale (webBean) + pull} 3,17, OARpplicationltedule an > page’ 4, 18. if (pagecontext -getParaneter ("Ay 6 58, 22. number © ("empleyeeta) + (tuner) vo. sgetateribul 59.23. string enployesiin = String.valueof ténployeeNunber Antvalue())7 60, 24, am.divesketiethod (*appry" 6 5 u Ck i AB xcept it irnittess F “EHK_T REATE_CONFIR™, tokens, sxcoption ,COME TON, null) 6A. 28. pagaContext .pukDialoghessays {cont rnliessag 1se if (pagecentext .getParameter<"cance1") t= mult 65.29. 4 66,30. am.invoketethod (* rol Lbac 67.41. // Indicate: that the Create transaction 1s complete 68, 32. Transa elper.endtransactionUnit (pagecontext, ‘empCreat eT 69.33. pageContext . forwardtmmedi ate fhow/ Labsolutdons/wobui /mpsearcht 70. $4. nulls 71. 35,/onWebBeanconstants. KE: 72.36. nu11, 73.37. nuzi, 74.38. true, // retain am i 75. 39. OAWebBearlConstant's.ADD_BREAD_CROMS_No) ? 76.40." ) 4 77. Right click on EmployeePG and click Run, Enter the values forall the fields and click :P_MENY_contex, Submit. You will 2 confirmation message at the toy GR ¢ * 9 Cisitemmirncame ciara 3 Bert briana 2 7 Teas es ORACLE 79, Implementing Poplist in OA Fr ‘amework Poplist isa stall list of items trom which a single value may be selected. The list of values is obtained trom an associated 2-atribute view object including ed play value, and an internal developer key. IF you want the user to select from a particulay of for afield then a poplist is used. Steps for implemen ng a poplist: 1. Creat chola.oracle. ew O* Workspace "CholaDemo" and a project "CholaPoplistDemo" Package as ps.fnd.demo, 2. Right click on the project and el cchola.oracle.apps.find.demo.server. ‘k new Business Component Package, Name ~ 5, Right elick on the package create and select new Application Module. Name it as CholaDemoAM. “ARRight click on the project and select new Business Component package to create anew package for the poplist Components: ‘Name- chola.oracle.apps.fnd. demo.poplist.server. 65, Right click on the poplist-server package and select new View Object. 6. Name the VO as NamesVO- Make sure that the package is ‘cholaoracle.apps.ind ‘demo.poplist.server- 4. The VO is not based on an EO 50 click next and go to the query section 8: My requirement is Ihave (© display the first name of atlemployees who has a manager: So the query will be select first_name,emptoyee id from employees where manager id 1S not null Check the attributes, sthere wil be 2ateibutes Firsame and Employeeld 1 clicking on the AM and 69, Test the query and click finish Add the VO to the AM by TEAitAM and shuttle NamesVO t¢ the right side 10, Now that we have finished ere il he components we have tovereate ne page 11s Right click the project and soles ne “Then go to webtier > OA componenis and select Page. 12, Name the page as CholaDemn? PG, Make sure that the package 1 roba oracle.apps.fnedseme webtt 13.ln the struct Jetaull region created. Select (hs regiowl and set the following propertics pane there will be 14,Create an new region Dy! 1 ayoutltR, Name ~ MainN Region style _messageComponentLayent 15.Right click on MaintN and select me 16. Set the properties for thesnew Hem created, x Name - FirstName pikist View Definition ~ chola.oracleaPP® {nd demopoplistserver- or) Picklist View Instance - NamesVO + Picklist Display Attribute - FirstName Picklist Value Attribute - Employeeld. © at i Prompt - First Name fe tiSe 17. Save your work and run the CholaDemoPG, Yea “baie i | oracte : 5 Fe op Dependent Poplist for OA Framework Dependent (Cascading) poplist is a common requirement in a OAF development Project, Dependent poplist or Cascading Poplist functionality is not available in OAF as a builtin functionality and we have to apply a tweak to achieve the same. If you need to incorporate Cascading or Dependent LOV refer the below link Cascading or Dependent LOV For example there are three poplist in your paye named Country, State and City. State poplist values should be feiched based on Country poplist and City poplist values should be breed on Country anil State poplist values.Assume you select India as the Country, then the values in che State poplist should be States in the country Ind for city should be cities within lated the state selected. If the country is selected as US then accordingly the state should be opul and then city depending upon State should be populated. Lats tryto implement something similar except that we will have Country, County and City oplisis. Don't attach the VO instance to the poplist Set the pick list eache enabled to false or else framework will cache the poplist values and partial action will not retrieve the recent values. 1. Right click workspaces and click create new OAworkspace and name 1 85 "CholaPoplistDemo". Automatically a new OA Project is also created, Name the project as PoplistDemo and package as chola.oracle.apps.fnd.emo: >: We need to create two Business component package. Right click on PoplistDemojpr and click ‘on new Business Component Package. Name - chola.oracle.apps.fnd.demo.server similarly create another BC4J package as chola.oracle.apps find. deme. poplist.server- ion Module. click on chola.oraele.apps.fad.demo-server and click new App! - PoplistAM. 4, Poplist.server package is going to contain all the components we create for the poplist. That is all the View Objects, 5. Right click on cholaoracte-apps.thd.alemo.poplist server and elick new View Objer ne - CountryVO ‘chola.oracle.apps.fnd.demo.poplist.server The VO is not based on any EO so click next and go to the query section and paste the query, Since we want only Ghatinct country to be displayed in the poplist ste put as distinel Check if two attributes are created 6 ht click on cholaoracle.apps.fnd.demo.poplist.server and click ne'w View Object. Name - CountyVO. Package - chola.oracle.apps-fnd.demo.poplist-server The VO is not based on any EO so click next and goto the query sestion and paste the query Since we want onl: aa st county to be displayed in the particular Country inthe poplist we put as distinet nd aed 7 i or select the Country as well county, county select distine , name, country from UK_employe: Check if two attributes are created 7. Right click on chola.oracte.apps. find.demo.poplist.server and click new View Object Name - CityVO Package - chola.oracle.apps.fad.de poplist.server The VO is not based on any EO so click next and go to the query section and paste the query Since we want only distinct City to be disp and select the Country and County as well in the particular Country and County in the poplist we put as distinct Check if two attributes are created 8. Now that we have created the VO's we need to attach the VO's to the AM we created, Ds click on PoplistAM and shuttle CityVO,CountyVO and CountryVO to the right side 9.Right click on PoplistDemo,jpr and select new. Click on web tier and then OA Componen and select Name - EmployeePG Package - chola.oracle.apps.fnd.ademo.webui streuture pane where a ¢ 11. Select pnil-and set the following properties: ID - PagelayoutRN AM Definition - chola.oracle.apps.ind.demo.server.PoplistAM Window Title - Poplist Demo Title - Poplist Demo 12. Right click PageLayoutRN and click new Region a a ID- MainRN z Region Style - messageComponentLayout Style is given as messageComponentlayout because we are going to create only message” ‘components that is . ‘messageChoice item in that region, oa 13.Right click on MainRN and select messageChoice, MessageChoice isthe style used for creating poplist. ™- Country, Picklist View Definition - chola.oracle.apps.tnd.demo.poplist-server.CountryVO Picklist View Instance - CountryVO1L Picklist Display Attribute - Count Picklist Value Attribute -LName Prompt - Country Action Type - fireParti Event - update HAction {4.Right click on MainRN and select messageChoice. MessageChoice is the style used for creating poplist. 1D - County Pieklist View Defini Picklist View Instance - CountyVO1 Picklist Display Attribute - County Picklist Value Attribute - LName Prompt- County Action Type - firePartialAction Event - updatel jon ~ chola.orack apps.{nd.demo.poplistseryer.CountyVO I5.Right clic creating poplist. on MuinRN anu! select messageChice, MessageChotbe isthe style used for ID - City Picklist View Det ola.oracl Pieklist View Instance - City VOT Picklist Display Attribute - City Pieklist Value Attribute -LName Prompt City e.apps.fid.demo.po} erver.CityVO Now the UI part is completed and the directory structure should look like the below. (9 -E cholePontatDemo ws © Poptstbemo jor PoptstAM xm We have to write some code to make this work. So whenever a country is sel an vent(which is a partial event action) generated which needs to captured it the 0 nlequest of the € ler and then 4 method is called in the AM to handle that event. This is the basie How ¢ 6. Select the EmployeeP( Name the controller as EmployeeCO and set the package as chol hen right click on the PageLayoutRN and select set New Controller 13. ‘QAWebBean regionbean webBean. findChildRecursive ("Main 14, OanpplicationModule an = (OAAppLicationModule) pageContext. getApp! icat Lontiodule(regionbean) 7 is. if : +t pdate” .equals (pageContext .gotParaneter (OkWebBeanConstants.EVENT_PARAM))) 16. ( ‘ 19. Steing value_selected = (String) pagecontekt.detParancter (*fountry"): syeten.out printin("value selected"+value_selected) ; 1a. Lf (1(¢r*cequals value _selected)) [| (value_selected == mul1))) 19. { ‘ 20. Serializable(} param = ("ST") "87"}3 21, “ams invoketlethos ("ins ecltyvoouery", paxam) + 22, Serielizable(] parans = (value selected); 33. ancinvoketfethod ("instcountyYOOvery", params) + 2a. 25.4 26. else it (“updatei” equals (pagec t 28, String value_select T_PAR ontext.getParameter (OAWebBeanconstants EVE mw) (steing) pageContext .getParameter("c 29, ‘String valu edi = (String) pagecontext .aeti j= null))) 6 aul)! D) If, (value_select! (value_selected! = 30. if C1 \ equal s(value 31. 1 squals(va: elect yalue_selected!); Then in the processRequest to disable cache for the poplis web#ean) t(ORPageContext pagecontext, OAMebBe 01. public void pro: webe npildRecursi ANessageChos noiceBean) vebfiean. findhi dh 18, Include the following import statements in the PoplistAMimp| java. oF cle apps. fnd. common .MessageToken Any acle amework -server. OAAppl icationModule 04. js, En. framework. server.OAVLiewbject Impl; feo se ange 05.//tnelui 06 07 public void initcountyvoguer 08 fol ng 2 methods in the Poplistayimpl.java (String Country) 10, Soimty¥OIMpl vo = (countyvormpl} getcountyvor() + 10. if (vo == null) i 4 MessageToken{] errTokens = (now NessageToken (“OBJE ‘OW new OAEXcepti "EWK BJECT_NOT_FOUND", «, ns) 14. y ~ ‘ if (Country.equais("s7") ) thher : 3 y 1 i Save your work and right click on EmployeePG and run the Page. You should be 3 poplist and he County poplist will contain only the Count 29 Popiet Demo ee 1 Leon | Cafes ig ni te Implementing Exter nal LOV in OA Framework LOV is known as List of values.A listfValues region is rendered in a separate modal dialog, Tontaining a complex list of possible values that ean be selected asa valid value for an entry field on a transaction page or a field within a table External LOV is ereated when thet isa need for re-usability. Whe the same LOW i (0 be used External fam one page then we make use of the concept called External LOV. A LOW whe ane nammully ean be used only i one particular page wieere itis created. But an th Featemal LOW itcan be used in multiple pages. So that is the major advantage of ereatin external LOY. 1. Right eliok Workspaces and click ereate new OAworkspace and name I 3S polaLovDemo”, Automatically a new OA Project is also ereated. Name the projest es Lov Demo aiid packaze &s ehola.oracte.apps-fad.demotoy 1S Wensed to a Business component package. Right elick om LosDemoypr anclich on new Business Component Package Name - chola.oracle.apps.ind.loveemo.server 4 Sight click on chota.oracle-apps. fn. lovdemto server and click new Application Module. Name - LovAM. 6, _“Riuht click on chola.oracle.apps {ndilovdemo server and eek new View Obi 7. Name - CountyLovVO. Nevo is not based on any BO so click next and go tothe query section and paste the query. a. select country,county from uk employees S Nawr that we have created the VO's we need to attaci the VO's to the AM we created Double click on LovAM and shuttle CountyVO to the right side. S Right click on LovDemo,jpr and select new. Click on web tier and then O% ‘Components and select Page. . cena egeteny ant eihe gm meg - 10 11. Name = DemoPG at Package - chola.oracle.apps.fad.lovdemo.webui, 12. 6. Select the DemoPG and go to the streuture pane where a default region has been created. . “ 13.7. Select region! and set the following properties: . i 14, ID - PageLayoutRN AM Definition - chola.oracle.apps.fnd.lovdemo.server.LovAM. Window Title - List of Values Demo Title - List of Values Demo 13:8. Right click PageLayoutRN and click new Region, 16, 1D - MAinRN Region Style - messageComponentLayout 17. Style is given as messageComponentlayout because w components that is messageLovInput item in that region 1S. 0: Right click on LovDemo,pr and select new Click on web tier and then OA Components and select Region zoing to create only message 19, Na Re ne - CountyLovRN, Style - listOfValues Scope - Public 26. The property Scope is the key property which makeslihe LOV region public nd rmiakes it usable in multiple pages 24. 10. Right lick on Conntyt.ovRn and click tabte using wizard, In the wizard « hola oracte.apps.thd.lovDemo. LovAM and select the Coun cs a ose the LovVO.Click Next. {1 Set the Regiontd as CountyLovRN and region style as table. Click next {2-Shuttle the two attributes tothe right side-That is Country and County 13.Click next.check the tipping and then finish 7 zm ‘A . 31 ste 14 Select the field County’ aind set the following properties: SearchAllowed - True . SelectiveSearchCriteria - True . ‘Attaching External LOV to Pag 15, Click on DemoPG and right click the MAinRN and click new messageLovinput ID- County External LOV - /chola/oracle/apps/fnd/lovdemo/webui/CountyLovRN Prompt - County 16, By default there will be a lovmap created. Click on the lovmapt und set the following properties, LOV Region Item - County Return Item - County | Criteria Item - County 1c DemoPG. Yowyill see a field with an icon on the right side. That is |. Click on that to search for County.Bater B in the fect Save your work and run th the icon created when a lov is implemente | aaah eniteria and click Go. IT will display all the county starting with B. Click on quick s and the value selected will display as the text in the Held. / Bee Se teow ntti Rt ate es ORACLE ‘seen By [Est 1, sa RAITT LISTER ESO Gy = ue ean ° a uc akate ° = um ‘esnenance = ‘S = a os Be Ceo Demme rT | ee enacmcsaet j oracle Implementing Dependent LOV in OA Fra mework values of the lov are dependent on the Dependent (Cascading) LOV is a LOY wher value chosen from an lem like poplis or value of an item ike a styled tex! iter’. Here in this example depending on a poplis value we are going to generate values for the Lov. IFyou the below link: 10 implement Dependent or Cascading Poplist refe Create a new’AM by the name LovAM. | Create a View object for LO: View Name - CountpyvO Copy and paste the below query: select distinct country country qs Lame from UK employees 2,Create a View object for Poplist Name - CountyVO Copy and paste the below avery eloct distinct counly.counmry.county as Lnome from UK_employees Edit the lovAM and shuttle the VO's fo the right side. 1 Create anew page Name it as LovDemoPG 2 Set the properties for region | ID - PageLayoutRN ‘Am Definition - LovAM Window Title - Dependent LOV Demo Title - Dependent LOV Demo 4! create a new item by right clicking PageLayoutR? and set the following properties 1D - Country Item Style - messageLovinput View Attribute - ItemName Prompt - Iter Nam spy default there will be a region and lov maps °° ated. 4 Reght click on Region! and select new Region usin zand.Select the AM and then CountryVO. 6.Shuttle al 6 etick on the Lovmaph and set the following Propersss he attributes to the right side and click next and Finish LOV Region Item - Country Return Item ~ Countr Criteria Tem - Country 4 8.Right click on Region! and select new Region using wizard.Select the AM and then CountyVo. 9.Shuttle all the attributes to the right side and click neXt and Finish. 10.Click on the Lovmap! and set the following properties: ‘ “4 LOV Region Item - County Return Item - County Criteria Item - County Right click on LovMappings and sel LOV Region Item - Country Criteria Item - Country Here we create another lovmap because we ory value.So we choose the Country as another eriteria value. Country LOV US-and Uk Select US ‘ounty LOV.Here you can find only ohe entry for carey Fafa epee Seas Adding attachments ina OAF Page achmént in OAF. Here we are going to add a in this tutorial we wi w to add avait ew item in a table and sat the item siyle os attachmentimage: Lcredte @ new item in the Results table of the search poge Name - Altachment Item Style - attachmentimage View Instance - EmployeeVOT >.when you create 6 new atlachmentimage a new EntilyMap is created by defoultset Ihe Entity os TengoEmployee. 5 Righ! click on entityMapl and create 31 new primary Keys. ‘tpy defauit a new pimarykeysis created. Ciick on the primorykey) and set the View sen nese 4 attribute as‘Employeeid. « The structure window should look lik below : Save your work and tun the search page, Search for. an employee. In_the results table you will no! nse Fe Click on the icon, If will open. nev @ yOu Can select the fle you want t ailach enter a ‘ond a. name to the file | mec } | | Click Apply fo the search page and notice another icon in the o% Bloc pte semmnntite nes va nd 8 2 poll a ns se ee Add DFF in your Custom OA Framework Page We had a requirement to include DEF in our Custom page. That sounds litte different right?? pecause we had redeveloped the Service Request form in OAF We need this fovtionality Example used is a Service Request Header DFF Below are the steps to add dff'to custom page. Step 1: Define an item of the item style flex in your region Note: You cannot create a flex item sTaely under a messageComponentTayout region, but you can create A Layout region Aree neesazeComponentL avons region and ak the fee ite unde th Step 2: Set the Read Only property to True or False, depending on whether you want the plive Flexfield to be read only. des Step 3: Specify a View Instance for your Tesfield, The view’ instinss should be the same as the view instance (view object) specilied for your region tthe Appl Short Name property 16 the short name of the appFsation se which the Step descriptive flexfield is registered. Step $: Set the Name property to the name of the descriptive flexfield as it was registered. Step 6: Set the Type property to descriptive Step 7: Set the Segment List property as appropriate seta vegeta mene sme e T ar Step 8: Fiially, you may set the Display Context Field to True or False, depending on whether you want to hide or show the context for the descriptive flextield. w 1 Note: If you leave the Segment List property empty, all segments render. The value you specify for this property must use the following format: Global Data Elements[global segment! [global segmient2]...Contextl [segment] for context! segment? for context! }..Context2 For our example shown in Figure |, Packaging Type is the context field and Warehouse is the global field for the descriptive flexfield. ‘To always display the Warehouse global field and display the context-sensitive fields Items per Box and Box Size for the Box context and [tems per Pallet and Pallet Weight for the Pallet context, you would specify the following value for the ‘Segment List property: ElementsWarehouseBoxltems per BoxBox SizePalletitems per PalletPallet Weight are separated by a single pipe, "", while data from a gments within a vertain con! different context is separated by # double pipe, Read-Only Segments You can also add the read-only token ($ROS) alter any of the segments in the list, For example the (SROS) designator helow sets Segment! to be read-only Context | Segment (SROS)Segment2. Setups are ay sereen Shot (Click the fmage for Full Screenshot) - | | Printable Page in OA Gracie Application framework provides a very simple WY ‘of Reporting through OAF printable Page, itis @ Read only page which wil not be having any navigation, action Controls[Buttons), It will be an image of your original OAF Page. Prerequisite: An OAF Page Following are the Steps for creating Printable Page: Button) fe your page Step 1. Add button (item Ty Step 2. Set Prompt a3 “Printable Page” step 3.Set Atioute Set 0s “foracteyanps/ine/attibutess t2/Suttons/PrintablePage” step 4. Set DestinationURL os “Oa jsp? pade=PP foracle/apps/ak/printablepogs /wetouilPr YROARF=printable” It should be in following fown OA spepagerBrelainAM=Y&OARF=printable” In my case = is pp/oracle/apps/ak/pintablepage/webul/Prin jePagePG' fintoblePagePG&retainAM: Step 5. Se! Targe! Frame-as “_plank’ thi wil open Printable page in new Window. Step 6. Now Run your Page-and query i - Step 7. Click on “Printable Page button’, it wil open printable page in new winciow. a Builtin Popup page in OA Framework tong time now and it js finally available Many functionality in OAF based pages. ‘orkaround is t0 ust achieve the popup page This feature is part of R12.1.2.1t includes t pup types, + Embedded Pop-Up - Pop-Up is embetdded within the base page web bean hierarchy. For Dractical purposes, the Pop-Up is just an extension of the base page sharing the sama age state: Pop-Up contents are pre-fetched as part of the base page request * Parameterized Pop-Up —Pop-Up is a separate standalone region that is not embedded Within the base page, The Pop-Up contents are fetched and rendered on demand In the next article; we will see how to use this popup PBS CSV File Upload for OA Framework some time back hed done this component 19 upload CSV file conten! into. a OAF Joble and ofter modification of date at poge level.the data is pushed fo the Hatobase.Though! of sharing this component with others and below are the steps fo Govelop this component.clickon each of the ‘abs and the slides to get the content. How to pass am array to pW/sql procedure from java smework is one of the common Fequirement in procs ry amecd to use the standare! opis of oruele But fhe recommended approach trom call the api-But one of the simple way #8 to Se the below co eutput parameter had succesfully used nt Calting a pl’sql procedure from OA where ths oracle is to use plisql entity object ts rade where the api takes fable type as inpul paraihes telow code in one of my project and would Peeommend to any one has a similar requireme aypeine object th the same suture a your able Te bs v need to-use in ut plfsal procedareof some “ehh w nee to use in ur psa procedure of some PE REET 2)Define table of abject u have detined above ur jdbe code would not be to 2yDefine elobal able type and not inside package species ‘because in that case find this objest ype le of Object type is as fol 4.create or replace type rectab as table of rectype; package specification and procedure definition 008.Public voidarryToPLSOL() 009. ( 020.//Getting Db connection . 011 0xbBTransactionImpl oadbtransactionimpl = (OADBTransact LonTmpl) getOADBTransaction() 7 012.0racleConnection conn ~ . {oracleconnection} oadbt ransact {enimpl .getJabeConnection( 013. 014.//Detining variables ous. O16,//oracle.sq).ARRAY we will use as out parameter from the package 017.//and wiil store pl/sgl table OLGLARRAY message display = null? ois. 020. //Arraybist to store object of type struct O2t arrayiist. arow= new Arrayli st (1s 022. 023,//structbescriptor >> use to dascrihe pl/sql object 024. //type in java. O25 .structOescriptor voRowstruct = nally 026. 021, //Arcaybescripter >> Use to describe pl/sql table 028.//as Array of objects in java 029/ArrayDescriptor arrydesc = vil 030. 031.//tnput arzay to pl/sql procedure D32,ARRRY p message List = ull; 933 034.//oracle callab ai 1 ute procedlies wile 35.0rsclecal lablestatenent 036 o3t-ery 038. 039.//initializing ebject types in java. Gat eononstruct - Struct Descriptor.createbescriptor ("RECTYPE”, conn) : Dal arredese = ArrayDescriptar. createDescr Ipror (*RECTAB” , conn) jon.weopperGxcoptonte 04g. = 049, for (XXVOROWEAIpL row = (XKVOROWImp!) #xVO. First (1 950. zow!=nul DSi.row = (XXVOROWImpl) XRVO. next ()) 052.4 dsa.//He have made this method [o create struct arraylist 054.// from which we will make ARRAY bss. //the reason being in java ARRAY length cantiot be dynamic 086. //see the method defination below 057 _populateobjectArrayl ist (row, voRoWSt ruct ,arow) 7 083. obRows 1 72 thee perExcepti 3 1 Het 45 1i3.arraylist with struct object type . 2 aaley Lis public void populatedbjectArraylist ( XxVORowimp! row, StructDescriptor yoRowStruct , ArrayList arow) Z 116.4 jislebject {] attribtiessace = new Object (317 ‘ lig String attr] = nully 119.pate attr2 = null: 120-Numbex attr} = nulls “jyget velue fron Vo row and put in attri,ate? and attr 3 “yyeutting values in object array lattriptiessage[0}~attrl vattribMessage[1]=attc? ruct, conn, attribMessage] jenucr LoadedstructTime = new STRUCT(voROW! aroxt. add (load et ch (Exception el Calling Database Procedures and Function from OAF ‘According to Oracle Standards whenever iti possible we should use View Objects for Dausiens Gperation but in some situations we have to call PL/SQL Procedures and Functions Wn JDBC. In general, to invoke. stored procedure/Function from within an enfity objector an application inoahule, you need |. Create a IDBC CallableStitement with the PL/SQL block contiining the stored procedure invoication 2. Register OUT Parameter if any 3. Bind any variables. 4. Bxecute the statement. 5. Retrieve the values of any OUT parameters if'any 6. Close the statement Create Callable Statement: To create callable statement we should import java.sql CallableStatement package {f'we are using PL/SQL Procedure, then String that we will pass to callabe'statemeit wil bein following form; “BEGIN Package, name-procedure_name(:I,:2) END;” where I and :2 are Parameters which may be either IN or OUT Parameters send: “string = "begin test_package.pre Test (1, If'we are using PL/SQL Funetion then it should be in following form: “BEGIN :1 = Pac ‘ontain the results retumed by database function and will be treated Example: ‘age_name.function_name(:2) END;” where :1 will be the s OUT parameter and :2 is IN Parameter Ip where :1 will be considered as OUT parameter and needs to be registered while 2 is IN callable atement: Following piece of code creates Register OUT Parameters: Before registering OUT parameters we need to import import java sql. Types package And after that we need to use following statement to register OUT paramete Types. VARCHAR can be replaced by other datatypes as per your requirement Bind IN Parameters: To bind in parameters we-can use following statement; es.setString(1, value); where setSting can be replaced by SetNumber/SetDate as per your requirement Execute Callable Statement talement: we can use execute method of callable statement To execute followi eter Value: FUT parameter using getString/getNumber/getDate methods of callable Retriving OUT we can get the valtx ample: jmessageBuffer ~ os-getstring(1)7 Close Statement: , To close the statement we can Use elose()method of callable statemeht Example 1. Callable Statement for Procedure with IN ‘and OUT parameter on.import java.oq)-callablestatenent Oo import Java-sqh -SOLExceptions O3.inport java-sal.TYP eilablestatement (*b Example? Calling PL/SQL Function ¢ r ” jecbptransactt sclecatlablestatenent) cs.reghsteroutl srameter (1, TypeS-VAR 0 1 2 9 17.) 18. catch (soLe, 19. 20.cs.close); 21) ‘ ption sqle) Add DFF in your Custom OA Framework Page We had a requirement to include DEF in our Custom age..That sounds little different right?? Because we had redeveloped the Service Request form in OAF,we need this uictionality. Example used is.a Service Request Header Deo Below are the steps to add df to custom p {Her 1: Define an item of te item style flex in your Fegion, Not You cannot create a flex item directly under‘ messageComponentLayout region, bien a create a messagel ayout reaion, © MessageComponentLayout region and add the lex tem sc the messageLayout region, Te ony Property to True or False, depending on whether you want‘the ld to be read only, p 2: Sct the R criptive flex Step 3: Specify a View Instatce for your Nextield. The view instance should be the same-as the “lew instance (view object) specified for your reuion Step 4: Set the Appl Short Name property to the short name of the application to which the descriptive flextield is registered Step 5: Sel:the Name property to the name of the d Scriptive Nexficld as it was registered! Step 6: Set the Type property to descriptive Step 7: Set the Segment List property as appropriate Step 8: Finally, you may set the Display Context Field to True or False, depending on whether Youwant to hide or show the context for the descriptive Nlexfichd. Meee oh 55 Note = smpty, all Segments render. The value you specify for this ise the following format: Global Date! Elements{global segment! }[gfobal afyou leave the Segment List property ¢t property must Us segment2] Context! [segment] for mat ext y[seemient2 for contest) _Context2.~ For our example shown in Figuh® 1, Packaging Type i the content field and Warehouse is the global field forthe descriptive Mhexfield. To always display the Warehouse global field and display the context-sensitive elds ftems per Box and Box Size for the Box context and Ttems per Pallet and Pallet Weight tethe Pallet contest, you would specify the following vale for the Segment List propery: per BoxBox SizePalletliems Pet PalletPallet Weight Gaba Data BlementsWarenouseBox ya ingle pipes, while data fom ® jerents within a certain context a separated bo ited by a double Pipe As shown, S°8 different context is Read-Only Segments of the segments in the Tist, For exit ple, You ean also add the read-only token (SROS) after a the (ROS) designator below S15 ‘Segment! to be read-only Context! Segment (SROS)SEuM* nt Setups at DFF issue in OA Framework-CacheComponent not registered a When you add DFF to an OAP page the following error may appear _ METADATA.CACHE)(APr-END) CacheComponent not registered (KEY=FLEXFIEL Fix for that is as below-Using Functional Developer Responsibility also you ean do this, Click on Functional Developer responsibility->CoreServices select Application Object Library as Application name inthe sercen. >Click on create component button and give the following details to create component > Name = FLEXFIELD_METADATA_CACHE Code - FLEXFIELD_METADATA_CACHE Application Name ~- Application Object Libraty Deseription ~ Stores descriptive flexfield, key flexfield, and value set metadata ‘oader Class Name ~ oracle.apps.,nd.flenj.FlextieldCache. onde Business Event Name oracle apps. tnd. flex. dF. conpiledsoracleapps.{nd.fex Kffstracture compiledsoraeleps.fed.les. vst updated Time Out TypeTinxe To Liv ime Out After ~Global I ‘oe longa ac eee Written by Set DFF Segment Required in OA Framework Recently'I had this requirement to set the DFF segment to required progeamatically.T not straight forward but with little tweaking Tam able to achieve the functionality: Below code consisits of two seetions,one is to print the child names under the DEF region and the second one ugh it is 51 ‘ ’ is torget thé handle of the. ‘each segment bean to set the required util Enumeration? 01. import 3 * sgport oracte. apne. £nd. fxapewory onexceptions import oracle-apps-£nd.framevory Ser” ‘OaDSTransaction import oracle. app! trem Wer K_webui -oAControLlerimpl: smeere oracle apps. tnd. Eram “Mebud -OBagecontext SPS nd. framework. webu -OANODBESD sonstants: enor ebial -beans.,OADeScEipts veFse72e2 nitebBean? 97 Amport oracle. go inport oracle-apps- fad. fram Oo. import oracle-apps-fnd. fram work. webui beans. Ol 10 oracle. apps: En! 2 . sng message -OAMes tnputbean 1 acie.cab context 14.//Bel ia x ” hod saressF lex" Key Flexfield in OA Framework i In this Article, we will see how to display Key Flex Fields in OAF Pages. Lets assume that the requirement is to display the Accounting Flex Field in an OAF Page. OAF provides some inbuilt APIs to display the KFF as a concatenated segments or as individual segments. Approach 1: KEF Field as concatenated segments In this approach the KFF wil be showin s concatenated segment. See the image below (Geena eLnane Ties Saeerae wes Approach 2: eld as distinct segments In this approach, the KFF will be shown as indivi ments, See the imaye below ... kine! Create VO from GL_CODE_COMBINATIONS table with the following: VO Name: GLCodeCombinationsVO Query: select code_combination_id from gl_code_combinations_kfv Attribute Name: CodeCombinationld Step 2: Create an AM and attach GLCodeCombinationsVO to it Step 3: Create a OA Page with two items pointing to same VO attribute. The item will be of type “ile anid there wall not be any difference between the 2 items in XML. All the properties will be set i the Controller code. The XML will look something like: Step 4 Generate a Contwoller for the OA Page and set the FlexField Properties for the items in the Process Request as follows: pul quest ( reext pagecontext, (OAKeyF lexBean) webBean. findInde idRecursive("irem //set the KEF item property to have a concatenated segment display. CCIDLovEnabledKFF . useCodeCombinationLOv(true) ; et the KPF Name DlovEnabledKFF. setAttributeValue (FLEXFIELD. NAME, "GLH; //set the KFF Structure TDlovEnabledKPF. set StructureCode ("XXX_ACCOUNTING_FLEXPTELD") 7 Pn attribute name to the item she ewes : rset eB rains; noma leew abledKFF. setCCTDAttribute me {"CodeCombinati CCIDLovEnabledKFF .mergeSegmentsWithParent (pageContext) ; OAKeyFlexBean CCIDlovDisabledKFF 4 (OAKeyPlexBean) webBean. findIndexe //Set the KFF item display CCIDlovDisabledkFF. CCIDlovDis dchi aR) sive ("item2"); property to have a distinct segment useCodeCombinationLov (false) ; setAttributeValue (FLEXEIELD NAME, GLA"): setStructureCode ("xXx ING_FLEXE Step 5: sires nme fslucmacacgpecsival ee rates when you click the LOV next to the concatenated display of the KFF item, you will get a popup \vindow which will be like image below. You have an option to create a new record as well emer When you click on the LOV next to distinct se anormal LOV and it will bring all Valid values for that Segment trom the eorrespondin field Vaiue set ments (Company for example) it will behave like Flex i AutoCustomizationCriteria Search AutoCustomizationCriteria Search In the results based search we did not create any search felds in the search region Because of that we cannot add an LOV fo a-search item.We have to c hange the construction mode to AutoCustomizali ion criteria to explicitly create items inthe Search region and associale an lov fo that. 1.Click on QueryRN and change the f owing properties: Construction Mode property to autoCustomizationcriteria Include Views Par.el property to False Include Advanced Panel property to False 2.Select the QueryRN in th Structure pane, ht-click and choose New > simpleSearchPanel font the context men . A header region (region2) and a messageComponentl ayout resion (region!) will be created automatically BerarsminC WolaCloh Select the region? and set the following properti ID - SimpleSearehttdr + Text ~ Search. Select the region! and se ID - CustomSimpleSeareh, 1 CustomSimpleSearch region in the Structure pane, 1 ht-click and select N messageTextInput from the context menu. Bho on olaGlobal Set the following properties. + ID - SearchtapNane + Attributeset — {orgcle/apps/fnd/£ranevork /toolbox/atteibutesets/EvkT>xZaployees /FullNane + Selective Soarch Criteria ~ True + Datatype ~ varchar2 i + Maximum Length - 240 , + Prompt - Euployee Nane + C38 Class ~ OraFicldtext + Length ~ 40 4 Select the CustomSimpleSearch region inthe Structure pane, right-click and select New> messageTex Input from the context ment + 1D ~ searchenpaum + Attributasst — /eracle/apps/fnd/tramework/toolbox/attribu tesots/EWkTbxEmployoes/Employeord + Selective Search Criteria - true 3 + Datatype ~ NUMBER + Maximum Length ~ 15 + Prompt = Employee Number + CSS Class ~ OraPielarext + Length - 1s 3:Seleet the query bean or the query Components folder in the Structure pane, ‘choose Ne. > simpleSearchMappings from the context menu 6.Select the default mapping and set the following properties og + 1d ~ mepNamcttap + Search rom - SearchimpNane * Result¢ Tom ~ EmpNane 7.Select the simpleSearchMappings folder in the Structure pane, right-click and choose New = queryCritetiaMap from the context menu 8.Select the new mapping and set the following properties +d ~ emptumiap + Search Item - Searchtmpttus + Results ren - Raployeeta 9.Save your work and Run the page to check if tis working fine Cg =] bow Boo Pine iow Bik |B hl A pplii n Module Now that our page is working fine we are going to add a list of values to the Manager Namie ot new. In the ADF Business Components tab select 10.Right click on our project and sel Application Module Name - LabsLovAM Package - chola.oracle.apps.fud.lov.server Click Next and then in the Java page, deselect the Generate Java File(s) checkbox View Object ' [1aRight click on our project and select new. In the ADF Business Components tab select View Object. CholaGloba Name - EmployeeNamesVO Package - chola.oracle.apps.fnd.lov.server Select the Next button until you get to the Query page 12, the Query page, enter the following query into the Query Statement text field SELECT full_name AS EMP EUPLOYEE. NUMBER, email_address FROM fwk ERE end date is null [3.1m the Java page, deselect the Generate Java File for EmployeeNamesVOlmpl. Do select the Generate Java File for View Row Class: EmployeeNamesVORowlmpl to comply with OA Framework coding standards Select the Finish button to create your VO. , right-click and select Edit LabsLovAM... from 14.Select the LabsLovAM in the Navigator pan the context menu to open the Application Module E Navigate to the Data Model pag Select the EmployeeNamesVO view objec the Data Model list. itor {in the Available View Objects list and shuttle it to Click Ok. 15:Right click on our project and click New - > Web Tier -> OA Components - > Regior + Name - EmployeosLoveN Listorva’ ars re Lt =) [Brows 16.Select the EmployeesLovRN in the Structure pane, set the:AM Definition propertyto chola.oracle.apps.fnd lov.server LabsLovAM, set the Advanced Search Allowed property toTrue and set the Scope property to Public. 17.Select the EmployeesLovRN in the Structure pane, right-click and select New > table Using Wizard from the context menu. “ 18.In the BO4J Objects page, select your LabsLovAM (Chola oracle.apps.ak.lov.server.LabsLovAM), and then select your EmployeeNamesVO1 view object instance from the Available View Objects list Teenie ann 3 7) areceesemesomnaty - eCholaGlobata! Name - EmpNamesTable Style - table 1 all the attributes in the EmployeeNamesVOL 19:4n the View Auribuites page, a 20),Set the follow ing properties fi + Style ~ mossagestyledroxt + Prompt Rame - Employee Nazo + Attribute set - /oracle/apps/fnd/franework/toolbox/attributesats/PukTbxEmployees/FullNane 21.Set the following properties for EmpNum : + Style ~ nossagastyledtext * Prompt Mame ~ Number * Attribute sot - es Anetra atbatesate/eetntaoyataeynns umber 22.Set the following properties for EmailAddress: * Style ~ nessagestyledrext {Prompt Nane ~ gmail Address + Attribute set ~ “Ssvoe/sere/t/#raenorh ontbon/attrbatasts/tn xaos tnt sndénng Click Next and Finish Ro NMS CholaGlobat. 23 Select the EmpName and EmpNum item in the Structure pane, and set their Search Allowed and Selective Search Criteria properties to True 24.seleet the SearchEmpName itetn in the “stomSimpleSearch panel. Change its Htein Sivte Property 10 messageLovinput 25.Set the Exterual LOY property w /eholw/oraete Ps/tnd/lov/webui/EmploycesLovRN, 26,Select the default LOV mapping, 1D'ed as lovMapl, and set the following properties * ZOV Region ten ~ naptanc Return Ttem property ~ searchaptane Criteria Item - searchEepiane Setthe ropetien or CholaGiobal 27.Right-click lovMay Pings in the Structure panel, menu, and select New > lovMap from the context Select the new LOV mapping, 1D'ed as lov Mupl, and set the following properties: * MOV Region Item - EmpNum . * Return Item property - searchlapNum Output Test your work and run the page Cholaciobar CholaGlobal | Name - 1; absLovAaM Package ~ View Object F1Right ef ick on oUF project g Object fase CholaGlobal Name - Employes Package - chola, mesVO ‘eapps.ind.lov.server Select the Next but mn until you get to the Query page 2.1n the Query page, enter the following query into the Query Statement text field 13.In the Java page, deselect the C EmployeeNam nerate Java File for View Object Clas 'VOlmpl. Do select the Generate Java File for View Row Class yeeNames\ORowlmpl to comply with OA Framework coving standards the Finish bution tw ¢reate your VO. et the LabsLovAM in the Navigator pane, righ ht-click and select Edit LabsLovAM... trom the context men to open the Application Module Editor Navigate to the Data Model pay - Select the EmployseNamesVO view object in the Available View Objects list and shuttle it to the Data Model list Click Ox Lov Region’ 15.Rightelick on our project and click New - >Web Tier -> OA Components - > Region ‘ * 7, + Name ~ Eaployeestovew : [ Backage ~ chola. oracle. apps. nd. lov. webui * Style - nistorvaluss ‘ ° Create a new Region with LOV Siyie Wet are the dette of Your Wane: [ee 16Select the EmployeestovRN in the Structure pane, set the AM Definition property to chola.oracte.apps.fnd.lov.server.LabsLOVAM, se the Advanced Search Allowed property to ue and set the Scope property to Public '7.Select the EmployeesLovRN in the Stnucture pane, right-click and select New > table Using Wizard from the context menu, {8.ln the BCA Objects page, select your LabsLovAM (Chola oracle apps.ak lov.serverLabsL ovAM), and then select your EnyployeeNamesVO1 view object instance from the A. ew Objects list Name - EmpNamesTable : . Style - table 19.In the View Attributes page, add all the attributes in the EmployeeNamesVO1 20.Set the following properties for EmpName : . i * Style - messageStyledText + Prompt Name - Employee Name + Attribute set - foracle/apps /End/framework/toolbox/attributesets/FwkTbxEaployees/PullNane 2.Set the following properties for EmpNum * Style~ messageStyledText + Prompt Nane - Number + Attribute set - {opacte/anps/fnd/eramework/toolbox/attributesets/FvkTbxEmployees/EmployaeTd_N usher the following properties for EmailAddress Style - mess: StyledText + Prompt Nama - Email Address + Attribute sot - /oracle/apps/tnd/franework, wkbxEmployees/Emas Address polbox/attributesets, Click Next and Finish, a CholaGlobala 269 t t 23,Select the EmpNamé aiid EmpNum item in the Structure pane, and set their Search Allowed ‘and Selective Search Criteria properties to True. ‘24 select the SearchEmpName item in the CustomSimpleSearch panel.Change its Item Style property o messageLovInput. 25 Set the External LOV property to /chola/oracle/apps/fnd/lov/webui/EmployeesLovRN. 26.Select the default LOV mapping, ID'ed as lovMap1, and set the following properties: © LOY Region Iteni - Empivame . + Return Item property - SearchEmpNane + Criteria Item ~ SoarchEmpNane Right-click lo’ Select the new LOV n Lappings in the Structure panel, and select New > JovMap from the woutest as lovMap 1, anid set the following properties: © LOV Region Item - EmpNum + Return Ttem property - SearchEmpvum Test your work and run the page. ORACLE Eplrycs Ghote Notce te symbot bei: CholaGlobat | Drill Down to Details For this exercise, you'll be extending the simple Employees search page you created in the Search Page Exercise to include a aiileown to a Detals page thal queries a single employes. View Object: Right click on your project and select new - > Business Tier ADF Business Components, View Object ime ~ EmployeeFull VO Package - chola.oracle.apps.fnd.employce.server ¢. select the EmployeeEO in the Availalse list and shutile it to t 2.1n the Entity Objects px Selected list twice (once the employee, and once for the employee's manawer) 3.Select EmployeeEO1 in the Selected List and set or verity The Association End field is set to ManagerldEmployeeEO, Retierence is checked, ln the Attributes page, select the following attributes from the Available list and shuttle thermo the Selected list From EmployeeEO: Employeetd FirstName LastName FullName EmailAddress By Managerld PositionCode Salary StartDate EndDate ‘ { From EmployecEO1: Employeeld FullName Email Address CholaG lob: Fins Atte Settings pag, select the the EmailAdtress attribute, set the AttributeN ame rei {o be EmployecEmail, and change the Query Colunn Aline field thy EMPLOYEE EMAIL & Now select the FuliName ateibute, set the Attribute Name field to be E mployeeName, and Column Alias field to be EMPLOYEE NAME change the Que Z;Now select the FullNamet attribute, set the Attribute Name field to be ManagerName, and ‘change the Query Column Alias field to be MANAGER. NAME Attribute Name field to be ManagerEmail, and AGER_EMAIL 8.Now select the EmailAddress! attribute, set th change the Query Column Alias field to be MAI Select the Next button. 9.1m the query page click on Expert mode and paste the below query 73 02. SELECT EmployoeEO.EMPLOYSE,_10, 02. EmployeeE0.FIRST_NANE, 03. , — BmployeeEO. LAST_NAME, Of. Enmployee£0. FULL NAME AS ENPLOYEE_NAME, 05 BmployeeEO.EMATI ADDRESS AS EMPLOYEE_EMATL, of. Enployeet0.MANAGER_ID, 07. 4 EnployeeEo.POSTTIOR_cooE, 08. . — EnployeeEO. SALARY, 03. Enployee£0.START_DATE, 10. \ Employee£0.END_DATE, ne Employeesoi .ENELOYES_rD AS ENPLOYEE_101, 12 Employeet01. full_namé AS NANAGER_Naie, 13, EmployeefOl email address AS WANAGER_EMATL, 1 fkp. meaning AS POSITION DISPLAY 15, FROM FWK_TGX EMPLOYEES Enployesto, 16. EWR TDK EMPLOYEES EmployeetC1, "7 Sukh lookup_codes v1 fk ia (4) BO.manager_id = Employee position code = Tikp. Look (_TBX_POSITIONS* 18. WHERE Enploy: 19. and Employes 20. and £lkp: Lookup_type = 10.1n the Java page, select both the Generate Java File for View Object Class: EmployeeFullVOlmpl checkbox and the Generate Java File for View Row Class: EmployeeFull VORowImpl. Click Finish. Edit the EmployeeAM and shuttle the EmployeeFullVO to the right side. 11 Right click the project and select new.ln the New window, expand the Web Tier hierarchy and select OA Components. Select Pa Name - EmpDetailsPG Package - chola.oracle.apps.{nd.employee.webui 12.Click on region! and set ii, AM Det cle.findLemiployee.server.EimployeeAM jon - chola.apps.o iii, Window Title ~ Chola R12 Tutorials Drill Down Search Page iv. Title~ Chola Search Page vy. AutoFooter - True 13.Select the PageLayoutRN in the Structure pane, right-click and select New > Region Using Wizard from the context menu. 14.In the BC4I Objects pag, select your EmployeeAM (chola.oracle.apps-tnd.employee.server.EmployeeAM), and then seleet your Employee! view object instance from the Available View Objects list ie seek Senta ost be Pitman aIVOI Seloct ne envineerive | —— | Cae wCholaGlobala {Fin the Region Properties page, set the Region ID field value to MainN and set the Region Style to defaultSingleColumn Ea ipa the View Attributes page, select the following from the Available View Attributes list and Je them to the Selected View Attributes list. - Employeeld FirstName LastName Employeetmail PositionDisplay ManagerName Salary StartDate EndDate Click Next. 17.Change all style of all the attributes to messageStyledText and the attribute set as follows: Employeeld - joraclelappsifnd/framework/toolbox/attributesets/FwkTbxEmployces/Employeeld FirstName - Joraclelapps/fnd/framework/tootbox/attributesets/FwkTbxEmployees/FirstName LastName = foracle/apps/fnd/framework/toolbox/attributesets/FwkTbxEmployees/LastName EmployeeEmai Joraclelapps/fnd/frameworkitoollox/attributescts/FwkTbxEmploy ees/EmailAddress PositionDisp! joracle/apps/fud/framework/toolbox/attributesets/F wk TbxEmployees/Position ManagerName - Joracle/apps/fnd/framework/toolbox/attributesets/FwkTbxEmployees/ManagerName Salary - Joracle/apps/fnd/framework/toolbow/attributesets/FwkTbxEmployees/Salary ‘StartDate -Joracle/apps/{nd/framework/toolbow/attributesets/F wkTbxEmployees/StartDate EndDate - Joracle/appsifnd/framework/toolbow/attributesets/FwkTbxEmployees/EndDate Set the prompt as per the screenshot.Click Next and Finish, | <_< | froee conte sie | omnis [wast] 18 Select the MainRN region in the Structure pane. Set the the Hide Header property to True (so no header text of line renders), and leave the Text property blank. 19 Set the properties for EmployeelD: CSS Class - OraDataText. 20.Set the properties for FirstName: CSS Class‘ OraDataText 4 21.Set the properties for LastName: CSS Class - OraDataText 22.Set the properties for EmailAddress CSS Class - OraLin nation URI - xt il To:{EmployeeEmail} 23.Set the properties for Position: CSS Class - OraDataText. 24.Set the properties for Manager Name CSS Class - OraLinkText. Destination URI - mailTo:{EmployeeEmail} CSS Class - OraDataText 26.Set the properties for Sta CSS Class - OraDataText ne properties for End Date CSS Class - OraDataText, 28.Sclect the MainRN defaultSingleColumn region and chang. messageComponentLayout, JDeveloper will display to proceed, Your items will not be adversely affected Creale a Retum Link Add a "Return to Employee Search" link at the bottom of your page beneath the pay bottom fine (the ski). Region Styie property to Select your PageLayoutRN in the Structure pane, right-click and select New> returNavigation. Select the returnNavigation link item that JDeveloper creates for you beneath the pageComponents folder and set the following properties: ID - ReturnLink Destination URI - OA. {sp2page=/chola/oracle/apps/fnd/employee/webui/EmpSearchPG&retainAM=Y Text - Return to Employee Search. hor ertrh 2 rene " tates Save your work, VO Code: 20, Adil an initQuery( ) Method! to Your EmployeeFullOlmpt Class Right Click on EmployeeFull VOlmpl and select Go to View Row class Import Statements: import oracle,jbo.domain. Number, import oracte.apps.fnd.tramework. OAException; Code: 01.publ ic void inituery(string employeeNumber) c 03 f 06. try 0 ‘ 08 ‘ompNun = new Number (employeeNumber) ost r fo atch (Exception aa { 12, throw new OAException("AK", "EWK TBK_INVALID_EMP NUMBER"); a3 ) ud setithereClause ("EMPLOYEE 1D = ;1 is etWhereClauseParams (null); // Aw. 16 setWhereClauseParam(0, empiium) 7 executeguery(); 18. » 1». } Add an initDetails( ) Method to Your EmployeeAMImpl Class Import State: import oracte.apps. tnd. framework. OAException; import oracle.apps.find.common.MessageToken: Code: Diill Down’ » achieve drill down,select the EmpN: Destination URI property to: ¢ item in the ResultsTable region and set the a9 Controller: Select the PageLayoutRN of the EmpDetailsPG in the Structure pane, right-click and select Set ‘New Controller... from the context ment. : In the New Controller dialog, set the Package Name to chola.oracle.apps. fnd.employee.webui and the Class Name to EmployeeDetailsCO. siaiaaalll OK to create your controller. Code: 4 per pr t (pageContext Bean): . r mber parameter from the URL i plication Save your work and Run the page. aeeeretti eceanaie"Seart ote that he earch caso Incentive Feccotas, damber< ecemnglze Query: (Quen) Chola (employee Nome dream, aries employee Number 2 [3] [ame] able (cameras) ‘Tiere tame Haier Paton Bl. . CholaGlobai i} etail Page in OA Frameivork ue Master: Master-Detail page is a very common requirement for OAF based project This tutorial is posed on Oracle's Toolbox tutorial inds been redone and explained step bystep fo help beginners. Below are the step by step by ‘approach to implement the Master Det page using PPR-Source code for Ihis Tutorial is available os attachement 1. Right olick Workspaces and click create u6 OAworkspace and name it as NchufaMasterDetal”, Automatically anew O° Project is also ereated. Name the projest aS CholaMasterDetailand package as chola coracle.apps.fnd.master. — {| oomsrorsinsmiae eae fen t (choisasterDetale_ - t [a] aaa a New OA Project Clopen im new Navigator | ae _SicholaGiobal ‘ a x “2 ez2eer@t? Set the project properties as per the screenshot below: | mesenteric (ean revere 1Glghal ed to create (wo Business component package. Right click on CholaMasterDetail jpr and click on new Business Component Package 3.Right click on chi Name - CholaMdAM, Packa vo 4, Right lick on cholamd.oracle.apps.find.master serv Name - SupplierPVO Package - cholamd.oracle.apps.fyd.master-server. Click Next and go to the attributes page. The VO is atiributes.Click New and create the below attributes. Name - RowKe DataType - String, Updatable - Always Key Attribute - Yes Name - PoApproveReadOnly DataType - Boolean Updatable - Always Name - PoApproveRequived DataType - String Updatable - Always Name - PoApproveRender DataType - Boolean Updatable - Always er and click new View Object. ssed on any EO. We need to create transient Name - PoApproveReject DataType - Boolean Updatable - Always Name - DetailTableText DataType - String Updatable - Always Click Next and Finish. Right clickon cholamd.oracle.apps.tnd.master.server and click on new View Object. Name - SupplierSitesVO Package - cholamd.oracle.apps.fnd.master.server Click Next.Go to the query page and past owing query Click Next and Finish. 6.Right click on cholamd.oracle.apps. find. master.server and click on new View Object Name - SuppliersVO oo Package - cholamd.oracle.apps.fud.master.server. Click Next.Go to the query page and paste the following query: . SELECT SupplierEo. SUPPLIER 1D,’ « 1 SupplierB0.NANE, . ‘SupplierEO.ON_HOLD_FLAG, Suppl lerE0. START_DATE, ‘SupplierE0.END_DATE FROM EWK_TBX SUPPLIERS Supplierto WHERE Supplier£0.SUPPLIER ID <= 100 Note: Add a new attribute SelectFlag as a transient attribute.Do not forget to do this step, Edit the AM and shuttle the SuppliersVO and SupplierSitesVO to the right side and click ok. Only then the VO instances will be accessible. VL 7.Right click on cholamd.oracle.apps.fid.master-server and click on new View Link. Name - SuppliertoSitesVL Package - cholarhd.oracleaapps.{nd.master.server. int destination view object select sot Suppliers VO und £ §.From the source view object SuipplierSitesVO.Click Next. Boeumenws Bata Does Select the Supplierld from the available attributes of Suppliers VO and shuttle it to the right side. Click Next aug ve fncem a 2 oe peeeeezz7z7it aC helaGlobal 10.Select the Supplierid from the available attributes right side. Click Next. cab b glaGk bal 87, of SupplierSitesVO and shuttle it to the , ie Ger] CholaGlob Cie) Ces) Cee) fj et PG : as 12.Right click on CholaMasterDetail.jpr and select new. Click on web tier and then OA, Components and select Page. ‘Name - CholaMasterDetailPG Package - cholamd.oracle.apps.fnd.master.webui. What ere the detais of your naw Page? Cela Glofa! [5.Sclect the CholaMasterDctalPG and go to the stscuture pane where a default region has been created 4. Select region! and set the following properties ID PageLayoutRN AM Definition - cholamd.oracle.apps.fnd.master.server,CholaMdAM Window Title - Master Detail Page Demo ‘Title - Master Detail Page Demo UU Rivht click on Pagel ayoutRN and Master DetailN 16.Right click on MasterDeta RN and select new Region Using Wizard. 17.From the droplist select the CholaMAM and then SuppliersVOL.Click Next a —CholaGlobal on MO) Tie 1 8.Set the RegionID as SuppliersTable and RegionStyle as Table. 19.Shuttle all the attributes to the right side and click next 20.Change the Style of all the attributes to mess: (Click Next and Finish, Right click on SuppliersTable and select new -> singleSelection.Set the following pre the singleSeleetina: View Instance - SuppliersVO1 View Attribute - Select lag Action Type - firePartial Action Event - supplierSelect votion Set the following properties 21.Right click on SuppliersTable and click new si View Instance - SuppliersVOL View Attribute - SelectFlag Action Type - firePartialAction Event -supplicrSelect 21.Select MastersDetail RN and select new 2 cette titi 23.Set the RegionlD as ‘SupplietSitesHeader and RegionStyle as header. 74 Right click Suppliersiteseader and selet ne Region Using Wizard, 25.From the droplist select the CholaMdaM and then SupplieeSitesVO Click Next 26.Set Name as SupplicrSitesHeader and RegionStyle as Table Click Next Shuttle all the attributes to the right side andi lick next 28.Change the Style of all the atributes to mes, *eeStyledText.Click Next and Finish, co *.Right click on the Papel OMEN in the page and select Set new Contoth MasterDetailCo Package eholam: -oracle.apps.tad.master.webui i ieee | eras Esctoge Nae: ishelond ofl pos inmsstor ae Dass Name | esterDetancc ‘Import Statements: 01. import ofacle. apps. fnd common Versioning 02. import oracle. apps. fnd. framework. OAApplicationtodule; 03.import oracle apps. fnd. fratework.webul .OAControllerInpl; oracie. apps. £nd. framework.webui -OADataBoundvalueView0bject? oracle.apps. fad. framework. webui .OAPageContext: oracle. apps. fnd. framework. webui .OAWebBeanConstants: oracle. apps . £nd. framework. webui .beans.OAWebBean; oracle. apps .fnd. framework .webui . beans. layout .OAHeaderBean; ui -beans.table.ATablefiean: aracie.apps.fnd. framework, EindChildRecursive (*Suppliersitesteader (OAWebBeanConstants. TEXT_ATTR, AtesHeader, "DetailTablerext™, Hewobject tLonModute am = tionModule) pageContext..getAppl icationModule(webBean) 08.am,invokeMethod ("initializePPREKamplePag ProcessFomm Request: appli Nodule am AM Code: Include the two methods in CholaMdAMimpl java file handleSupplierSclectionEven lectionvent () 01. publ ic void handlegupplier BTransaction txn = getoaDpTransaction = null) 07.1 (masteritci 08. { - 03-¥o.setCurrenttiow(masterRow) ; 10-String supplierNane ~ (stringYaasterfor.getAteribute(*Nane*) LMeeEageTeReN() tokens = ( new wessageToken "SUPPLIER NAME, cuppleruame) s 1.detaiitaplerext = * Ui tn-getMessage("AK", "FiK TSX jSITES_FOR SUPPLIER", tokens); uy 16-4 ‘ 1?.detailTablerext = [g-txn-getHeseage("AK", "EWK TBx SUPPLIER SITES", mult); 19.) 20.SupplierPVOrmpl apperopsve = getSupplierPvol(); 21.Row appPropsRow = appPropsVo.getCurrentRow()¢ 22.48 (appPropstow !~ null) sRow. setALtribute("Detailtabletext™, detailtabletext); ) // end handlesuppiierselectionsvent () initializeP PRExamplePage: DL. public void inltial\ zepPRExamplePaae () 03.0AViewopject appPropsvo = OAViewObject) findViewobject("SupplierPvol"); o. if (apprropsvo t= null) 6 apbPropsv0. settlaxe bzeiops appPropsVO.executaguery | L pPProps¥v0, insertRow (appPropsVO.treateRow|)) ; 1 W Tow = (ORRow) appPropsVO. first () + om. SetAttribute("Rowkey", new Nunber (1); ® z sien wens r Mice Elctones 1 Tieaup1808 nu 1£0ee.2000 tt ‘2sion2003 italia Co 20m olaGlobal | ‘Sao e = : | F . Sk tthe sana t tedecs00 t 94 OAF - Delete Page | .Verify the that you have the following remove() method to your EmployeeEOImpl class, If not, add jt and then compile and save your change. public void remove ( 1 super-renove(); 2.To add a Delete switcher column to our results table, we need to modify our EmployceSummaryVO to include a decode attribute for this column that implements the following rules: Ifthe employee is active, the Delete trashean is disabled If the employee is inactive, the Delete transhean is enabled. 3.Right-click EmployeeSummaryVO and select Edit Employe query in the sql statement. uminaryVO.Paste the follow 4.Navigate to the Attributes section for your attributes and verify that any aliases in your quety ire shown correctly. Make any necessary changes and select Apply PG: 5.Select the ResultsTable in the EmpSearchPG, rig! context menu and set the followin, click and select New > switcher Irom the roperties: ID* DeleteSwitehe Region Style - switcher Attribute Set - /oracle/apps/fnd/attributesets/Buttons/Delete 95, - . View Instance - EmployeeSummaryVO1 : 1 View Attribute = DeleteSwitcher 6.Select the default switcher casein the Structure pane, and select New > Item from the context menu Set the following properties: : ID- DeleteDisabled Item Style - image Image URI - deleteicon_disabled.gif Additional Text - Delete employee action is disabled, Height - 24 Width - 24 7Select the DeleteSwitcher in the Structure pane, right-click and select New > case ftom the context menu. A Select this new node, right-click and select New > Item from the context menu.Set the following properties ID- DeleteEnabled Item Style - image Image URI - deleteicon_enabled.git Additional Text - Delete employee action is enabled. Height - 24 ' Width «24 Action ‘Type = fireAetion Event - delete Submit - True Si he Parameters property. define a parameter whose name is empNum and whose value is S{oa.EmployceSummary VOLEmployecta pName 1OSelect the Auld Paranieters button and define a second parameter whose name is e1 and whose value is ${oa,.EmployeeSu VOLEmployeeNane} Select Ok and save your work. To ensure the correct aligiiment for your Delete colunm, add the following code to your EmployeeResultsCO controller in the processRequest() method Import Statements: import oracte.cabo.ui.data DictionaryData; import oracle.cabo.ui.data. DataObjectList; Import oricle.apps fn. framework. webui.beans. table. OA TableBean. . tee 96 Code: 2, _GitableBean table = (oatableBean) webBean; 2. table.prepar ing (pageContext) ; ¢, PatagbjectList colunnFormats = cable, yetcolm aPormats(); §: Dictionarybata columfornat = nuit; 5. tt chilatndex = pagecontert FindchildIndex(table, "Deleteswitchor" 6 lunaFormat =(DictionaryData)col tats. get Item(chi ldrnde: UiMFormat--put (CO: ATA FORMAT KEY, ICON BUTTON FORMAT) Implement the Delete Action: In this you'll be adding the code to handle the Delete i on selection, Add deletsEmployse Method to the Empl oyeeam Import Statements: import oracte,jbo,domain. Number import oracle.jbo.RowSetlterator Code: add Delete selection Handler Code to EmployooRssult ‘co In processFormRequest0 Import Statements: import com-sun javazuti.collections HashMap; import oracle-apps.fnd.framework webu. OADialogPage;import aate.apps fd framework. webu |AWebBeanConstants; import oracle.apps-fnd common. MessgacToken immport oracle apps.fnd.framework OAException; Code: rel F aranet PARA! number = ext getbaraneter( 4 i E t.getbar ( *) ‘ : i ker we Messal eH ployeeNar hon ma fF aK", 06. ox TEMP. DBLETE WARN", COvOD®) i lograge = new OAL ie RARNING, sialog! epost TocallingPa 8 Add Delete Comformation Handler Code to Add Delete Comformation Handler Code to Import Statement: import java.io Serializable; Code: ameter ("DeleteYesButton") != null ~ pageContext .getParam pageContext .getParanet mF Pn jetApplicationModule (uebtiean 9 i i 1 na MP_NAME", 1 "PWK_TBX EMP DELETE CONFTAM", tok ABxCeptLon .CONFY n olaGloba Create a now employee and give a end date while creat employee then you will be able to delete that employ Only when there is a end date for an ORACLE Create a new, Employee wih End ate and thon search ‘or thal employee, arate eat ee tot the rch ase earive nen la aon testi) = Dae bce bar « |imployes Name Manages Position | F sure em GS CholaGlobal | Partial Page Rendering What is Partial Page Rendering? PPR is atechnology that is used for refreshing oily a part of ap: instead of having to refresh the whole page. A source event can tr i in target items. PPR is used for : Hiding/Showing Objects + Requiinal Optional + Disabled Enabled + Read only/Updatable at enable PPR. They are: ble PPR. They are: There are few items tl are few items tl You can also declaratively define your own PPR events for selected components. For example, you can: + Configure the selection of a poplist to ea red or be disabled based on the’selected value. > of'a text field to set related field values if you set a Supplier related fields to render, be updateable, be + Configure the value ¢ 100., sous value and tab out, the dependent Supplier Site defaults automatically). * Configure the selection of a master table's singleSelection radio button to automatically query and display related rows in a detail table. Let us see an example where we can implement PPR. Example: Depending on a value that is chosen in the poplist you need to render'a item in the age. So this is what we are going to implement now. Here we have a Quantity poplist, So if the quantity is selected only then the cost (fextinput) should display.Ci BC4J 1.Whenever you implement PPR we create a PVO(Property View Object) Right click on Project select new - > Business Tier -> ADF Business Components - > View abject. Name - DisplayCostPVO Package - < Depending on your project 2.Go to the attributes page and click New, We are going to create 2 new transient attributes First Attribute: Aliribute Name DataType - Strin, KeyAttribut table - Always Second Attribute Attribute Name - DisplayCos DataType - Beles Updatable - Always, Click Next add the PV nd then finish. We do not require any java files to be generated hete.Do not forget to to the AM. Page: 1.Create a new poplist (Refer Here Jand then a item with style as messageTextInput or messageStyledText 2.The following properties needs to set in the poplist.In ge View Definition, View Auribute, View tnstance. But for PPR you need to set 2 main properties fou will be setting values for lor 1D - Quantity . ‘Action Type - firePartial Action : Event - quantity ‘ : ‘ 4 4,Create anew item as Cost with messagelnpurT ext as the Item style Set the following properties Td - Cost Prompt - Cost View Name - < Asiper your VO> View Attribute - < As per your VO> Rardered - § {oa DisplayCostPVOL.DispayCost) ( DisplayCost in the atribute we set in the PvO) CSS Class - OraDataText co Code ‘Add the following in processFormRequest Bie iy cin™ equal cteay) tl eval n AM Code 09. appbropsvo.executeguery (17 10, appPropsVOinsertRow (appPropsvO.createRow()) 7 ILonRow rox = (OARow) appPxopsv0.first () 12.) 23) 1a handLeCostChangeBvent ("FALSE") 7 ‘ 01 public void handleCostchangetvent (String Quantity! 02.1 Ds OAViendbject vo = (OAViewObject) findViewobjec 04,0aRoW row = (OAROW 05.42 (Quant ity.equals ("PRUE ayCosteVol"): Search Page without Using Query Bean and Switcher Implementation 1 tables to cor lly disp implementing a Search without using the construction mod we wil have a column displaying delete. In that column we have .bled or enabled using the switcher switchers In this tutorial v the results tab images displayed showing if delete is functionality mport Statement work server. OA ViewObjectimp! import oracte.apps. tind log. Here we are setting the where clause and assigning the variable to the country! variable and ‘executing the query to get the values for display. BCAJ 2. We need to create a Business component package. Right click on SwitcherDemo jpr ‘and click on new Business Component Package. . . 4 Name - chola.oracle.apps.ind.switcher.server S.Right click on chola.cracle.apps.ind.demo:server and click new Application Module. Name - SwitcherAM. vo: switcher server and click new View Object 4, Right click on chola.oracle.apps. fi Name - SwiteherVO Package - chola.oracleapps.{ad.swit server ‘The VO is not based on any EO so click next and go to the query section and paste the query Select Couttry, county, decoda(nvl (ra chaciottyh, *), leteDisabled*, t 1 SHITCHER, city f£0m UK_Bt In this query we will display another column called Delete which will display images. If there is no city for the particular country then delete button will be disabled. If there is a city then delete ‘button will be enabled Atach the VO to the AM by right clicking the SwiteherAM and click Edit, Shuttle the ‘SwiteherVO to the right hand side. 5. Right elick on SwitcherDemo.jpr and select new. Click on web tier and then OA Components and select Page. Name - SwitcherPG Package - chola.oracte.apps.fnd.switeher-webui, 6. Select the EmployeePG and go to the strcuture pane where a defaull region has been created, 04, « . Hs : Ceett 7- Select regionl and set the following properties z ID - PageLayoutRN AM Definition - chola.oracte.apps.fnd.switcher. erver.SwitcherAM Window Title ~ Chola Switcher and Search Demo Title - Switcher Demo 12. Right click PageLayoutRN and click new Region, ID - MAinRN Region Style - messageComponentLayout Componentlayout because we are going to create only message \geChoice item in that region, Style is given as mess: components that is messa 13. Right click on MainRN and select new ->Item, Id - Country Item Sty ssageTextInput Prompt - Country Length - 40 Max length - 40 |4.Right click on MainRN and sel Id- ButtonLayout |S. Right click on ButtonLayout ~~ new. - Item, ID-Go Prompt - Search item Style - SubmitButton Search Allowed - True RegionID - SwiteherRN Region Siyle- table Ty ect the SwitcherAM and at bottom sclect the SwitehetVO ¢ nd click Next 18, Shutile Country, County and City attibutesto the risky side, Change the style of all to ‘messageStyledText.Click Finish. 18 -Right click on SwitcherRN atl click switcher: There vill be aregion and avase by defiult Spiked Set the view attribute as DeleteSwitcher. View Tnstanes 28 Switcher VOL 20, Right elick on case and select new - > item Set the following For the item, ID - DeleteDisabled ITem Style - image Height - 24 log Width-24 Image URI - deleteicon_disabled.gif 21 Right click on case and select new - > case.Right click on case and select new -> Item.Set the following forthe item. . i ID - DeleteEnaabled TTem Style - image Height - 24 Width- 24 Image URI - deleteicon_enabled.gif Event Type - fireAction Event - delete We should write code with method name as delete after capturing the event Controler code: 22.Right click on Pagel ayoutRN and select set New Controller. Name - SwiteherCO. Package - chola.oracle.apps.fnd.switcher.webui. Import Statements: import java.io.Serializable; import oracte.apps.fnd. common. Message Token; import oracle.apps.fnd.common. VersionInf; import oracle.apps. fnd.framework.OAApplicationModule; import oracle.apps. tnd. framework. OAException; import oracte.apps. tnd. framework. webul OAConirollerImpl; import oracle.apps. lnc. framework.webui.OA DialogPage import oracle.apps.tind. framework webui.OAPageContext; import oracle.apps.fid. framework, webui.beans.OA WebE ProcessFormRequest(): Lf {pageContext .getParamet: tring Country = ¢ intext .gatParameter ("Count ry1") 2 Now ve want to initialize the query for our singl loyee #/ with all of its details CAApplicationNodule am = pageContext.getApplicationModule(webBean) ; able[] parameters = { Country] }; parameters) ; Seri am. invokeHethod{*"initbetaits ' AOS nies ame netone ae Here we check if it was-Go Button that was clicked. Then retrieve the value of country and pass the parameter and invoke the initDetails method in the AM AM Code: ‘ Import Statement: import oracle.apps.fnd.common.MessageToken; import oracle.apps. ind framework. OAException; pap re acle-apps find. framework server. ApplicationModulelmpl; ntryl In this code we will eieck the vo and see i ts nul, Then throw @ exception. Else we will invoke @ method initQuery in the VO Impl meth VO Code Import Staten ent impon oracte.apps. find. framework server Here we are setting the where clause and the variable to the country! variable and signing executing the query to get the values for display. ert Save your work and run the SwitcherPG, The screen should look like this." ‘ Enter US in the country and you will see the results like below i spots 18 Mead @catg ete 3 ate ais iF Rerlpa Ol Pas GalSecrh ad Satche Oe rl ORACLE - 2 mas eee | ew | US AD Dahan gy yore ba 10BS~ = sez 272z72e27t be c You can s¢e'that the delete is disabled where the city is not there and delete is enabled where city is not mull s 1 Extend VO in OA Framwork Please find an article that explains the steps to modify LOV [list of values] by extending [not customization] of OA Framework As you would already know, LOV"s in OA Framework are driven by View Obj In D2K, if we wish to modity a query o Us jects, Mp ‘an LOV, we could do so using But there were limitations in Cl Screen fields: ‘STOM.pil when it came to mapping new LOV columns to In this example, I will show you how something similar can be achieved without a sin customization, by leveraging Extensions to View Objects using Jdeveloper[OA Framework] Thet two variations to 1 a. Simply display a new field in 1 lis requirement:- . Do the a) above plus map the new LOV field to existing field on main screen, In this example, L will specify the steps for doi g botha+b Please note the followi This example below is a demonstration of steps, iaven’t implemented this spevific exany Hany Proxluction System, The idea isto get you started with doing extensions to view Ohje OA Framew Developer >. hope you have already read the article regarding extensions of EO, which was a rea life ‘Procurement example for rebuilding charge accounts. The article for extending EO tor iProt Account Generation can be accessed from this link 3. This specific demonstration was prepared on 11.5.10 CU2 instance Following steps will be followed to extend VO: 1. We create a new custom database view that ha LOV. Alternately you can embed your new SQL usage of view beneficial, hopefully touching OA F 2. Next we extend the VO, but prior to doing so, you need to FTP all relevant the files from extra columns which we wish to display in ment too in extended VO. However I find ixes, codefix can be delivered without ‘ause in the event of bi lework SIAVA_TOP/oracle/apps./. Include those directories in your Project Classpath in jDev. ‘You will also need to open the respective server.xml file to see those objects. 3. Optionally you may also decide to FIP the XML MDS documents. These are in $XX_TOP/mds 4, Extend the view object 5. Deploy the extended files to $JAVA_TOP/oracle/apps’.. 6. Import the substitution definition using jpx Note: The above 6 steps will add a new field to the VO, without actually customization of LOV vo 7. Personalize the LOV Region; by going to the LOV, and add a new region field using personalization[add new item]. Also using the personalization, define a mapping for the LOV. field, so that its value gets copied to the desired field in main page. Note: In order to do these personalization, you should have access to the MDS page, preferably in jdeveloper, so that you know exact names for those fields, Modify View as belov CREATE OR REPLACE VIEW XXICX_PA_PROJECTS_EXPEND_V AS SELECT ppev." PROJECT ID" "PROJECT. NUMBER" PROJECT_NAM PROJECT_DESCRIPTION” ppev."START_DATE" sppev."COMPLETION_DATE" ppev."PROJECT_TYPE_CLASS_CODE" :ppev."PROJECT. NUMBER SORT_ORDER” ppev."PROJECT_TYPE" sppev."CARRYING_OUT_ORGANIZATION_ID" ppev."PROJECT. CURRENCY COD! ppev."ALLOW_CROSS. CHARGE_FLAG" ppev."PROJECT. RATE. DATE ppev."PROJECT. RATE TYPE" ppev."PROJECT_OU" -ppev."EXPENDITURE_OU" -ppev."PROJFUNC_CURRENCY_CODE ppev."PROJFUNC_COST_RATE DAT ppev."PROJFUNC_COST_RATE TYPE’ Jlov.task_number AS xxiex_task_number slov.task_id AS xxicx task id -Xx_get_org_id_from_name(lov.org_name) AS xxiex_org_id slov.org_name-AS xxiex_org_name # | Jov.award_id AS xicx_award_id slov.award_number AS xxiex_award_number FROM. xx_por_project_lov_v lov, pat_projects_expend_y ppev ech EE i ON te inter ta eg 8 e WHERE lov,project id= -PPev.project id Identify the VO to be extended, and doubleclick to open it FTP’ed the necessary ol i 8B ora Sear ‘This is to ensure that you have Perey (5-9 ProjctPumLovvo. { 89 Project mcrgRestrctestovvo 1 Berojectsatowo. 3 eurchosingcmeyoryLietvaincatsvo, & BB Purchasinacategeryistvo * & reascntowo, + 5B ReceiettumberLevyo * Fb Rencatesoryvo ‘t 8 ReacortractatNemetewo 3} Reasupoierstevo. » Bl ReaSuootvo (ent Roy ethers Now, lets ct reale-a ni “VO. by right clicking on project = 6 crpcleoppsicx lov server 2 Atvocas. canal bs ci ane Sree Ti hateray ea ee | # Bascorsio a 31 Bassist ae NW Doma SS ecu * By Aceon Sat any / Buyerlov\ Nai View Uk © BB categunes New ops Pati, } Me feeantie 7 ope 1 Fon ropet 8 tt, abso Seer dk ‘ees Datsbave Obes. wearing the extension in Siandard namespace, howe ‘Stem You must do $0 in custom directory location Wy Give this new VO a name xxicxProjectPALovVOEX ‘Also specify that it extends oracle.apps.icx.lov.server.ProjectPALovVO Click next, and leave EO section blank here, as there is no Entity Object needed for this LOV. NOT : a So a i z Saat itty Obici tris View Cec alected Add the desired fields one by one. The existing columns from the VO being extended will already be listed h hs View object Wizard Step 3 oF 6 enter your Now, vou cat i ae saps columns in your query Here is the finalized list of wt rilly Obl Salect View Row Class to mplonent custom lic fer enleéstrn det vob fr tis yo ate Viewitow. Sect View Object Gass o over View Object manos Turin * | View orlect cles: xcuPjectAL ovVOE Raph eee aa Bese SE cisco aoa ate? eee yew fo Coss isobaawyctsoni 7 Generate accessors ted as below Here is your Auto generated code sveloper You can se € that the new VO class extends existing VO Class Now do substitutions in BC4J, right click on project cat pence te wensesenc palma ces Select substitutions. On left pane you select the VO being substituted and right hand pane the new VO Jipx file for you as below . Fi Atte Name=" jprName” Value="xxTexProjectLOVSubst.p" /> ‘ - ADF Business Components and select Entity OF Name - CholaEmpEo. Package - chola.cracle.apps.ind.schema.server Ddends - sundar.oracie.apps.ak.schema.server.EmployeeEO 2 ot ee ChoteClobal MA ‘Entity Object r aT) | | t=) | 2.Click Next.Click New from table ond shuttle ail laGlobal MEI 5 ‘Right click the project and click Projet Properties, Sn the source select the Employes£O from sundar.cracte, in the destination select the ‘CholaEmpEO in the chola.ora Package. 2pPs.ak.schema.server and icle.apps.fnd.schema.server CholaGiobal = Po, {0 Substitute the EO while run time.So.we subs with the CholaEmpeo. . In the Project Properties select Run/Debu the ideveloper its titute the EmployeecO Ig and clic joing 16 run from F we exit hejjava options. Go to the end ona give as, 'y type the following and click Ok holasTutorial. CholasTutorial 8 Save your work. dit.Since we are then contin Dibo.project: Project name ?-£dit the CholaEmpEOImp! java tie Have the work and n "¢ Greale page. You can notice en extor os below. 123. ICholaGlobat We will edit the CholaEmpEO.xml from backend, Save and close the Ideveloper. Add DefClass="oracle.apps.tnd framework server.OAEntityDeflmp!" > the following below RowClass="sundar.oracle.apps.ak.schema.server.CholaEmpEOImpr M CholaGlobal Name~"che agp" Extends" sundar. oracle. apps. ak. schema. server. Employeeeo” EWK_T8*_ EMPLOYEES’ F ZALer nane="tscadegen” value="true" /> cater Namen"“verg ten valuew"i0;1-3.41. 57° /> SXttrarray”Name=* pub] shevent "> AD wanes _codecent lage" value="Init Aces thee bracts tone 430 Cofumyane= "AT reZBUTEL Syper Java. Jang. Ste 1g Mmtyee= wakenand = | Sourwoes*varcha Open Jdeveloper and run the Search page. Click Create Employe and you will natice sedan sig areqganene ng te wes ne siesta c.- that the email address is defaultedto Chola@cholagls.com Employee Page ___CholaGiopa! — ee . 4d Start ate a OA Framework Extension of AM - Steps How To Written by Anil Rassi Friday, 12 January 200 Inthe Part of Apiction Module extension, we Sa the business case fir extetng an Application Moule, Herein the Part? of OA Framewark Training, fr Extorotene lI will display Steps with ser Go to www.google.com nshots. Step 1. Download the jad utility Step 2. In my case, | have /idev/myprojects included in my CLASSPATH. Hence t Apel the files to fdev/myprojects/oracle/apps/per directory wee witew BCAJ Package, by right clicking on Project. Fehe AM that we wish to extend resides in oracte.apps.perire.candidateSellService.server Hence, our package name will be oracle.apps.axper ire.candidateSelfService.ser’ er Ensure that XXPER is valid Application short name. select 'x' from fad_application_vl where application. short name XXPER' Click on Finish, ‘Step 4. We can see ‘that, for VisitorAM, the RETENTION_LEVEL is MANAGE_STATE. that our new AM will have the same property t00. Hence we will ensure step 5. Stef ajght click on the new BCA}, and create anew AN <> Right click Oh er tanewanasralesess Sos (ee tac ones abet eG Reick ded © VisitorAM ihe new AM will be xxire Name of t Lick browse and select the AM a: In the Extends field, ¢ 1s shown below EP WS oracle opps x porter ee 8 oracle eons cx por sober server ® oracle apps ice pax wt. server rece. apps cx pancho server 1 orecte opps cx schema server PPG orecte.pps por ame schema race apps pericaphcart server WB oracte sons per re can B Apphcentan B wecenceatePerscnalaccourtant ] MonexeCandiiateDeteisant © Vocenicyoislayam ‘> Keep on clicking next until you see Finish, Click on Finish. > You will notice that cl that class, public § { *Ss XxireVisitorAMInpl has heen created. Add the below meth ring ValidateLogin(String s, String s1) String patent ValidationResult’= super Vali (eLORiTSI); Af (DarentValidationResult.comparéTo("Y" 0) Your event here, or insert into s me bespoke table Felum parentValidationResult } Step 6. Ensure that the properties and the same, and also ensure that your meth is selected, iod being replaced Double click on the newly created AM xxireVisitorAM and ensure that RE TENTION_LEVEL is MANAGE STATE. Also, click on ClientMethods, and ensure that the method validate! ogin has been selected, raaaeseee2e OPT Step 7. Perform Substitution. Right click on the project, and select "Bait Business Components Project Chacon Substitution, and select xxlreVisitorAM on left hand side, and V1 JtorAM on right hand le. Click on Add button eri ‘coeeecton Options Base Classes - BE @ vistors Registered Rues 3 VistorsobBasketVO 5 VistorJobBasketvo BY VistorsobResutsVO VistorsstResutsVO fe-sial versivn="1.0" encoding—windows ‘ IboProjext Name="axireVisitorAM.jpr” SeparateXMLFiles="truc" PackageName=""> View Object. Name - EmployeeSummaryExtVO Package - chol; igeXt.oracle.apps.fnd.extend, lemployee.server Extends - chol acle-spps.fndLemployee.server.EmployecSum, Click on Browse and select the chola.oracte. apps. tnd emaployee.server, EmployeeSummaryVO.Click Ok extending the current VO w «need to choose the VO from the extends a7 RCO RRR ‘Since we have CholaGloba property 2.Select the Salary atuibute message dialog fom Employecko askin ek tl it tothe right side: There will bea you want to override-Click Ok Right now the salary attribute will be a sree stein Sh paper Select salary and shuttle it to the right side one. 3.In the SQL Statement you need to include EmployeeEO. Salary before the from clquse to include the attribute, z 4. Deselect the First option in creating the java files and select the second one.Click Next and Finish. fl 2 CeO GRR TSS at Ingen custo oot dat Ut vl vation in won row ass: Sat ‘ther das pnarationto over bare dc tho. CholaGlobai If you had added only chola folder to jdev then you wont be able to see the cholaext folder. So right click on the project > Add to project Content.Setect the included tab.Click Add and then choose the cholaext and elick Ok. For making the Salary variable Persig ent save Your work and cf Where you have installed ideveloper, \nyprojects\cholaext\ 08° idev.Ge to the fle systemn rsclelapps\ithextendhemployeceerver sployeeSumamryExtVO xm ind for the View Attribute Salary. We need to set sonie Hroperty for salary Replace the v ales under the salary attribute to; ion for the VOR; Components -> Subs ‘ght click on your project, Oye. server. Em ng lONS. From the available PloyeeSummaryVo and in mployeeSumm, roject select the he substitute select ACYEXtVo, | | ko hols ered. opp fe. dom crede.apps.fréemployes CholaGlobal ‘We are going to substitute the VO while run time.So we substitute the Employe with the EmployeeSummaryExtVO. ummaryVO 6.Select Rur/Debug and click Edit.Since we are going to run from the jdeveloper itself we edit the java options. Go to the end and give a space and then continuosly type the following and click Ok -Djbo.project=CholasTutorial, CholasT orial is the project name. mam | CholaGlobal. | Save Your work and Run the page, Through personalization we are going to include the salary field. tO ROCHE a RB t After you run the page elick on Personalize page on top right hand comer to ‘include the siilary attribute tothe page. Click on Complete View.To create & new item go to the resultsTable and Click on the create item icon. Set the following properties for the item: Item Style - Message Styled Text ID- Salary DataType-NUMBER Prompt - Salary View Attribute - Salary View Instance - EmployeeSummaryVOL Click Apply jauve ihe work and Run the EmpSearch Page.Search for an employee and you can see that Salary | Empinyee cholo _ 7 | bers Searels Rumber [Employee tame Manager Position Delete Update Salary emi Controller Extension in OA Framework ‘ ity neo : "7 P : js oi age and extend the processFormRequest Method. | am ‘going to personalize the page and add the new controller for the pagelayout region, Thope everyone would have done the Hello World “You can refer the below link for Hello Wor ld exe Create a new Jay Clas Name - Extended Package - chola.oracle.apps.fnd.extvebui ! Extends - chola.oracle.apps.fad.ext.wvebui.HelloCO Click Ok. eR C0551 . Java Class 1) Etter the deta of your new i Se ‘ y eel Cebit) arse 1; | (2 enerate Cetaut Construitor Ccenerst tot techod = oe = | 3.Paste the following code Public void processFormRequest(OAPageConte pageContext, OAWebBean webBean) Super-processFormRequest(pageContext, webBeat) if (pageContext.getParameter("Go") != null) PageContest.petParameter("HelloName") sage = "Hello Extended, " + userContent +"! throw new OAException(messa e, OAException. INFORMATION); Hete what we are doing is alter clicking tlie Go button we will display "Hello Extended Value instead of Hello, ‘Value’ f !.Save your work and run the Hello World page 3.Now we will personalize the page and cl ge the controlter to the new extended controller 6.Aler running the page click Personalize 7-Click Complex view and click Personalize in the Pagel ayoutRN. A ERoy tay ec a Ni S Simple view CO compits View ‘GTP tn single view erode, some tems or agi hay nt > Personalization capabilties over al. ieteandreere, he PPR Saar adem Brean | colons a . et & Sore — = @ | corporate trending mage: (eoporateerardngtmage) ves S:In the Sitetevel of the Controller Class enter the value chola.oracle.apps.fnd.ext.webui.exteded CholaGlobal ‘Bieber eins 9-Enter chola in the inputbox and elick Go, AAD meg ets OA Framework Extending Controller He objective of this training lessbn is to quickly show you ho Framework, to Extend a Controtter in OA is article will be the ig 1.5.10 CU2, nk. with HelloWorld OA Framework Example. This demonstration ‘amy other version of OA Framework How will we demo: We will crea b. Usin nstrate this? «Text Field named HelloWortdk cessRequest of the Controlley HelloWorldField ©. Next we will extend HelloWorldField Note: ¥ ield in "OA. Framework Page ult “Hello not Extended Anil” ty We will deta the controller, atid assi ' "Hello Extended Anil” to the fel SHINE 0e default Values in field in this manner, when the field belongs toa Vo Assumptions: You have already implemented the Oracle delivered HelloWorld Ex: PS area repeat of hello version of helloWortd, Or this exercise ample, Follow the below Steps ( Some ste But this demo will use a cut Estimated time:- 15minutes orld tutorial from Oracte), down 14), * «Step 1. Create a New OA Workspace and anew OA Project and name it anything you desire. Package name can be oracle-apps.akchello 4 forecte spps keto 8 ‘Also, attach dbc file, and # apps usemame/password that has respansibility FWK_TBX_TUTORIAL Step 2. Addanew "OA Page" named stextExtend COPage" to the Project in package oracle. apps.ak hellc.webui ‘Make sure its property AM Definition is. oracle.apps.fnd.framework-server. OAApplicationModule ‘Change its i to textExtendCOPage and ensure of type pageLayout Aloe sesign it any window tile and ttle in its properties Step 3. Add a region of type messageComponentLayout, Name it MainRNEXt Region Style will be messageComponent| yout step 4. Add field HelloNameField to MainRNE&t II be of type messageTextinput. Give it prong tof "TestPrompt” infant few Controller to the region. fide i Step § Rightelick on MainRNExt to ald Make sure its package is oracle.apps.ak hello. ebui nirolle ct (Di arent {ig HetotlaaFiels 1 teggetayaut Cont E - Open the controller java file, which is MyTestCO Java -s as highlighted ework,webui.beans.message OAMES step Make the following chan: TextInputBean, import oracle.apps. fi Context, OAWebBean webBean) public vid processRequest(OAPageContent Ps caper processRequest(pageContext, webBiean) OaMessageTextInputBean fieldHelloName = (OAMessageTextInputBean)webBea na Childecursive("HelloNameField"); fluttelloNume.setText(pageContext,"Hello rot Extended Anil"); hile and Run the XML Page, the result will be as below ‘testPrompt [Fillo not Extended Ani 1a" Now, the extension of OA Framework Controller Extension Step 1. Rightelick on Project and create new Name of the Class: extendedHelloco Package : oracle.apps.ak.exiendCO Extends: oracle.apps,ak. hello.webui.MyTestCo ¢ om = + Baers | 22k fp. ak helo webs Testo j Optbnol Atubites P Pid 1” Riteiote bani Sansmcteg [1 Snerte Nain ethos Extension Step 2. Add the highlighted lines 0 extendedHelloCO java Package oracle.apps.ak.extendCO, i peegTacle-apps.ak:hello.webui MyrestCO; linport OFaele aps fide mmon. Versioilngs, import oracle apps. tind an Work.webui.OAControllerinpl: import oraole.anps. thd. framework webu OAPageContext import OFBele-Apps.fnd.frame\sorkwebuiibeans oa ‘cbBean; import oes eaPPsd. framework webui.beane mc ge OAMessageTextnputBean; import otacle.apps.id tramework.webui beans OAlmageBean ; HHello¢ public el r ext r Public void processRequesi(OAp; eeComtext payeContext, OAWebBean webBean) On ccessRequest(pageContext, webBeany OAMessageTextinputBean fleldHelloNanc (OAMessageTextInpuiBean) webBedn, nic hildRecursive(" FieldHelloName setText(paxeContext "ete Extended Anil") lelloNameFieta, Extension Step 3. Ensure that Freep zalion is tumed on for your usemame This can be done by setting profile Personalize Self-Service Dein" to Yes Run the XML page, you will still see "Hello Not Extended Anil" Click on Personalize Page lnk on righ ndside top corner Si2et "Complete View" and "Expand All" Option in personalization page, Click personalize icon for "Message Component Layout: (MainRNExt)" Set the cbatroller to " oracle.apps.ak-extendCO extendedHlelloCO" at Site level, oracle. apps. ak hello, webui MyTestCO ftendGO extendedHTeloG Click on Apply, and then click onRetum to Application. Extension Step 4. Rebuild project in jDev and run page again, ‘You will now find that your extension has taken effect. TestPrompt [Hello Extended Ani ‘This completes the exercise for the extension of a Controller in OA Framework [OAF}. How to create a Link in OAF stow to create a Link in OAF How fo define a link in OA Framework.this is one of the famous interview question, Answer to that is as below. A "Return to... link" isa special named componest of the page layout region, To create one: RetumNavigation, 2. Set the following properties: Name-teturnNay . Text -Return to page Destination URI - OAlsp2page~/race'sps/dem/onployetnebuilEmpSearchPGEerdsinAM The Page is just an example page. It can be ‘iven any value that you want to set ‘To add a retum link programmatically in the Controller ‘add the following to the processRequest method. }-ProcessRequest (OnPageContext pagecontext, OAWebBean webBean) rocessRequest (pageContex Fo display'a messageStyiedText item asa fink just set the following properties Destination URI - Page URI ESS Class - Oral.inkText It you want to display a simple fink without 4 Prompt. add a link item to your page and set its Destination URI property. You can set its Text property sree | sts | “Diste Server Sue For example you want to display some text and then link that to a page'then you can create a link and set the Destination URI to a page and then set the Prompt 1 you want a lnk to send an email when selected, for any component that can be configured as a link, simply set the destination property to mailto:>. 4d For example, the Destination URI property for the "Manager" field is defined as mailto; {@ManagerEmail}. . Deploy OA Fr: How to Deploy OA framework in the Instance Deployment of OA framework consists of 5 steps, . ¢.Class files and VO/EO/AM xml files g PG/RN xml ion Let's look at these one by one. Deploying Class files The files such as + Controllers *CO.class pplication modules *AMLc! + View Objects *VOImpl.clas + Entity objects *EO.xml, *EOlmpl java ass *VORowlmpl.class, *VO.xml should be deployed in the $JAVA_TOP/ you Oracle application import page files from and to the database Deploy the files to the Instance Java oracle,jrad,tools.xml.importer.XMLImporter /home! prasanna/pages! Ser name> -password «ata base password> -dbconnection "(description (community = tep.world\(protocol = tep)(host = ) (port usemame )))(connect_data = (sid ~ ))) This command will import the SetupPG.xma file into the databy Extracting from instance in the developement instance and you want to deploy If you have done your personalization Fre zations into the production instance, then you can extract the pe XMLExporier command from the developement instance and Import the are ay you did for PG.xml files, ization sit :d xml file into the production instance in the same java oracle,jrad,tools.xml,exporter.XMLExporter orsele-apps/ap setup webui/eustomizations/site/0/SetupPG -rootdlir } (port port id™)eonnect_data = (sid = )p) The above command will export the SetupPG from the data Base to your file system at the destination path as XML file (SetupPG xml) f any Deploying jpr files for Substitution Ifyou have extended EO, VO or AM and created substitutions in your project. Then you have to deploy your px file into th ava oracle jrad tools.xml.importer.JPXImporter $ AP. TOP/xxx/Setup jpx -usemame -password -dbconnection "(description = (address _list= iress = (communit world) = tep)(host = (port = ))\(connect_data = (sid = )))" i . ts SEIS ROIS RERETE aaRRe? z weee nae In case your page is referred in existing pages of Oracle applications you can skip this step. But iff you want to access the page as a new Function the follow Create Function as 1D: XX_SETUP Name: SETUP tion type(H SSW Joracle/apps/ap/XXX/SetupPG¶meter|=xx8eparameter|=xx Attach the function to aM Aitach the menu toa Respoi Restart the server | Atter deployement you cannot sce the page immediately on the server instance. This is because your Pages and class files would-be cached in the middie tier. So you have to bounce the apache. $COMMON_TOP/admin/seripts/adapectl.sh stop SCOMMON TOP/admin/scripts/adapectlsh start Afler this process, clear the cache fivan the functional administiator responsibility and this step is optional, Some times we may need to restart the whole middle tier to see the depolyed pa instance, To Restart the instance use following command Stop the instance ed SINST_TOP/admins Start the instance adstrtal.sh apy Deployment of OA Framework Tutotials in APPS Environment ‘The steps in brief are a” ‘ 5 Development of the JSP form in local mechine | Transferring the related source coJelfies to the Oracle APPS environment. 2 Importing the new directory structuse/path of the pagerfomn in the MIDS repository o Registration of the form in the Oracle Apps environment Development in Localhost: loped the Person iT pages in Myprojects of IDevijdevbin folder. GHEry Ke (er Bioowreiee I've kept my xml pages in webui and EOP, VO and AM in server folder of the . persondetail folder. ‘On project compilation the class files along with xml files are yenerated in Myclasses of 1 IDevijdevbin folder, ‘The Folder Structure for xml pages and respective Controllers are as below C:\MDeveloper_Setup\jdevbin\jdevimyclassestoracle\apps\ak\persondetail\webui Similarly, the server folder structure is as belbw ‘C:\MDeveloper_Setup \jdevbin\jdevimyclasses\oraclelapps\ak\persondetailserver c srs 5 Nata Sift poodle gy gee = Hae tease aac i Syemest: | . fa cLiansferring ToJava “up, Through FileZilla we can easily move our files into Java_top folder So I first transferred the Petsondetal folder in ASCII Transfer Type mode in the path : /kolvisO/prj03/prj03comnv/java/oracle/apps/ak/ pri0S being my Apps server path, st dag and dropped.the pecondei folder fom local nto App Java top path,” PRRETRECRT Sir Qua Set ‘ SIP (Ves aaah sie Feu Ba sai 1 eae ——$ ai Tea Bierce cy 2m oF | Berens a aan & Path: AkoWis01/pej03/pr)03coma/javaloraci ‘APPVak/persondetail’server/ . Bech rescravtne ee pofesm (ape 1857 cuore ise ner a7 eet 1597 orcs 0 ter isa se ie ner Path : /kolvisOU/prj03/prj03commn/javaloracle/app: Tia Theatre aT = — aie AE Da HRS see »| Borst ce Class anf = Eitwrcretco ay 220 wsrencar 7A 0 if + miint remrenmiessn me. wit Smnants flat 28 HLD. Gy ak/persondetailwebuil & oy a, a on, So now we are done with transfers. Next we need to change the mode of the class fites 19 777. Login to Telnet and change the mode through CHMOD 777 command IMPORTANT sneresrere. ea is relic dew STH eg etc ieee poo erg eat lett eT eee ra Se ptiacae ieee i 3 Eee) re E mport senipts for the PG and LOVRn files The import command ig mport myprojects\ -dbvonnec DRESS" (PROTOCOL =tep)(HOST=

You might also like