DOC

OracleApplicationFrameworkDevelopmentFAQRelease12

By Kim Burns,2014-06-14 16:26
8 views 0
applicationframe application application data applicationcontext create application application error application letter excel.application application title common application

    Oracle Application Framework Development FAQ Release 12 [ID 395437.1]

     修改时间 21-OCT-2010 类型 REFERENCE 状态 PUBLISHED OA Framework Development Frequently Asked Questions (FAQ)

    Overview

    This document describes common problems and solutions related to ongoing development using the OA

    Framework.

    See Oracle Application Framework Installation Troubleshooting (Metalink Note 395446.1) for common

    problems and questions related to the installation and configuration of the OA Framework, and the deployment

    of OA Framework-based applications. Contents

    This document is organized into the following broad categories:

    ; Development Environment (General)

    ; What Version of Jdev to use with OAF

    ; Oracle 9i JDeveloper OA Extension

    ; BC4J

    ; Error Handling

    ; UI Features

    o Buttons (Action/Navigation & Links)

    o Flexfields

    o Headers and Subheaders

    o HGrid

    o HTML

    o List of Values (LOV)

    o Poplist

    o Tabs / Navigation

    o Tables (Classic and Advanced)

    ; Sorting

    ; Adding Rows

    ; Navigation

    ; Selection

    ; Others

    ; State Management

    ; Other/General

    ; Debugging

    Development Environment

    Questions

    1. The performance of the Tutorial JSPs is poor when using Netscape. How can I switch from

    Netscape to Internet Explorer when I run the demo? (See Answer)

    2. What Java method should I use to set a profile value on the middle tier? (See Answer)

    See Answer) 3. What is the list of locales supported by UIX? (

    Answers

    1. The performance of the Tutorial JSPs is poor when using Netscape. How can I switch from Netscape to Internet Explorer when I run the demo?

    There are two known problems with Netscape:

    ; Netscape consumes so much available CPU time polling for server response, that the server actually

    doesn't get enough CPU time to do the server-side processing.

    ; Netscape takes a very long time to deal with embedded tables, which are used abundantly in UIX. OA Framework is certified against Netscape, but for now, we strongly recommend the usage of Microsoft Internet Explorer (IE) instead of Netscape.

    If Microsoft Internet Explorer is your default browser, launch Internet Explorer (IE), then select Tools/Internet Options... from the menu. Select the Programs tab and check "Internet Explorer should check to see if it is the default browser". Close and restart IE. (Back to Question)

    2. What Java method should I use to set a profile value on the middle tier?

    You can use the call: webappscontext.getProfileStore().setProfile(name, value); (Back to Question)

    3. What is the list of locales supported by UIX?

    The list of locales supported by UIX, and hence OA Framework, are:

    ar ar_AE ar_BH ar_DZ

    ar_EG ar_IQ ar_JO ar_KW

    ar_LB ar_LY ar_MA ar_OM

    ar_QA ar_SA ar_SD ar_SY

    ar_TN ar_YE be be_BY

    bg bg_BG ca ca_ES

    ca_ES_EURO cs cs_CZ da

    da_DK de de_AT de_AT_EURO

    de_CH de_DE de_DE_EURO de_LU

    de_LU_EURO el el_GR en

    en_AU en_CA en_GB en_IE

    en_IE_EURO en_NZ en_US en_ZA

    es es_AR es_BO es_CL

    es_CO es_CR es_DO es_EC es_ES es_ES_EURO es_GT es_HN es_MX es_NI es_PA es_PE es_PR es_PY es_SV es_UY es_VE et et_EE fi fi_FI fi_FI_EURO fr fr_BE fr_BE_EURO fr_CA fr_CH fr_FR fr_FR_EURO fr_LU fr_LU_EURO hr hr_HR hu hu_HU is is_IS it it_CH it_IT it_IT_EURO iw iw_IL ja ja_JP ko ko_KR lt lt_LT lv lv_LV mk mk_MK nl nl_BE nl_BE_EURO nl_NL nl_NL_EURO no no_NO no_NO_NY pl pl_PL pt pt_BR pt_PT pt_PT_EURO ro ro_RO ru ru_RU sh sh_YU sk sk_SK sl sl_SI sq sq_AL sr sr_YU sv sv_SE th th_TH tr tr_TR uk uk_UA zh zh_CN zh_HK zh_TW (Back to Question)

    What Version of Jdev to use with OAF See Metalink note 787209.1

    (Back to Question)

    Oracle 9i JDeveloper and Oracle 9i JDeveloper OA Extension

    Attention: The files mentioned in some of these FAQs and answers refer to documents on Windows NT. For example,

    T:\users\fwk\... If you are using Linux, the file references are different. For example, /jdevhome/users/fwk/... Following are

    some common drive letter translations from NT to Linux:

    J: = /jdevbin

    T: = /jdevhome

    H: = /home/

Questions

    1. When debugging my project, my source code and my classes seem to be out of sync. (See

    Answer)

    2. What is the difference between JDEV_HOME vs JDEV_USER_HOME? (See Answer)

    3. How do I enable OA Extension to run against the old AK repository? (See Answer)

    4. How do I enable OA Extension to run against the new MDS repository (xml files only)? (See

    Answer)

    5. How do I enable OA Extension to run against the new MDS repository (database repository

    only)? (See Answer)

    6. How do I enable OA Extension to run against the new MDS repository (xml files and database

    repository)? (See Answer)

    7. Is there a standard directory hierarchy to follow when setting up our source code and

    Jdeveloper projects? (See Answer)

    8. How can I tell from which source OA Extension is getting my region data? (See Answer)

    9. OA Extension Preview does not work. The last status message is "starting preview" and the log

    message displays "[241] AMPoolMessageBundle (language base) being initialized". (See

    Answer)

    10. Why can't I get my pages to render correctly using Netscape as my browser? (See Answer)

    11. My JDeveloper editing layout is all messed up. For example, the Property Inspector is a floating

    window that will not dock. How can I fix this? (See Answer)

    12. The screen painting in JDeveloper is very slow in the Tarantella environment. How can I improve

    the performance? (See Answer)

    Answers

    1. When debugging my project, my source code and classes seem to be out of sync.

    First simply try to rebuild all your projects. Always do so step by step and make sure the first project compiles completely before you start compiling the next one. If this doesn't help, then try deleting all classes from your ..\jdev\myclasses folder and all subfolders. After that, rebuild all your projects again. Your source code and classes should be in sync again. (Back to Question)

    2. What is the difference between JDEV_HOME vs JDEV_USER_HOME?

    JDEV_HOME is an environment variable used by JDeveloper 3.2.3 and prior. JDEV_USER_HOME is a new environment variable used by JDeveloper9i. You must define a JDEV_USER_HOME in order to run JDeveloper9i properly. JDEV_USER_HOME should point to:

    T:\users\\jdev

    (Back to Question)

    3. How do I enable OA Extension to run against the old AK repository?

    Modifying your env.txt file to have only the following line:

    FND_TOP=T:\\users\\dbc_files

    Alternatively, you can have the following three lines, where the application you want to run against AK is listed in the JRAD_APPS line preceded by a minus sign ( - ), as shown for the FND application below: FND_TOP=T:\\users\\dbc_files

    JRAD_XML_PATH=T:\\users\\\\jdev\\myprojects

    JRAD_APPS=ak;-fnd;dem;icx

    The minus sign forces JDeveloper to run against the AK repository for that application. (Back to Question)

    4. How do I enable OA Extension to run against the new MDS repository (xml files only)?

    This can no longer be done. Now OA Extension searches for the region XML file on your hard drive as defined by the existence ofMDS XML PATH= in Project -> Project Settings ->Oracle Applications. If OA

    Extension fails to locate the region XML file as defined by MDS XML PATH then OA Extension proceeds to

    look for the regions in the MDS repository. The MDS repository exists in the database which is defined by your dbc file in Project -> Project Settings -> Oracle Applications -> Runtime Connection. This means that there

    is no way to search for region XML files exclusively from your hard drive. (Back to Question)

    5. How do I enable OA Extension to run against the new MDS repository (database repository only)?

    If OA Extension fails to locate the region XML file as defined by MDS XML PATH in Project -> Project

    Settings ->Oracle Applications, then OA Extension proceeds to look for the regions in the MDS repository. The MDS repository exists in the database which is defined by your dbc file in Project -> Project Settings ->

    Oracle Applications -> Runtime Connection.

    Adding your application shortname forces OA Extension to use the MDS repository instead of the AK repository. (Back to Question)

    6. How do I enable OA Extension to run against the new MDS repository (xml files and database repository)?

    The settings that define what OA Extension runs against are defined in Project -> Project Settings ->Oracle

    Applications andProject -> Project Settings ->Oracle Applications->Runtime Connection. OA Extension

    first checks that your application shortname is listed. If it is, OA Extension attempts to locate the region XML file in the directory location specified by MDS XML PATH. If the region XML file cannot be found in that location

    then OA Extension fails over to the MDS repository. The MDS repository exists in the database defined by your

    Back to Question) dbc file. (

    7. Is there a standard directory hierarchy to follow when setting up my source code and JDeveloper projects?

    Yes, make sure to follow the standard directory hierarchy for setting up your working directory: T:\users\\jdev\myprojects | myhtml | myclasses | system<#>

    (Back to Question)

    8. How can I tell from which source OA Extension is getting my region data?

    If your regions are obtained from OA Extension XML files, you should see messages of the following format in your output window:

Accessing File System for

    /oracle/apps///

    (Back to Question)

    9. OA Extension Preview does not work. The last status message is "starting preview" and the log message displays "[241] AMPoolMessageBundle (language base) being initialized".

    Remove your classes and perform a clean rebuild. If OA Extension cannot find a BC4J module like AM/VO, this error is thrown. (Back to Question)

    10. Why can't I get my pages to render correctly using Netscape as my browser?

    Partial page rendering requires Microsoft Internet Explorer (IE) 5.5 or higher. (Back to Question)

    11. My JDeveloper editing layout is all messed up. For example, the Property Inspector is a floating window that will not dock. How can I fix this?

    Shut down JDeveloper. Go to your system subdirectory located under your jdev directory. Locate

    and delete the fileEditing.Layout. When you restart JDeveloper, the default editing layout appears. You can perform a similar operation for your Web Editing.Layout (for editing JSP files) or your debug.layout. (Back to

    Question)

    12. The screen painting in JDeveloper is very slow in the Tarantella environment. How can I improve the performance?

    Try unchecking "Automatically Reload Externally Modified Files" from the Environment options window

    under the Tools > Preferences menu in JDeveloper. (Back to Question)

    BC4J

    Questions

    1. What is the reason behind using JSPs and page beans, that reside in the same VM on the middle

    tier versus deploying the BC4J in Corba or EJB mode? (See Answer)

    2. How do I get my bind parameters to work with the 'like' expression in WHERE clauses? (See

    Answer)

    3. Should I only create entity objects for those product tables that the application plans to modify

    or should I also create entity objects for those dependent product tables that are only used as

    reference? How are these entity objects published to avoid clashes between products? (e.g.

    Should Fixed Assets create an entity object for a HR table?) (See Answer)

    4. Does the Oracle Applications layer automatically take care of multi-org or is it the product's

    responsibility to set the WHERE clause in the view object? (See Answer)

    5. How do I create an Entity Object on top of an MLS table? (See Answer)

    6. Do the OAPlsql extensions of the view object classes support locking? (See Answer)

    7. How can I set the defaultRowPrefetch value for the connection that belongs to my application

    module? (See Answer)

    8. Are there any required steps that need to be executed to clean up dynamic view objects? (See

    Answer)

    9. Can batch (array) updates be used through the PL/SQL APIs? (See Answer)

    10. Is the responsibility name being passed through test.jsp to the application initialization routines

    (responsible for setting context and session cookies)? (See Answer)

    11. I have multiple regions on the same page with exactly the same attributes, except for the "where

    clause" in the view object. What is the best way to handle this? (See Answer)

    12. How is the implicit view object query prevented? (See Answer)

    13. How do I determine the transaction state -- that is, whether changes have been made to view

    objects or not? (See Answer)

    14. My application module class extends another application module class. I would like to use view

    object and Nested application module instances in my parent application module, without

    having to create the instances at my child application module. How do I achieve this? (See

    Answer)

    15. I have an entity object-based view object and I use vo.clearCache. However I get

    oracle.jbo.TooManyObjectsException. (See Answer)

    16. How do you show an item-level message in the message box? (See Answer)

    17. What are the available methods for specifying URL tokens? (See Answer)

    18. How do I manipulate BC4J Dates? (See Answer)

    19. Which .ini files, environment variables, and .jar files are responsible for the extends? (See

    Answer)

    20. How do I get a message from fnd_messages within a view object? (See Answer)

    21. A "Error During Statement Preparation" and SQLStmtException error occur after the query

    executes. (See Answer)

    22. How do I determine if the view object row contains changes or not? (See Answer)

    23. How can I create a dynamic OAViewObject for SQL text, if I do not know the columnNames of the

    SQL text? (See Answer)

    Answers

    1. What is the reason behind using JSPs and page beans, that reside in the same VM on the middle tier versus deploying the BC4J in Corba or EJB mode?

    For the short term, the complexity that the latter option introduces isn't worth it. Specifically:

    ; Deploying with CORBA or EJB involves a lot more moving parts. It requires deploying code to two

    separate tiers and adding a CORBA server into the mix. And that doesn't even touch on making sure all

    our shared objects are serializable, generating CORBA wrappers, etc.

    ; Enabling the BC4J objects to be separated from the client (in our case the JSP and page beans) doesn't

    seem to provide any large gains as we can already scale the middle tier by adding more machines.

    That's not to say there aren't reasons for doing this, just that it isn't expected to be an early bottleneck. That being said, we want to make sure we're coding our web beans in such a way that we have the option to do this in the future. This is discussed in the "Implementing the Model" topic of the Oracle Application Framework

    Developer's Guide, MetaLink Note 394780.1. (Back to Question)

    2. How do I get my bind parameters to work with the 'like' expression in WHERE clauses?

    Add wildcards to the parameter and do not include them in the WHERE clause. Also be sure to keep blanks in front and after the parameter placeholder in the WHERE clause.

    ; WHERE clause:

    o like :1 and ... (correct)

    o like '%:1%' and ... (wrong)

    ; Parameter:

    o '"%" + value + "%"' (correct)

    o value (wrong)

    (Back to Question)

    3. Should I only create entity objects for those product tables that the application plans to modify or should I also create entity objects for those dependent product tables that are only used as reference? How are these entity objects published to avoid clashes between products? (e.g. Should Fixed Assets create an entity object for a HR table?)

    Create entity objects for those tables your product owns, including tables that you intend to modify and tables that are used as reference. However, for dependent tables own by other product teams where the entity objects do not yet exist, you will need to create a view object using 'Expert Mode SQL' that manually joins to the dependent table. The view object attributes from the dependent table should be 'SQL Derived'. (Back to

    Question)

    4. Does the Oracle Applications layer automatically take care of multi-org or is it the product's responsibility to set the WHERE clause in the view object?

    Base your entity objects on the _ALL synonyms rather than on organization-restricted views. The entity objects need to have full access to the table data to do validation. For example, if the supplier name must be unique across all organizations, you need your entity object to query across all 'org's to confirm uniqueness rather than going through the multi-org view and only checking for uniqueness within the current org. See the Entity Object, Association Object, and Entity Experts coding standards in the Oracle Application Framework Developer's

    Guide, MetaLink note 394780.1, for more details.

    The view objects, on the other hand, normally query through the organization-restricted views, as you should usually only be interested in or allow viewing of information from the organization associated with your current session. (Back to Question)

    5. How do I create an entity object on top of an MLS table?

    There are two approaches. The latest recommended approach is documented in the Entity Objects for Translatable (_TL) Tables section of the Oracle Application Framework Developer's Guide, MetaLink note

    394780.1, which uses native OA entity objects and has better performance characteristics and support for bulk DML operations. But you may notice older entity objects which rely upon PL/SQL Entity Objects as well. (Back

    to Question)

    6. Do the OAPlsql extensions of the view object classes support locking?

    No, instead your choices are:

    ; Implement the lock in the same PL/SQL call as the DML (since we support optimistic locking, this is the

    standard approach.)

    ; Add a locking sequence (or timestamp) column to the database table. Use the sequence (or timestamp)

    to determine if the row has been updated.

    ; Implement the PL/SQL API from an entity object. (Back to Question)

    7. How can I set the defaultRowPrefetch value for the connection that belongs to my application module?

    To get defaultRowPrefetch you need to "drill" your way down to the following:

    1. Get the transaction.

    2. Once you have the transaction, use it to get the JdbcConnection.

    3. Once you have the JdbcConnection, use it to call getDefaultRowPrefetch. Example:

    oracle.apps.fnd.framework.server.OADBTransactionImpl tx =

     (OADBTransactionImpl)yourAM.getOADBTransaction();

    oracle.apps.fnd.jdbc.ConnectionImpl conn =

     (ConnectionImpl)tx.getJdbcConnection();

    int x = conn.getDefaultRowPrefetch()

    (Back to Question)

    8. Are there any required steps that need to be executed to clean up dynamic view objects?

    Make sure you always call VO.remove() after you are done using a dynamic view object: ViewObject existenceVO = null;

     try

     {

     existenceVO = mTransaction.createViewObjectFromQueryStmt("some sql statement");

     boolean exists = ( existenceVO.first() != null);

     }

     finally

     {

     existenceVO.remove();

     }

    Make sure to surround your VO.remove(); with finally. If you don't, a java runtime exception could fire before

    you even get to your VO.remove(). This would result in your VO never being cleaned up, which in turn results in

    Back to Question) a memory leak. (

    9. Can batch (array) updates be used through the PL/SQL APIs?

    We do not recommend using batch updates. There is no indication that this would provide a performance gain, as Rosetta, or some related method, would have to be used. This would require the copying of the arrays between data structures, negating any performance improvements. (Back to Question)

    10. Is the responsibility name being passed through test.jsp to the application initialization routines (responsible for setting context and session cookies)?

    No, it is not being passed through. It is set in test.jsp as a part of establishing a connection. (Back to Question)

    11. I have multiple regions on the same page with exactly the same attributes, except for the "WHERE clause" in the view object. What is the best way to handle this?

    Create different instances of the same view object (one for each region). Add them to the application module, and provide a different view usage name to each one, thus allowing you to set a different WHERE clause for each. You may want to create the second view object as an extension of the first to avoid duplication of the

    Back to Question) attribute definitions and other view object properties. (

    12. How is the implicit view object query prevented?

    See view object details regarding Initialization Guidelines, in the Oracle Application Framework Developer's

    Guide, MetaLink note 394780.1for more information. (Back to Question)

    13. How do I determine the transaction state -- that is, whether changes have been made to view objects or not?

    Use the following methods:

    ; ApplicationModule.getTransaction().isDirty() - This method tells you whether the

    transaction contains any changes in the view objects. This works for transactions made by entity

    object-based view objects only.

    ; OAViewObject.isDirty() - This method tells you whether a particular view object contains

    changes or not. This works for both entity object-based view objects and view objects based

    on OAPlsqlViewObjectImpl. For view objects based onOAPlsqlViewObjectImpl, you can also

    use OAPlsqlViewObjectImpl.getState() method. (Back to Question)

    14. My application module class extends another application module class. I would like to use view object and Nested application module instances in my parent application module, without having to create the instances at my child application module. How do I achieve this?

    To achieve this, you need to use a BC4J feature called, "XML Extends" and consider the following two extension hierarchies:

    ; Class Extension hierarchy

    ; XML Extension hierarchy -- this is a somewhat advanced feature, although it is not that hard to use. Suppose Class B may extend Class A, but B's xml does not extend A's xml by default.

    XML Extends: This means your xml extends another xml. Usually used for an application module, when you want to have a subclass application module

    load objects in a super class application module. For instance, if your super class application module contains xxxVO object in its xml definition, that xxxVO will

    be loaded and one instance will be created for it. Use with caution only when you want to have this effect. To define XML Extension:

    1. When you create an application module: Fill out "Extends Application Module" in the first screen where

    you define the application module name. This is where you define the XML extension. Note that there

    is an "Extends" button in the "Application Module Class" section. It is used to define a "class"

    extension. You can xml-extend only the application modules in your current project.

Report this document

For any questions or suggestions please email
cust-service@docsford.com