Vous êtes sur la page 1sur 8

9/4/12

Apps - MDS in OA Framework -What exactly it is?

Home

Technical Articles

Training Articles

Receive Email for New Articles

Contributors

Apps Book

MAIN MENU
Home Technical Articles Training Articles Receive Email for New Articles Contributors Apps Book T his website has now mov ed to

http://apps2fusion.com

RELATED ITEMS

Our OA Framework, BPEL Development & Apps DBA Trainings from USD 299 only [on weekends] . Click here for details.
Also see here fully verifiable feedbacks/testimonials

MDS in OA Framework -What exactly it is?


Written by Anil Passi Sunday, 25 Marc h 2007

| Print |

Email

We know it means MetaData Service. We also know that it has something to do with web page displayed in OA Framework. Lets try to understand the basics of MDS. Meta:- In technical world, meta work symbolizes dictionary. Think of a web page broken into small units which are fields, buttons, list boxes. These small individual units[fields, buttons etc] are stored in a dictionary, in the database. These units when combined together, they become a webpage that gets rendered on the browser. Data:- Those meta pieces are not stored as binary files, but as data in tables. Those tables begin with jdr, for example JDR_ATTRIBUTES, JDR_ATTRIBUTES_TRANS, JDR_COMPONENTS & JDR_PATHS. The definition and relationship of each field/region/component is stored in these JDR tables. OA framework reads that data when you request a page. The page structure is then built based on MetaData. Service:- Meta Data is available as a service(plain service not webservice). The data is there in JDR tables, but all such data has to be co-related, all fields, regions,buttons etc have to be clubbed into a meaningful manner to make a web page. You can say that MDS provides service to store & return page definitions. MDS collates those definitions in components/fields in a meaningful manner to build a page.

In jD e v e lo p e r, whe n I b uild a p a g e a nd its re g io ns , it lo o k s I a m b uild ing a n XML file . Is p a g e d e finitio n s to re d a s XML file in OA Fra me wo rk ? The storage page definition happens in JDR tables, where page components are not stored as XML. But MDS provides API's to build XML definition from the data in JDR tables. Hence there are two provisions 1. When you design a page, you store "page definiton" in XML format on your pc. When deploying to your system/server, you load this XML file into JDR tables by using command xmlimporter(see this link for example of XML Importer). 2 . When a user runs the page, OA Framework does the following steps:Step a. OA Fwk Requests page definition/structure from (MDS) --note its cached too Step b. MDS engine returns a xml file to OA Framework Step c. Each node/component in XML(of Step b) is translated into a web bean object. Let's say your page has Region-Main field1 Regionchild Button

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

In this case, four web beans objects will be instantiated by OA Framework. A bean object is nothing but an object representation

1/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


In this case, four web beans objects will be instantiated by OA Framework. A bean object is nothing but an object representation components like fields, buttons, regions etc . A bean object also has methods like setRendered, setRequired, getRequired etc. Step d. Not only we have beans created for that page, those beans are nested as well, in exactly the same sequence of components within Region-Main. Hence parent child relationship is retained. Step e. After rendering the page,OA Framework then calls the controller class for that MDS page. The page is displayed to user after processRequest in Controller is completed.

Fine the we b p a g e is re nd e re d b y OA Fra me wo rk , b ut wha t ha p p e ns ne xt? Before we answer the question, lets take a step backwards. Lets recollect how we defined that page. In OA Framework, when you define a page, there are two key things that you do:1. Specify/define a controller class for that page. 2. Specify/define an application module attached to that page. Keeping that in mind, we can now answer this question. When the page gets rendered/displayed on browser, then following things happen A. Framework builds a web bean hierarchy [based on XML from MDS] to represent the structure of the page in memory B. An object instance of ApplicationModule is created. You may recollect that application module manages the database state of the page. C. A method named processRequest in controller class is executed.

W ha t p a ra me te rs a re p a s s e d to me tho d p ro c e s s R e q ue s t o f the c o ntro lle r? OAPageContext OAWebBean

W ha t a re the us a g e s o f OA P a g e Co nte xt p a ra me te rs ? The main usages are: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 oapagecontext.sendRedirect(snewpage) 3. To get a handle to application module(remember we attached AM to page) oapagecontext.getRootApplicationModule() 4. Write debug messages, using oapagecontext.writeDiagnostics 5. Get message text from FND Message dictionary, using oapagecontext.getMessage

W ha t a re the us a g e s o f p a ra me te r OA W e b B e a n? 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. Once you have a handle to that bean(say field bean or button bean), you can then invoke methods like setRendered etc to change the behaviour of page at runtime. Some examples are 1. OAWebBean LastName = oawebbean.findIndexedChildRecursive("personLastName"); N o te : In this example, our page must have just one field whose name is personLastName 2. Get a handle to region OAStackLayoutBean oastacklayoutbean = (OAStackLayoutBean)oawebbean.findIndexedChildRecursive("stackRegionName"); 3. As seen above, the generic bean object returned by findIndexedChildRecursive can be typcasted to corresponding bean object.

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

2/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?

S o the p a g e g e ts re nd e re d / d is p la y a fte r the p ro c e s s R e q ue s t finis he s its e xe c utio n? Correct, the processRequest finishes and then the page renders.

D o e s this me a n I c a n p ro g ra ma tic a lly c re a te ne w b e a n c o mp o ne nts a nd re nd e r tho s e o n a p a g e a t runtime us ing c o ntro lle r? Absolutely, you can literally add any component to the page at runtime. For example, using oawebbean.addIndexedChild(oawebbean1); However but I suggest you shouldn't follow this approach. If you wish to display fields conditionally, then you can include those into MDS, and turn their rendering off in controller or use SPEL. N o te : you can also create any additional bean for a page using "Create/Add New Item" feature of personalization. This is the prefered approach when adding display components to any standard Oracle OA Framework page.

I ha v e ne s te d re g io ns in p a g e , a nd e a c h re g io n is a tta c he d to its o wn c o ntro lle r. W ill p ro c e s s R e q ue s t in e a c h c o ntro lle r fire whe n p a g e g e ts re nd e re d ? Absolutely, the controllers of inner regions fire first and then outer/higher level regions. This is a very common practice, when you include shared regions into your main page, whereby each shared region may have its own controller.

Is the MD S p a g e d e finitio n c a c he d ? Yes, hence any changes that you make to MDS in database, you then need to bounce the mid-tier. This is not applicable if you are testing the pages from jDev itself. jDev will first look at local XML files[local MDS]. If the page file is not found on your local PC, then Fwk gets the page definition from MDS in database.

W he n I d o p e rs o na liza tio n, whe re is the p e rs o na liza tio n me ta d a ta s to re d ? This too is stored in the database in MDS, but the path of that document is prefixed by customizations. For example if you personalize oracle/apps/per/irc/candidateSearch/webui/empSearchPG at site level, then its corresponding customized document will be in oracle/apps/per/irc/candidateSearch/webui/customizations/site/0/empSearchPG

A re p e rs o na liza tio ns in MD S c a c he d to o ? a nd ne e d mid -tie r b o unc e ? Not really, the MDS personalization layer are applied at runtime to the page, and hence mid-tier bounce is not required when you modify personalizations.

W he re a re the MD S file s k e p t o n File S y s te m? Although MDS for runtime is loaded into the Database, but the MDS definitions can also be found by navigating to $MODULE_TOP/mds. S o me time s the OA Fra me wo rk fo rm func tio n re fe re nc e A K R e g io n. Is A K s till b e ing us e d ? AK is the MDS of old methodology, whereby regions and items were stored in tables namely AK_REGIONS and AK_REGION_ITEMS. The old pages[jsp or xml or pl/sql based] used to reference the AK regions. Hence the old form function definitions are pointing to AK Region names. During migration from AK to OA Framework, each such region was mapped with OA Framework page. Those mappings are stored in $MODULE_TOP/mds/regionMap.xml

Is re g io nMa p .xml re a d fro m the file s e rv e r whe n a fo rm func tio n is inv o k e d ? Not really, its loaded using xmlImporter just like any other OA Page.

H o w to I id e ntify tho s e mo d ule s fo r whic h mig ra tio n fro m A K to OA Fra me wo rk to o k p la c e ? You will notice that all those applications that have profile option "FND: Migrated To JRAD" set to Yes [at application level]

Comments (23)
Subscribe to this comment's feed

...

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

written by Shreekar , March 25, 2007

3/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


written by Shreekar , March 25, 2007 Hi Anil, Thank you for the time and effort you are putting into this to share your knowledge with others like me.. I have a question for you.. If i need to customize or extend a standard page that cannot be achived via personalization, how do i go about it.. What all the files that i need to export to my pc to use with OA JDeveloper.. I will really appreciate if you can throw some light on this.. Thanks for your help, Shreekar

... written by Kiran , March 26, 2007 Thanks alot Anil, This is a pretty good article on how OA Framework works. Once again Thanks for providing such valuable information to all... K

... written by Stalin , April 05, 2007 Hi Anil, I have seen your name in many forums and i have seen your white paper in many places. Just hats off to your serivce to this oracle world. I dont have any words to say about this white paper. It is usefull in time. I would like to add into your group...please advise me Rgs Stalin G

... written by souvik mukherjee , April 20, 2007 HI Anil Thanks for the wonderful work. I am working on OAf and I am new to it. I have to customize the search pages of iSupplier. I have to add extra search fields and naturally display them as well. I am not sure as to how I can get to the code which gets called once the user enters the GO button. I have been able to change the front end(making some fields mandatory/ removing some fields etc) through personalization options but otherwise as regards the backend changes I am cluless. Kindly advise as to how to download the pages, where are they stored. Would be indebted if you could also provide me links regarding training for OAF and customizations too. Regards Souvik

... written by souvik mukherjee , April 22, 2007 Hi Anil Thanks for the quick response! I have the following detials for you. The page I am trying to customize is the Quick search page in Shipment notices page. I am trying to add more search criteria based on the client requirement. The details are as follows: Quick search controller: PosAsnQuickSearchCO Controller: PosAsnViewContainerCO Aplication Mod: PosViewAsnAM page:- / oracle/ apps/ pos/ asn/ webui/ PosAsnViewPG 115.33.11510.3 One suggestion: Kindly enable an option to upload attachments which will help all to quickly identify the area and understand the problem and solution too. Anil Could you go through another question which I had requested clarification for? Seems like iSupplier allows for changing/ modifying the PO even after I have created the ASN for the same. Is there any option by which I(the supplier to whom the order is placed)can simply accept the order without any changes to it? Looking forward to your suggestion Regards Souvik

... written by souvik mukherjee , April 24, 2007 HI anil Thanks a tonne for the help!! Will let you know how I did it! Regards Souvik

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

...

4/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


... written by Shreekar V , April 29, 2007 Hi Anil, Thank you for the time and effort you are putting into this. I have a requirement in to make a Advance product Catalog Application to make a Message Lov Input required only when the user chose a particular radio button in the radio group . There are 2 radio buttons.. one for catalog category and the other one for copy from existing item.The Function name is create engineering items under Development Manager Responsibility. The change I want to make is when the user choose to create a new item by selecting the radio button for item catalog category then Message Lov Input for catalog category should become a required value.. It should not be required when the user choose to create the item from an existing item by selecting the copy from existing item radio button BTW this regoin is shared and it is being used in create production items also.. Can we copy the seeded function and personalize only when we access the page via custom function?? Is this possible via personalization or we need to extend the page.. Thanks for your help in Advance, Shreekar

... written by Sai , June 21, 2007 Hi Anil, I have one question regarding the pages importing into MDS directory. When we are importing the pages into MDS directory by using the import command, it will store into the server. Is there any database table to store the information of pages? Can you please let me know if you have any information? Thanks and Regards, Sai

... written by Anil Passi , June 21, 2007 Hi Sai The tables are for internal purposes only, however I have listed those for your reference. JDR_ATTRIBUTES JDR_ATTRIBUTES_TRANS JDR_COMPONENTS JDR_PATHS Thanks Anil

... written by Mohammed Anas OSmani , August 16, 2007 Hi Anil, Can you help me out with an issue. We have customised iSupplier in 11.5.8 to create AK regions. Now we are upgrading to 11.5.10, in which these pages are in OAF. So how to migrate our AK regions to OAF. Or Shall we create new regions altogether in OAF. Regards, Mohammed

... written by Anil Passi , August 19, 2007 Hi Mohammed, All your regions in iSupplier Application will be migrated to OAF. The profile option Migrated to JRAD will be set to Yes for all such applications where migration from AK to OAF has happened. However, for your custom AK Regions, you will have to do this migration yourself. For this you can create new regions using OA Fwk. Thanks,

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

5/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


Anil Passi

... written by Jerry , November 29, 2007 Isupplier, 11.5.10 the Orders screen has 4 LOVs (Last 25 Purchase Orders, All Purchase Orders, Purchase Orders to Acknowledge, etc.) and the default screen returned is the Last 25 Purchase Orders. How can we change this to Purchse Orders to Acknowledge? It sounds simple, but we've exhausted a lot of avenues, any help would be GREATLY appreciated..

... written by Anil Passi , November 29, 2007 Hi Jerry, Do you know why "Last 25 Purchase Orders" is being defaulted? What is the name of OA Page in question? Cheers Anil

... written by Jerry , November 30, 2007 Not sure why that option is the default, although I suspect it's hard coded. The OA Page is PosVpoMainPG.xml. In 11.5.9, we simply changed the defaultvalue clause in the oa:messageChoice line for pickListViewDef="oracle.apps.pos.isp.server.ViewPoQuickSearchVO".

... written by Anil Passi , November 30, 2007 Jerry VO has the query below. If you run this on Sql*Plus next, then "Last 25 Purchase Orders" is returned on top. Please extend that VO to alter "Order By". selec t fnd_message.get_string('POS', 'POS_VPO_LAST _25_PO') DISPLAYED_FIELD, 1 INT ERNAL_VALUE from dual union selec t fnd_message.get_string('POS', 'POS_VPO_ALL_PO') DISPLAYED_FIELD, 2 INT ERNAL_VALUE from dual union selec t fnd_message.get_string('POS', 'POS_VPO_PO_T O_ACK') DISPLAYED_FIELD, 3 INT ERNAL_VALUE from dual union selec t fnd_message.get_string('POS', 'POS_VPO_SUP_CHANGE') DISPLAYED_FIELD, 5 INT ERNAL_VALUE from dual order by internal_v alue

Thanks, Anil Passi

Regd:OA Framework written by Sandra , December 05, 2007 Hi Anil, Am new to OA framework. Tired a sample application and while running the page,it gives me error as:"worng number or type of argum,ents in call to CREATESESSION". why do i get this error? Sandra

... written by Anil Passi , December 05, 2007 Please check the below 1. Is your connection to DB from jDev working? 2. Is dbc file correct? 3. Is username/ password/ resp application/ resp key combination correct in project runtime property? Please paste the full stack error, as that helps to debug Thanks, Anil Passi

... written by Sandra , December 06, 2007 Hi Anil, Thanks for the quick response..

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

6/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


I checked for the same and everything is correct. Please find the detailed error that i have placed below. Exception Details. oracle.apps.fnd.framework.OAException: Application: FND, Message Name: SQL_PLSQL_ERROR. Tokens: ROUTINE = createSession(int, String) (userid=6','7E2A6EFA70D04E6ABBADD2961F3EB95A3126 5525521150748532173836283268'); REASON = java.sql.SQLException: ORA-06550: 371 1 9EH/ 49 : PLS-00306: wrong number or types of arguments in call to 'CREATESESSION' ORA-06550: 371 1 9EH/ 43 : PL/ SQL: Statement ignored ; ERRNO = 6550; at oracle.apps.fnd.framework.server.OAExceptionUtils.processAOLJErrorStack(OAExceptionUtils.java:974) at oracle.apps.fnd.framework.OACommonUtils.processAOLJErrorStack(OACommonUtils.java:866) at oracle.apps.fnd.framework.webui.OAPageBean.validateUser(OAPageBean.java:4709) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:703) at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:50 at oracle.apps.fnd.framework.webui.OAPageBean.preparePage(OAPageBean.java:429) at _OA._jspService(OA.jsp:34) at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:56) at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:317) at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:465) at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:379) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:727) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:306) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:767) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:259) at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:106) at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExecutor.java:803) at java.lang.Thread.run(Thread.java:534) ## Detail 0 ## oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: ORA-06550: 371 1 9EH/ 49 : PLS-00306: wrong number or types of arguments in call to 'CREATESESSION' ORA-06550: 371 1 9EH/ 43 : PL/ SQL: Statement ignored ;

Reg:Error written by Sandra , December 08, 2007 Hi Anil, can you just help me out in solving d problem? waiting for ur response. Thanks, Sandra

... written by Sandra , December 09, 2007 Hi Anil, Thanks for the excellent tutorial.got fixed with the issue of"CREATE SESSION".Problem was with the setting of"Embedded OC4j" properties. Thanks, Sandra

... written by Mohammed Abd El Wahab , December 11, 2007 Thank you so much for this pretty explanation, you make things clear for me. Thanks Mohammed Abd El Wahab

... written by karan777 , January 17, 2008 Anil, Thanks for great site.Thanks for your time.

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

7/8

9/4/12

Apps - MDS in OA Framework -What exactly it is?


Thanks for great site.Thanks for your time. I have a question, I am tryed to create a page where user enters data and I need to take that data and pupolate a PDF i.e fill the blanks in pdf. what all i need ,and if you can how to do it. Thanks karan

... written by Vishwanath S , February 14, 2008 Thank you very much for the article Anil. This was very useful.

You must be logged in to a comment. Please register if you do not have an account yet.

Live Cricket Match Live match, scores, highlights iStream: Indian News, TV, Movies Pl Sql PS/SQL Developer! Order now or download the trial version.

iStream.com/cricket

Cricket Set and kit bags Get a 10% discount TODAY Cash-on-Delivery(for India only) www.kyazoonga.com/cricket_set
www.allroundautomations.com www.Shiksha.com/Oracle-Courses

Oracle Courses & Colleges Find Top Oracle Institutes in India Get Info on Courses,Admission,Fees

Home

Contact Us

COPYRIGHT : This work is licensed under a Creativ e Commons Attribution-NonCommercial 2.5 License. The content on this site is copyright protected.

oracle.anilpassi.com/mds-in-oa-framework-what-exactly-it-is.html

8/8

Vous aimerez peut-être aussi