<-----Google Analytics Code Start----> <-----Google Analytics Code Close---->
Skip to content

Green

color

Default screen resolution  Wide screen resolution  Increase font size  Decrease font size  Default font size  Skip to content Default color Pink color Green color Green color
Home
This website has now moved to http://apps2fusion.com





MDS in OA Framework -What exactly it is? | Print |  E-mail
Written by Anil Passi   
Sunday, 25 March 2007
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 jDeveloper, when I build a page and its regions, it looks I am building an XML file. Is page definition stored as XML file in OA Framework?
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

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 web page is rendered by OA Framework, but what happens next?
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.



What parameters are passed to method processRequest of the controller?
OAPageContext
OAWebBean



What are the usages of
OAPageContext parameters?
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



What are the usages of parameter
OAWebBean?
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");
Note: 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.



So the page gets rendered/display after the processRequest finishes its execution?
Correct, the processRequest finishes and then the page renders.



Does this mean I can programatically create new bean components  and render those on a page at runtime using controller?
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.
Note: 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 have nested regions in page, and each region is attached to its own controller. Will processRequest in each controller fire when page gets rendered?

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 MDS page definition cached?
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.



When I do personalization, where is the personalization metadata stored?
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



Are personalizations in MDS cached too? and need mid-tier bounce?
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.


Where are the MDS files kept on File System?
Although MDS for runtime is loaded into the Database, but the MDS definitions can also be found by navigating to $MODULE_TOP/mds.

Sometimes the OA Framework form function reference AK Region. Is AK still being used?
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
regionMap.xml read from the file server when a form function is invoked?
Not really, its loaded using xmlImporter just like any other OA Page.


How to I identify those modules for  which migration from AK to OA Framework took place?
You will notice that all those applications that have profile option "FND: Migrated To JRAD" set to Yes [at application level]




Comments (23)add
...
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
...
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,
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.. smilies/smiley.gif
...
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".

select fnd_message.get_string('POS', 'POS_VPO_LAST_25_PO') DISPLAYED_FIELD, 1 INTERNAL_VALUE from dual
union
select fnd_message.get_string('POS', 'POS_VPO_ALL_PO') DISPLAYED_FIELD, 2 INTERNAL_VALUE from dual
union
select fnd_message.get_string('POS', 'POS_VPO_PO_TO_ACK') DISPLAYED_FIELD, 3 INTERNAL_VALUE from dual
union
select fnd_message.get_string('POS', 'POS_VPO_SUP_CHANGE') DISPLAYED_FIELD, 5 INTERNAL_VALUE from dual
order by internal_value


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..
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:50smilies/cool.gif
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.

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.

busy