Login
Register

Home

Trainings

Fusion Blog

EBS Blog

Authors

CONTACT US

OA Framework - All Articles
  • Register

Oracle Gold Partners, our very popular training packages, training schedule is listed here
Designed by Five Star Rated Oracle Press Authors & Oracle ACE's.

webinar new

Search Courses

MDS in OA Framework -What exactly it is?

 

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]





Anil Passi

Comments   

0 #1 Shreekar 2007-03-25 00:00
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..

Thank s for your help,
Shreekar
Quote
0 #2 Kiran 2007-03-26 00:00
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
Quote
0 #3 Stalin 2007-04-05 00:00
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
Stal in G
Quote
0 #4 souvik mukherjee 2007-04-20 00:00
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/remov ing 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
Quote
0 #5 souvik mukherjee 2007-04-22 00:00
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.
T he details are as follows:
Quick search controller: PosAsnQuickSear chCO
Controlle r: PosAsnViewConta inerCO
Aplicat ion Mod: PosViewAsnAM
p age:- /oracle/apps/po s/asn/webui/Pos AsnViewPG 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/modify ing 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
Souv ik
Quote
0 #6 souvik mukherjee 2007-04-24 00:00
HI anil
Thanks a tonne for the help!!
Will let you know how I did it!
Regards
S ouvik
Quote
0 #7 Shreekar V 2007-04-29 00:00
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..

Thank s for your help in Advance,
Shree kar
Quote
0 #8 Sai 2007-06-21 00:00
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
Quote
0 #9 Anil Passi 2007-06-21 00:00
Hi Sai

The tables are for internal purposes only, however I have listed those for your reference.

J DR_ATTRIBUTES
JDR_ATTRIBUTES_ TRANS
JDR_COMP ONENTS
JDR_PAT HS

Thanks
A nil
Quote
0 #10 Mohammed Anas OSmani 2007-08-16 13:06
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
Quote
0 #11 Anil Passi 2007-08-19 06:30
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.

Howe ver, for your custom AK Regions, you will have to do this migration yourself. For this you can create new regions using OA Fwk.

Thanks,
A nil Passi
Quote
0 #12 Jerry 2007-11-29 22:12
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.. :)
Quote
0 #13 Anil Passi 2007-11-29 23:39
Hi Jerry,

Do you know why "Last 25 Purchase Orders" is being defaulted?
What is the name of OA Page in question?

Cheers
Anil
Quote
0 #14 Jerry 2007-11-30 13:44
Not sure why that option is the default, although I suspect it's hard coded. The OA Page is PosVpoMainPG.xm l. In 11.5.9, we simply changed the defaultvalue clause in the oa:messageChoic e line for pickListViewDef ="oracle.apps.p os.isp.server.V iewPoQuickSearc hVO".
Quote
0 #15 Anil Passi 2007-11-30 21:11
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_2 5_PO') DISPLAYED_FIELD , 1 INTERNAL_VALUE from dual
union
sele ct fnd_message.get _string('POS', 'POS_VPO_ALL_PO ') DISPLAYED_FIELD , 2 INTERNAL_VALUE from dual
union
sele ct fnd_message.get _string('POS', 'POS_VPO_PO_TO_ ACK') DISPLAYED_FIELD , 3 INTERNAL_VALUE from dual
union
sele ct fnd_message.get _string('POS', 'POS_VPO_SUP_CH ANGE') DISPLAYED_FIELD , 5 INTERNAL_VALUE from dual
order by internal_value


Thanks,
Anil Passi
Quote
0 #16 Sandra 2007-12-05 11:25
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
Quote
0 #17 Anil Passi 2007-12-05 12:24
Please check the below
1. Is your connection to DB from jDev working?
2. Is dbc file correct?
3. Is username/passwo rd/resp application/res p key combination correct in project runtime property?

Plea se paste the full stack error, as that helps to debug
Thanks,
A nil Passi
Quote
0 #18 Sandra 2007-12-06 04:51
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.

Excepti on Details.

oracle.apps.fnd .framework.OAEx ception: Application: FND, Message Name: SQL_PLSQL_ERROR . Tokens: ROUTINE = createSession(i nt, String)(userid= 6','7E2A6EFA70D 04E6ABBADD2961F 3EB95A312655255 211507485321738 36283268'); REASON = java.sql.SQLExc eption: 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.serv er.OAExceptionU tils.processAOL JErrorStack(OAE xceptionUtils.j ava:974)
at oracle.apps.fnd .framework.OACo mmonUtils.proce ssAOLJErrorStac k(OACommonUtils .java:866)
at oracle.apps.fnd .framework.webu i.OAPageBean.va lidateUser(OAPa geBean.java:470 9)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(OAPag eBean.java:703)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(OAPag eBean.java:508)
at oracle.apps.fnd .framework.webu i.OAPageBean.pr eparePage(OAPag eBean.java:429)
at _OA._jspService (OA.jsp:34)
at com.orionserver .http.OrionHttp JspPage.service (OrionHttpJspPa ge.java:56)
at oracle.jsp.runt imev2.JspPageTa ble.service(Jsp PageTable.java: 317)
at oracle.jsp.runt imev2.JspServle t.internalServi ce(JspServlet.j ava:465)
at oracle.jsp.runt imev2.JspServle t.service(JspSe rvlet.java:379)
at javax.servlet.h ttp.HttpServlet .service(HttpSe rvlet.java:853)
at com.evermind.se rver.http.Servl etRequestDispat cher.invoke(Ser vletRequestDisp atcher.java:727 )
at com.evermind.se rver.http.Servl etRequestDispat cher.forwardInt ernal(ServletRe questDispatcher .java:306)
at com.evermind.se rver.http.HttpR equestHandler.p rocessRequest(H ttpRequestHandl er.java:767)
at com.evermind.se rver.http.HttpR equestHandler.r un(HttpRequestH andler.java:259 )
at com.evermind.se rver.http.HttpR equestHandler.r un(HttpRequestH andler.java:106 )
at EDU.oswego.cs.d l.util.concurre nt.PooledExecut or$Worker.run(P ooledExecutor.j ava:803)
at java.lang.Threa d.run(Thread.ja va:534)
## Detail 0 ##
oracle.apps.fnd .framework.OAEx ception: Application: FND, Message Name: FND_GENERIC_MES SAGE. Tokens: MESSAGE = java.sql.SQLExc eption: 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
;
Quote
0 #19 Sandra 2007-12-08 03:59
Hi Anil,
can you just help me out in solving d problem? waiting for ur response.

Than ks,
Sandra
Quote
0 #20 Sandra 2007-12-09 07:12
Hi Anil,
Thanks for the excellent tutorial.got fixed with the issue of"CREATE SESSION".Proble m was with the setting of"Embedded OC4j" properties.

Th anks,
Sandra
Quote
0 #21 Mohammed Abd El Wahab 2007-12-11 06:49
Thank you so much for this pretty explanation, you make things clear for me.

Thanks

Mo hammed Abd El Wahab
Quote
0 #22 karan777 2008-01-17 11:25
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
kar an
Quote
0 #23 Vishwanath S 2008-02-14 11:18
Thank you very much for the article Anil. This was very useful.
Quote
0 #24 hakella1 2009-02-12 12:58
Hi Anil,
As you have mentioned that we can get a handle to every bean in the webBean hierarchy in processRequest( ).
Can you tell me how i could get the handle of the nodeDefinition Bean ? I have extended the CO of this Standard page.

PageLayo ut
-AdvancedTab le
...
--Hgrid
--- Tree
----Member
-----nodeDef1
------ChildNode
-------Member
--------nodeDef 2 => Need handle to this. (i'm setting url at this level)
Quote
0 #25 sridharOAF 2010-10-10 12:40
Hi anil,
why does OAF uses the concept of storing the data in JDR tables and again
retrievin g, what is the reason behind it.
What does the name JDR means, does it have any significances ?
Quote
0 #26 Jose Arostegui 2011-07-06 05:06
Hi Anil,

Thank you very much for sharing your huge knowledge. I'm one of your book's buyers! It really helped me a lot.

Now I just wanted to know how to configure local OC4J in Jdev 10.1.3.3 (EBS 12.0.4) in order to not been constantly been using Jpximporter as local changes doens't get refreshed in a new custom page in Projects.

Than ks a lot again!
Jose.
Quote
0 #27 Andrew Serok 2011-09-29 12:53
Hi Anil,

If we deploy a page or region into the MDS repository by running the import utility on our development client (not on the server), is it still required to place the page or region XML file on the server? If so can you explain why?

Thanks,

-And rew
Quote
0 #28 Subbu4848 2012-07-12 06:33
in JDR_UTILS package, what is the difference between JDR_UTILS.LISTD OCUMENTS and JDR_UTILS.PRINT DOCUMENT...

Ca n u help me with clear example..
Quote

Add comment


Security code
Refresh

Search Trainings

Fully verifiable testimonials

Apps2Fusion - Event List

<<  Apr 2024  >>
 Mon  Tue  Wed  Thu  Fri  Sat  Sun 
  1  2  3  4  5  6  7
  8  91011121314
15161718192021
22232425262728
2930     

Enquire For Training

Fusion Training Packages

Get Email Updates


Powered by Google FeedBurner