Parse oaf page metadata structure

Source: Internet
Author: User

In the secondary development of Oracle E-Business Suite, oaf-based development is carried out in the jdeveloper OA extension. After completion, the xmlimporter tool is used to import the page to define the database,

After uploading the relevant Java class file to java_top, you can use the oaf application. Next, let's take a look at what happened when importing the oaf page to the database?

The following uses the purchase order type definition page as an example for analysis.

 

1. Export the XML definition of the oaf page design

In oaf page development, developers use the jdeveloper visualization tool to design web pages. The pages are nested and combined to form a page definition file in XML format.

In EBS, you can useAbort this pagePage-related information, such as page structure, personalization, page context, Java System attributes, and preset files,

Use this function to query the page path:

Use the following method to export the XML Information of the page. Use PLSQL developer to run the following command in the SQL window:

? [Copy
To clipboard] view code PLSQL

123
BEGIN  jdr_utils.printDocument('/oracle/apps/po/setup/webui/DocumentTypesPG');END;

Switch to the output tab, and you can see the XML definition of the oaf page. If there are too many page definitions, you can add the buffer size and run it again. The following is the definition information of the PO document types page,

Click to download or view the oaf page information.

From the page definition information, we can know the composition of the oaf page, the am used, the CO used by region, and other information. Through this method, we can analyze and view the standard oaf page and functions.

 

Ii. oaf page metadata Storage Structure

When xmlimporter is used to import the oaf page information, xmlimporter parses the oaf page definition XML file and then stores the page information in several tables.

Oaf page metadata is mainly stored in three tables:

1. jdr_paths: stores the structure of the page path and the personalized structure information of the oaf page.

/Oracle/apps/po/Setup/webui/documenttypespg this is the path of the oaf page, which is split into a tree structure and stored in the jdr_paths table. See the following:

SELECT path_docid,path_name, path_type  FROM jdr_paths START WITH path_name = 'DocumentTypesPG'CONNECT BY PRIOR path_owner_docid = path_docid;  PATH_DOCID  PATH_NAME          PATH_TYPE------------ ----------------- -----------      78629  DocumentTypesPG    DOCUMENT      39543  webui              PACKAGE      39542  setup              PACKAGE      24179  po                 PACKAGE          2  apps               PACKAGE          1  oracle             PACKAGE

Among them, oralce, apps, Po, setup, and webui all belong to the package type, while documenttypespg is document, which is an XML document.

2. jdr_components: stores page component information. The oaf page component is decomposed and stored in this table.

The document-type node documenttypespg is queried from the jdr_paths table above. Its component attributes are as follows:

SELECT comp_seq, comp_element, comp_level, comp_grouping, comp_id  FROM jdr_paths, jdr_components WHERE path_docid = 78629   AND path_docid = comp_docid(+) ORDER BY path_seq, comp_seq; COMP_SEQ COMP_ELEMENT          COMP_LEVEL  COMP_GROUPING            COMP_ID                   -------- --------------------- ----------  ------------------------ --------------------------       0 page                           0                                                            1 oa:pageLayout                  2  content                  PageLayoutRN                     2 oa:image                       4  ui:corporateBranding     corporateBrandingImage           3 oa:advancedTable               4  ui:contents              DocumentTypesResultsTable        4 oa:column                      6  ui:contents              TypeColumn                       5 oa:sortableHeader              8  ui:columnHeader          TypeHeader                       6 oa:messageStyledText           8  ui:contents              Type                             7 oa:column                      6                           NameColumn                       8 oa:sortableHeader              8  ui:columnHeader          NameHeader                       9 oa:messageStyledText           8  ui:contents              DocName                         10 oa:column                      6                           LayoutColumn                    11 oa:sortableHeader              8  ui:columnHeader          LayoutHeader                    12 oa:messageStyledText           8  ui:contents              Layout                          13 oa:column                      6                           ContractTermsColumn             14 oa:sortableHeader              8  ui:columnHeader          ContractTermsHeader             15 oa:messageStyledText           8  ui:contents              ContractTerms                   16 oa:column                      6                           UpdateColumn                    17 oa:sortableHeader              8  ui:columnHeader          UpdateHeader                    18 oa:image                       8  ui:contents              Update                          19 oa:column                      6                           DeleteColumn                    20 oa:sortableHeader              8  ui:columnHeader          DeleteHeader                    21 oa:switcher                    8  ui:contents              DeleteSwitcher                  22 ui:case                        9                                                           23 oa:image                      10                           DeleteDisabled                  24 ui:case                        9                                                           25 oa:image                      10                           DeleteEnabled                   26 ui:fireAction                 12  ui:primaryClientAction                                   27 ui:parameter                  14  ui:parameters                                            28 ui:parameter                  14                                                           29 ui:parameter                  14                                                           30 oa:formValue                   6                           DocumentTypeCode                31 oa:formValue                   6                           DocumentSubtype                 32 oa:flowLayout                  6  ui:tableActions          TableActionsRN                  33 oa:submitButton                8  ui:contents              CreateDocumentType 

Compare the above query results with the XML file exported using the jdr_utils.printdocument ('/Oracle/apps/po/Setup/webui/documenttypespg') tool,

The data in jdr_components is obtained by decomposing the oaf component in the XML file.

3. jdr_attributes: stores the attributes of each component on the page.

Use the following SQL statement to query the attribute information of the page component.

SELECT comp_seq,       comp_element,       comp_level,       comp_grouping,       comp_id,       comp_ref,       comp_extends,       comp_use,       att_name,       att_value  FROM jdr_paths, jdr_components, jdr_attributes WHERE path_docid = 78629   AND path_docid = comp_docid(+)   AND comp_docid = att_comp_docid(+)   AND comp_seq = att_comp_seq(+) ORDER BY path_seq, comp_seq, att_comp_seq, att_seq;

The execution results are not listed here and left to the reader for completion.

From the oaf metadata storage, it is not difficult to see that when the xmlimporter tool is used to import the oaf page after oaf is developed, the xmlimport tool breaks down the page definition XML file according to the component, store the structure information of the document to jdr_paths, save the component information to jdr_components, and save the attributes of the component to jdr_attributes.

When running the oaf page, the oaf engine first queries the document node in the jdr_paths table based on the URL address defined by the function, that is, the page path of the oaf page, then, the component and attribute information is obtained from the jdr_compoents and jdr_attributes tables, and the web page is output.

Therefore, when publishing an oaf application, the page definition file does not need to be uploaded to java_top.

Having been familiar with the JDR-related structure, it is helpful for us to understand the working principle of oaf and solve some intractable diseases. Meanwhile, the personalization of oaf pages will also involve these tables.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.