<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4890411074348189661</id><updated>2012-02-08T21:48:30.776-08:00</updated><category term='Oracle Apps Generic'/><category term='ADF 10G'/><category term='OAF'/><title type='text'>Mukul's Oracle Applications Technology Blog</title><subtitle type='html'>Technical articles and help related to Oracle Application Framework(OAF) and Fusion Techstack(ADF,BPEL,ESB etc.),based on my developer experience.You can put your comments, if you need any help in any article.Avoid sending e mails.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>35</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-6618346899401656965</id><published>2010-07-06T23:04:00.000-07:00</published><updated>2010-07-20T20:56:09.875-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apps Generic'/><title type='text'>JDBC Connections leakage and optimization in Oracle Apps R12.</title><content type='html'>Identifying issues with JDBC connections in Apps can sometimes be a frustrating process, as the investigations may need to consider multiple failure points and complex architectures. I hope this article will give you a better understanding of JDBC Pooling and where to start looking for issues. Hopefully this article should help system and technical architects in Apps to resolve connection leak problems.&lt;br /&gt;&lt;br /&gt;    Recently while working with Oracle MEA in world's first major implementation of CMRO module in Apps, we faced some critical performance issues, initially. One of the major performance issue was  &lt;span style="font-weight:bold;"&gt;"JDBC connections leakage"&lt;/span&gt;. Over a period the &lt;span style="font-weight:bold;"&gt;"INACTIVE"&lt;/span&gt; jdbc connections rise and finally they cross the maximum jdbc connections figure set in database and server goes down. The immediate solution was bouncing OC4J Core and HTTP containers of Oracle Apps application server 10g,  but off-course this is something you can not do daily in a production environment.&lt;br /&gt;&lt;br /&gt;           Since our implementation layer has a strong layer of custom code and standard code , done by various teams and you don't have control on coding of individual new developers. I thought it is next to impossible to identify root cause and fix it ,but thanks to Oracle... in Apps there are some standard ways to fix this problem. &lt;br /&gt;&lt;br /&gt;    Ok to start with lets start with some basic definitions and facts to understand the problem , I am talking about here :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is JDBC ?&lt;/span&gt;&lt;br /&gt;The Java Database Connectivity (JDBC) API is the industry standard for database-independent connectivity between the Java programming language and a wide range of databases – SQL databases(Oracle,mysql etc) and other tabular data sources, such as spreadsheets or flat files. The JDBC API provides a call-level API for SQL-based database access.&lt;br /&gt;     &lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is JDBC Connection ?&lt;/span&gt;&lt;br /&gt;Java JDBC APIs uses connection (session) instance in which SQL statements are executed and results are returned within the context of a connection.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is JDBC Connection pool?&lt;/span&gt;&lt;br /&gt;If you have used a SQL or other similar tool to connect to a database and act on the data, you probably know that getting the connection and logging in is the part that takes the most time. An application can easily spend several seconds every time it needs to establish a connection.&lt;br /&gt;&lt;br /&gt;In releases prior to JDBC 2.0 every database session requires a new connection and login even if the previous connection and login used the same table and user account. If you are using a JDBC release prior to 2.0 and want to improve performance, you can cache JDBC connections instead.&lt;br /&gt;&lt;br /&gt;Cached connections are kept in a runtime object pool and can be used and reused as needed by the application. One way to implement the object pool is to make a simple hashtable of connection objects. &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is Connection leakage ?&lt;/span&gt;&lt;br /&gt;An application(basically application server) is said to be leaking connection, if it acquires a connection and does not close it within specified time period. If this feature is enabled, the application server detects these potential connection leaks and dumps the leak tracing logs to server logs. Looking at the logs the user can figure out which application is leaking connection and fix the issues with application, if exists.&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;What is Connection locks ?&lt;/span&gt;&lt;br /&gt;If your are doing multiple DML jdbc transactions in your code with  autocommit flag as false on the connection object,the jdbc connection remains locked till the time commit is issued specifically.(By default in OAF/JTF  the autocommit flag is false.)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to identify that Apps instance has connection leakage problem ?&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;You can run the following sql statement occasionaly to monitor jdbc connections&lt;br /&gt;behaviour :&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;br /&gt;select s.machine, s.username, s.module, s.inst_id, count(*) how_many&lt;br /&gt;from (select distinct PROGRAM, PADDR, machine, username, module, inst_id from gV$SESSION) s,&lt;br /&gt; gv$process p&lt;br /&gt;where s.paddr = p.addr&lt;br /&gt;and p.inst_id = s.inst_id&lt;br /&gt;group by s.machine,s.username, s.module, s.inst_id&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;This will list down number of jdbc connections in each module. For OAF, the module is shown as page AM and for JTF/JTT/JSP, the JDBC connections are listed in "JDBC Thin Client". You can keep of track of connections in each module mainly ("JDBC Thin Client"), if this is growing  each day. You can also check the status of these connections in v$session if its "INACTIVE" and these connections are persisting for more than 24-48 hours, means these sum up to connection leakage. &lt;br /&gt;&lt;br /&gt;  For OA Framework calls AOL/J when it needs a database connection, and it is up to OAF to release any such connection when it has finished with it. There is an added complexity, in that OAF also has its own pooling mechanism for the OAF Pages, which is the "Application Module pool" (AM pool).  This means that although a user may have finished with a page, the page and its associated database connection are retained for a period of time.&lt;span style="font-weight:bold;"&gt;So, generally this layer would not have problem, because developer does not have to release/close connection in his code, that is automatically taken care by framework depending upon AM instance pooling and Database Connection Pooling enabled on the instance.&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;      AOL/J JDBC code is the code that handles JDBC connection, it is often the first area to be blamed, but the JDBC connection pool can only drop database connections where the calling application has released the JDBC connection it holds in the pool, so it often turns out to be an issue higher up the code stack.&lt;span style="font-weight:bold;"&gt;This layer covers all yours JSP/JTT/JTF layer and 99% of the cases is responsible for connections leaks.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;How to track leaked and locked connections?&lt;/span&gt;&lt;br /&gt;Once you see that your instance has a problem of growing jdbc connections over a period of time all with inactive status for more than 24-48 hours, you will now start to debug and find the exact leaked and locked connections.To gather JDBC Connection statics ,  do following steps :&lt;br /&gt;1) We need to first identify number of OACORE processes running on apps application server, then on each OACORE process we will check number of leaked locked jdbc connections in Apps instance.To note the number of OACORE processes , we need to do following in Unix box of each application server node :&lt;br /&gt;&lt;br /&gt;  (i)   Login to Apps Application server unix box using ftp tool like putty.&lt;br /&gt;  (ii)  cd $ADMIN_SCRIPTS_HOME&lt;br /&gt;  (iii) adoacorectl.sh  status &lt;br /&gt; &lt;br /&gt;  The output will look like :&lt;br /&gt;&lt;br /&gt;Processes in Instance: &lt;instance name&gt;&lt;br /&gt;---------------------------------+--------------------+---------+---------&lt;br /&gt;ias-component                    | process-type       |     pid | status&lt;br /&gt;---------------------------------+--------------------+---------+---------&lt;br /&gt;OC4JGroup:default_group          | OC4J:oafm          |   21894 | Alive&lt;br /&gt;OC4JGroup:default_group          | OC4J:forms         |   21861 | Alive&lt;br /&gt;OC4JGroup:default_group          | OC4J:oacore        |   21775 | Alive&lt;br /&gt;OC4JGroup:default_group          | OC4J:oacore        |   21776 | Alive&lt;br /&gt;HTTP_Server                      | HTTP_Server        |   21699 | Alive&lt;br /&gt;&lt;br /&gt; From this we can analyse that there are two OCCore processes running with process id&lt;br /&gt;21775 and 21776 .&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Please note in case of multi-node enviorment i.e. Application server  with multiple nodes,you will have to run this command individually on each node to get the OACORE process id(s) for that node.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;2) Enable FND Diagnostics profile at your user level.&lt;br /&gt;&lt;br /&gt;3) Login into Apps instance, on home page click "About This Page" link.&lt;br /&gt;&lt;br /&gt;4)Go to subtab "Java System Properties" and note "CLIENT_PROCESSID" from the&lt;br /&gt;  table, this will be one of what you got in step 1.&lt;br /&gt;&lt;br /&gt;5) Now in the url type : http://&lt; host &gt;:&lt; port &gt;/OA_HTML/jsp/fnd/AoljDbcPoolStatus.jsp&lt;br /&gt;&lt;br /&gt;6) This will display you  the list of leaked and locked connections for the process id you got in step 3. For leaked connections if you will click the hyperlink, you will also get detailed stack for each leaked connection , which can furthur help you&lt;br /&gt;in identifying the code layer where connection leak is happening.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt; You need to repeat step (3) and (4) again and again each time logging out and closing the browser to track all the CLIENT_PROCESSID locked and leaked connections.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;span style="font-weight:bold;"&gt;How to get the root cause/code that is causing this connection leak ?&lt;/span&gt;&lt;br /&gt;     Actually AoljDbcPoolStatus.jsp is the key to resolve this problem and leaked connection stack will help us to figure out our problem.We can make following conclusions from the stack :&lt;br /&gt;&lt;br /&gt;1) The first obvious thing you will want to look at is that  whether or not your custom code is causing this problem. Thats easy just search the stack with ur custom top name eg- all your extensions lie in lets say xxabc folder under $JAVA_TOP, then you can search xxabc  in leak connection stack, that will give you pointers of class and code where this connection is instantiated and later not released/closed.&lt;br /&gt;&lt;br /&gt;2) For custom and standard jsp(s), search the stack with "_" as all jsp classes in apps are compiled as "_" pre-fixed to the jsp name. So this can give you idea where and which jsp are leaking connections.&lt;span style="font-weight:bold;"&gt; In my experience, this is the layer where most developers make mistakes.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;3) Lastly if not custom class then standard classes are doing this (This is a rare case), and for this you anyways just have to raise an SR with Oracle to fix this. To identify search stacks and see its coming from which module i.e., the stack will we like oracle.apps.&lt;span style="font-weight:bold;"&gt;per&lt;/span&gt;.xxx.yyy or oracle.apps.&lt;span style="font-weight:bold;"&gt;icx&lt;/span&gt;.yyy.zzzz , this simple points you that per=&gt; HRMS  or ICX=&gt; I-procurement module standard class is causing this problem. &lt;span style="font-weight:bold;"&gt;Its always good to decompile and look at the code of these classes because often developers do invaisive customization to Oracle code, directly changing the seeded Oracle file to take easy way to their customizations , without realising that this can later cause bigger problems.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;&lt;span style="font-style:italic;"&gt;Hopefully these analysis will help you to fix root cause of connection leakage problem.&lt;/span&gt; &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-6618346899401656965?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/6618346899401656965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=6618346899401656965' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6618346899401656965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6618346899401656965'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/07/jdbc-connections-leakage-and.html' title='JDBC Connections leakage and optimization in Oracle Apps R12.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3152432262049675145</id><published>2010-04-07T02:37:00.000-07:00</published><updated>2010-06-09T01:18:22.903-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Adding programmatic fire Action to UIX beans which dont support it</title><content type='html'>Recently, a friend had a requirement of a customization in a seeded page where he needs to put some validation on a table column which was actually OAMessageDateFieldBean.&lt;br /&gt;&lt;br /&gt;        This is quite simple and generic requirement , when he called me ...I told him that since , this has to be done in seeded Oracle page and fire action elements can't be added by personalization,he just needs to extend the CO and attach fire action programatically to the OAMessageDateFieldBean in process request and then can handle his logic of validation in process form request.&lt;span style="font-weight:bold;"&gt;But the tricky part came when he told me his code is not compiling since setFireActionForSubmit API is absent in OAMessageDateFieldBean class.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;       I just wondered how is it possible since this bean allows me to configure fireaction decalaratively, then there should be an API of doing it programatically too in the bean. &lt;span style="font-weight:bold;"&gt;Then I remebered with each UIX bean Oracle also gives a helper class, which can usually be instantiated by using getHelper(), on the bean instance.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;      Whenever you are in such situations , its worth while to look into bean helper classes. Ok.. so here is the code how you can configure firection on OAMessageDateFieldBean programatically :&lt;br /&gt;&lt;br /&gt;//In process request.&lt;br /&gt;&lt;br /&gt;//getting table bean instance&lt;br /&gt;OATableBean t=(OATableBean)webBean.findChildRecursive("&lt; table bean id &gt;");&lt;br /&gt;&lt;br /&gt;//getting OAMessageDateFieldBean  inside &lt;br /&gt;//table bean&lt;br /&gt;OAMessageDateFieldBean expDate = (OAMessageDateFieldBean)t.findChildRecursive("&lt; OAMessageDateFieldBean  id &gt;");&lt;br /&gt;&lt;br /&gt;//hard-parameters for fire action&lt;br /&gt;//it will help us to identify if action&lt;br /&gt;//has occured or not&lt;br /&gt;    Hashtable params = new Hashtable (1);&lt;br /&gt;    params.put ("XX_ACTION","XXX");&lt;br /&gt;&lt;br /&gt;//bound value parameters for fire action&lt;br /&gt;// basically the primary key attribute of&lt;br /&gt;//VO to get the row from which action has occured   &lt;br /&gt;//eg, lets say the VO attribute is Visit id AND&lt;br /&gt;//that is primary key &lt;br /&gt;Hashtable paramsWithBinds = new Hashtable(1);&lt;br /&gt;paramsWithBinds.put ("XX_PRIMARY",new OADataBoundValueFireActionURL((OAWebBeanData) expDate, "{$VisitId}"));&lt;br /&gt;    &lt;br /&gt;//Most important---&lt;br /&gt;//taking helper class instance&lt;br /&gt;// there we get the API to attach fire action.&lt;br /&gt;expDate.getHelper().setFireActionForSubmit(expDate,"delete",params, paramsWithBinds,false,false);&lt;br /&gt;    &lt;br /&gt;//In Process form request&lt;br /&gt;&lt;br /&gt;if(pageContext.getParameter("XX_ACTION")!=null)&lt;br /&gt; {&lt;br /&gt;   //by this primary key we can retrieve the VO row at which&lt;br /&gt;   // action occured and utilise the other column data&lt;br /&gt;   // for validations.&lt;br /&gt;   String primary_key=pageContext.getParameter("XX_PRIMARY");&lt;br /&gt;&lt;br /&gt;      .......&lt;br /&gt;&lt;br /&gt;   //finally releasing the parameters from&lt;br /&gt;   //current pagecontext requesr&lt;br /&gt;   pagecontext.removeParameter("XX_ACTION");&lt;br /&gt;   pagecontext.removeParameter("XX_PRIMARY");&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Alternative : There is a alternate way to attach PPR/Fireaction to any bean.Use static methods in class OAWebBeanUtils, like &lt;br /&gt;    OAWebBeanUtils.getFirePartialActionForSubmit()&lt;br /&gt;    OAWebBeanUtils.getFireActionForSubmit()&lt;br /&gt;and then use &lt;br /&gt;&lt;/span&gt;&lt;br /&gt;// finally set it on your bean&lt;br /&gt;bean.setAttributeValue&lt;br /&gt;(PRIMARY_CLIENT_ACTION_ATTR, fireAction);&lt;br /&gt;     &lt;br /&gt;Happy coding....!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3152432262049675145?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3152432262049675145/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3152432262049675145' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3152432262049675145'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3152432262049675145'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/04/adding-programmatic-fire-action-to-uix.html' title='Adding programmatic fire Action to UIX beans which dont support it'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-6451783756469975701</id><published>2010-03-17T02:41:00.000-07:00</published><updated>2010-06-09T01:18:22.903-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Concept of Nested AM.</title><content type='html'>Hi All,&lt;br /&gt;          Writing a theoretical article after a long time. What inspired me to write.... hmm... lot of questioning developers :) . Ok, my target with this article is to make an OA Framework developer understand what is nested AM? and how can u find a nested AM instance from master/root AM instance? What we should know about it while developing extensions or new pages.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;What is a Nested AM?&lt;/strong&gt;&lt;br /&gt;--------------------------------------&lt;br /&gt;An application module may be a root application module or a nested application module. A root application module is not contained in another applicatin module. It provides transaction context for all objects contained in it. It may optionally contain nested application modules. A root application module is created through JNDI calls. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;A nested application module is contained in another application module.&lt;/strong&gt; The containing application module is referred to as the parent application module. If one traverses this containership ancestry, one will eventually find the root application module (which does not have a parent application module). A nested application module uses the transaction context provided by the root application module. Thus, data modifications performed in application modules parented by one root application module will commit or rollback together.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Transaction&lt;/strong&gt;&lt;br /&gt;-----------------------------&lt;br /&gt;Associated with the root application module is the Transaction object, which provides this transaction context. From any (root or nested) application module, the user can retrieve the transaction object through a call to getOADBTransaction(). In reality, getOADBTransaction() first locates the root application module and then returns the transaction object from it.&lt;br /&gt;&lt;br /&gt;The transaction object manages connection to database and entity caches. Thus, changes made through one view object are visible to other view objects as long as these view objects all parented by the one root application module. In contrast, if two view objects are parented by two separate root application modules, then changes made through the view object will not be seen by the second view object until the changes are committed to database through the first root application module and the second VO executes query (to retrieve the most up-to-date data from database).&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Creating Application Module&lt;/strong&gt;&lt;br /&gt;--------------------------------------------------------------------&lt;br /&gt;A root application module is created by:&lt;br /&gt;&lt;br /&gt;Finding the application module home through JNDI. &lt;br /&gt;Calling create() on the application module home. &lt;br /&gt;Here is a sample code to create a root application module:&lt;br /&gt;&lt;br /&gt;    java.util.Hashtable env = new java.util.Hashtable();&lt;br /&gt;&lt;br /&gt;    // Add environment entries into env...&lt;br /&gt;&lt;br /&gt;    javax.naming.Context ic = new InitialContext(env);&lt;br /&gt;&lt;br /&gt;    // 'defName' is the JNDI name for the application module&lt;br /&gt;    // definition from which the root application module is to&lt;br /&gt;    // be created&lt;br /&gt;    String defName = ...;&lt;br /&gt;&lt;br /&gt;    oracle.jbo.ApplicationModuleHome home = ic.lookup(defName);&lt;br /&gt;    oracle.jbo.ApplicationModule am = home.create();&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;One creates a nested application module by calling createApplicationModule on the parent Application module.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How nested AM concept works in OAF :&lt;/strong&gt;&lt;br /&gt;---------------------------------------------------------------------------&lt;br /&gt;       Now to associate  a nested application module with a region,&lt;br /&gt;specify either of the following properties:&lt;br /&gt;1) AM Instance -- The application module instance name as specified in the application module's data&lt;br /&gt;model. For example, PoSummaryAM1.&lt;br /&gt;2) AM Definition -- The fully qualified name of the application module instance. For example,&lt;br /&gt;oracle.apps.fnd.framework.toolbox.tutorial.server.PoSummaryAM.&lt;br /&gt;&lt;br /&gt;         &lt;strong&gt;If you specify the AM Instance property, OA Framework attempts to find and return the AM instance with the given name. It searches the application module associated with the parent web bean.&lt;/strong&gt;&lt;br /&gt;         If you specify the AM Definition property, OA Framework assigns a generated AM instance name to the nested region. This name is comprised of the following values:&lt;br /&gt;a) Region code of the associated nested region (if the region was originally created in AK)&lt;br /&gt;b) Nested region application ID&lt;br /&gt;c) Nested region ID&lt;br /&gt;d) AM definition name.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;OA Framework checks to see if the nested AM with the system-generated name has been already created under the application module of the parent web bean. If the instance is not found, OA Framework creates and uses a nested AM with the system-generated name. Otherwise, it reuses the pre-existing AM with the system generated&lt;br /&gt;name.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;    &lt;strong&gt;When specifying both the AM Instance and AM Definition properties&lt;br /&gt;if a matching AM instance is found, OA Framework compares its definition with the AM Definition property value. If there is a mismatch, OA Framework throws an exception.&lt;br /&gt;If a matching AM instance is not found, OA Framework creates and returns a nested application module instance with the given AM instance name and the definition.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Code for finding nested AM instance in root AM :&lt;/strong&gt;&lt;br /&gt;-----------------------------------------------------------------------------------&lt;br /&gt;     Hence, whenever you are trying to find an nested AM instance linked to a OA region under pagelayout region, please check the am defination and am instance property of that region, because only then you would be able to have a idea of name of nested AM instance. It can be system generated AM instance or name given by developer for AM instance.So, you need to confirm this from the three cases mentioned in the previous article.&lt;strong&gt;For debugging purposes, you can get the list if Application modules in root AM and print there names ,too :&lt;br /&gt;&lt;br /&gt;    String[] nestedAMNames = parentAM.getApplicationModuleNames();&lt;br /&gt;&lt;br /&gt;    // If you want to retrieve all currently loaded nested Application Modules&lt;br /&gt;    ApplicationModule[] nestedAMs = new ApplicationModule[nestedAMNames.length];&lt;br /&gt;&lt;br /&gt;    for (int i = 0; i &lt; nestedAMNames.length; i++)&lt;br /&gt;    {&lt;br /&gt;       nestedAM[i] = parentAM.findApplicationModule(nestedAMNames[i]);&lt;br /&gt;    }&lt;br /&gt; &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;   Otherwise for finding nested AM instance by :&lt;br /&gt;ApplicationModule nestedAM = parentAM.findApplicationModule("MyNestedAM");&lt;br /&gt;&lt;br /&gt;This concept is really helpful while doing extensions in OAF, as you may have to find a nested AM in a CO of particular OAF region.You can always find root AM of the page in any controller using pagecontext.getRootApplicationModule().&lt;br /&gt;&lt;br /&gt;       I hope after reading this article nested AM conecept becomes crystal clear in your mind :), if not raise queries, and I will try to answer you.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-6451783756469975701?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/6451783756469975701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=6451783756469975701' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6451783756469975701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6451783756469975701'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/03/concept-of-nested-am.html' title='Concept of Nested AM.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-4916696297602973152</id><published>2010-02-03T23:51:00.000-08:00</published><updated>2010-06-09T01:18:22.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Attaching AutoSubmit Property to a OA page.</title><content type='html'>Hi All,&lt;br /&gt;        I recently received couple of mails where people more or less have the requirement like :&lt;br /&gt;1) Data of the page gets refresh every 10 sec automatically.&lt;br /&gt;2) Data of the page should be autosaved every 10 seconds etc.&lt;br /&gt;&lt;br /&gt;    This is very similar to &lt;span style="font-weight:bold;"&gt;autosave feature&lt;/span&gt; of microsoft word or popular email websites like yahoo and google. A small javascript function can do this for you.Here are the steps how, you can achieve this functionality  in an OAF page :&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * @param pageContext -current page context in CO&lt;br /&gt;   * @param evt_name  - javascript event will be registered with this name.&lt;br /&gt;   * @param time_in_milli_sec - time in milli sec after which page will refresh&lt;br /&gt;   *    e.g if you wanna submit page every 10 sec , enter 10000&lt;br /&gt;   * This api should be used in process request and not process form request. &lt;br /&gt;   */&lt;br /&gt;  public void attachAutoSubmitPropertyToPage(OAPageContext pageContext, &lt;br /&gt;                                             String evt_name, &lt;br /&gt;                                             String time_in_milli_sec)&lt;br /&gt;  {&lt;br /&gt;    OABodyBean bodyBean = (OABodyBean) pageContext.getRootWebBean();&lt;br /&gt;    String javaS = &lt;br /&gt;      "javascript:setTimeout(\"submitForm('DefaultFormName',0,{'" + &lt;br /&gt;      evt_name + "':'Y'});\"," + time_in_milli_sec + ");";&lt;br /&gt;    bodyBean.setOnLoad(javaS);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * @param pageContext -current page context in CO&lt;br /&gt;   * @param event_name  - pass javascript event name that you registered&lt;br /&gt;   *  in process request.&lt;br /&gt;   * @return return true/false accordinging whether the event has occured or not.&lt;br /&gt;   * This api call should be there in process form request.&lt;br /&gt;   */&lt;br /&gt;  public boolean isAutoSubmitEvent(OAPageContext pageContext, &lt;br /&gt;                                   String event_name)&lt;br /&gt;  {&lt;br /&gt;    boolean b = false;&lt;br /&gt;    String s = &lt;br /&gt;      pageContext.getRenderingContext().getServletRequest().getParameter(event_name);&lt;br /&gt;    if (!((s == null) || ("".equals(s.trim()))))&lt;br /&gt;    {&lt;br /&gt;            if("Y".equals(s))&lt;br /&gt;          {&lt;br /&gt;            b = true;&lt;br /&gt;            pageContext.removeParameter(event_name);&lt;br /&gt;          }  &lt;br /&gt;    }&lt;br /&gt;    return b;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Then , in process request add the api call&lt;br /&gt;&lt;br /&gt;public void processRequest(OAPageContext pageContext, OAWebBean webBean)&lt;br /&gt;{&lt;br /&gt;super.processRequest(pageContext, webBean);&lt;br /&gt;// see javadocs for parameter description&lt;br /&gt;//10000 for 10 sec as we are paaing in millsec&lt;br /&gt;attachAutoSubmitPropertyToPage(pageContext,"XX_EVT","10000");&lt;br /&gt;&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In process form request... you can catch this event in every 10 sec:&lt;br /&gt;public void processFormRequest(OAPageContext pageContext,&lt;br /&gt;OAWebBean webBean)&lt;br /&gt;{&lt;br /&gt;super.processFormRequest(pageContext, webBean);&lt;br /&gt;.&lt;br /&gt;.&lt;br /&gt;&lt;br /&gt;if(isAutoSubmitEvent(pageContext,"XX_EVT"))&lt;br /&gt;{&lt;br /&gt;// YOUR LOGIC TO SAVE THE PAGE CONTENTS.&lt;br /&gt;//or to refresh the data... etc&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;I hope this is interesting and will help developers of such kind of requirement.&lt;br /&gt;   Happy Coding..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-4916696297602973152?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/4916696297602973152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=4916696297602973152' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/4916696297602973152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/4916696297602973152'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/02/attaching-autosubmit-propety-to-oa-page.html' title='Attaching AutoSubmit Property to a OA page.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1432360805896260990</id><published>2010-01-12T22:12:00.000-08:00</published><updated>2010-06-09T01:18:22.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Upload file to Application server using OAFileUploadBean instead of Database</title><content type='html'>Sometimes, there can be requirement , where you need to upload a file on unix server, instead of database.You can use OAMessageFileUploadBean for this. Add  the upload bean in your OAF UIX page. Add an additional submit button bean which will be responsible for file Upload.&lt;br /&gt;            On click on this button in process form request call the following method with parameters as described in CO. So, copy this method in CO and then call it in process form request on this submit button click like&lt;br /&gt;      &lt;br /&gt;uploadFileToServer(pageContext, "item3", &lt;br /&gt;                                       "/xx/app/sss/x");&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;Here is the method for upload:&lt;br /&gt;  /**&lt;br /&gt;   * @param pageContext is current pagecontext in CO&lt;br /&gt;   * @param fileuploadBeanId is item id of file upload bean&lt;br /&gt;   * @param server_dir_path  is abslute path on unix server&lt;br /&gt;   *         where file needs to be written.eg "/xx/xxx/xxx"&lt;br /&gt;   */&lt;br /&gt;  public void uploadFileToServer(OAPageContext pageContext, &lt;br /&gt;                                   String fileuploadBeanId, &lt;br /&gt;                                   String server_dir_path)&lt;br /&gt;  {&lt;br /&gt;    DataObject fileUploadData = &lt;br /&gt;      (DataObject) pageContext.getNamedDataObject(fileuploadBeanId);&lt;br /&gt;    if(fileUploadData!=null)&lt;br /&gt;    {&lt;br /&gt;    String uFileName = &lt;br /&gt;      (String) fileUploadData.selectValue(null, "UPLOAD_FILE_NAME");&lt;br /&gt;    String contentType = &lt;br /&gt;      (String) fileUploadData.selectValue(null, "UPLOAD_FILE_MIME_TYPE");&lt;br /&gt;&lt;br /&gt;    File file = new File(server_dir_path, uFileName);&lt;br /&gt;    FileOutputStream output = null;&lt;br /&gt;    InputStream input = null;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      output = new FileOutputStream(file);&lt;br /&gt;      BlobDomain uploadedByteStream = &lt;br /&gt;        (BlobDomain) fileUploadData.selectValue(null, uFileName);&lt;br /&gt;      input = uploadedByteStream.getInputStream();&lt;br /&gt;      for (int bytes = 0; bytes &lt; uploadedByteStream.getLength(); bytes++)&lt;br /&gt;      {&lt;br /&gt;        output.write(input.read());&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    catch (Exception e)&lt;br /&gt;    {&lt;br /&gt;      e.printStackTrace();&lt;br /&gt;    }&lt;br /&gt;    finally&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        if (input != null)&lt;br /&gt;        {&lt;br /&gt;          input.close();&lt;br /&gt;        }&lt;br /&gt;        if (output != null)&lt;br /&gt;        {&lt;br /&gt;          output.close();&lt;br /&gt;          output.flush();&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      catch (Exception ez)&lt;br /&gt;      {&lt;br /&gt;        ez.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt; &lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Please understand when you run a page from jdeveloper, you are running page on local oc4j server of jdeveloper and not the actual application server of Oracle Apps, hence if this code is run from jdeveloper then you need to give path of your local desktop folder and file will be uploaded in it and not the actual application server.&lt;br /&gt;To test this code actually you should deploy your page onto Oracle apps application server and access the page from a responsibility by registering it as a function , because then it will use Oracle Apps Application Unix server and upload file there. &lt;/strong&gt;&lt;br /&gt;Happy coding ...!&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1432360805896260990?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1432360805896260990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1432360805896260990' title='24 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1432360805896260990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1432360805896260990'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/01/upload-file-to-application-server-using.html' title='Upload file to Application server using OAFileUploadBean instead of Database'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>24</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3796646975890225794</id><published>2010-01-05T23:06:00.000-08:00</published><updated>2010-06-09T01:18:22.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Giving download option to user for a file at a particular location on Application Server</title><content type='html'>Hi All,&lt;br /&gt;           This is a very generic scenario where a user wants to download a particular file from application server. eg- We are storing some report output or some pdf documents in particular location in unix application server. Now in a OAF page on press of a button/link I wanna give user download option for this file. &lt;br /&gt;&lt;br /&gt;      For this requirement you can use following method, from process form request, u need to pass pagecontext and  other parameters as described in method.&lt;br /&gt;&lt;br /&gt;//on button click in process form request&lt;br /&gt;//call this method&lt;br /&gt;downloadFileFromServer(&lt;br /&gt;             pageContext,--pagecontext &lt;br /&gt;             "/xx/xxx/ssss/120devg.pdf",--full file path with file name and ext &lt;br /&gt;             "120devg.pdf" --file name with extension&lt;br /&gt;              ); &lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Make sure that the folder/files you are giving user option to download through this method, have 777 rights in UNIX server.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Copy these two methods in your CO for the above API to work:&lt;br /&gt;   /**&lt;br /&gt;   * @param pageContext the current OA page context&lt;br /&gt;   * @param file_name_with_path - this is fully qualified file name with its path on unix application&lt;br /&gt;   * server. eg "/xxcrp/xxapplcrp/mukul/abc.pdf"&lt;br /&gt;   * @param file_name_with_ext - this is file name with extension, you wanna display user&lt;br /&gt;   * for download. eg- i wanna display the abc.pdf file download with name five_point_someone.pdf&lt;br /&gt;   * then I can pass this as "five_point_someone.pdf"&lt;br /&gt;   */&lt;br /&gt;  public void downloadFileFromServer(OAPageContext pageContext, &lt;br /&gt;                                     String file_name_with_path, &lt;br /&gt;                                     String file_name_with_ext)&lt;br /&gt;  {&lt;br /&gt;    HttpServletResponse response = &lt;br /&gt;      (HttpServletResponse) pageContext.getRenderingContext().getServletResponse();&lt;br /&gt;    if (((file_name_with_path == null) || &lt;br /&gt;         ("".equals(file_name_with_path))))&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("File path is invalid.");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    File fileToDownload = null;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      fileToDownload = new File(file_name_with_path);&lt;br /&gt;    }&lt;br /&gt;    catch (Exception e)&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("Invalid File Path or file does not exist.");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (!fileToDownload.exists())&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("File does not exist.");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (!fileToDownload.canRead())&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("Not Able to read the file.");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    String fileType = getMimeType(file_name_with_ext);&lt;br /&gt;    response.setContentType(fileType);&lt;br /&gt;    response.setContentLength((int)fileToDownload.length()); &lt;br /&gt;    response.setHeader("Content-Disposition", &lt;br /&gt;                       "attachment; filename=\"" + file_name_with_ext + &lt;br /&gt;                       "\"");&lt;br /&gt;&lt;br /&gt;    InputStream in = null;&lt;br /&gt;    ServletOutputStream outs = null;&lt;br /&gt;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      outs = response.getOutputStream();&lt;br /&gt;      in = new BufferedInputStream(new FileInputStream(fileToDownload));&lt;br /&gt;      int ch;&lt;br /&gt;      while ((ch = in.read()) != -1)&lt;br /&gt;      {&lt;br /&gt;        outs.write(ch);&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;    catch (IOException e)&lt;br /&gt;    {&lt;br /&gt;      // TODO&lt;br /&gt;      e.printStackTrace();&lt;br /&gt;    }&lt;br /&gt;    finally&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        outs.flush();&lt;br /&gt;        outs.close();&lt;br /&gt;        if (in != null)&lt;br /&gt;        {&lt;br /&gt;          in.close();&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      catch (Exception e)&lt;br /&gt;      {&lt;br /&gt;        e.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * @param s&lt;br /&gt;   * @return file mime type from its name&lt;br /&gt;   */&lt;br /&gt;  public String getMimeType(String s)&lt;br /&gt;  {&lt;br /&gt;    int i = s.lastIndexOf(".");&lt;br /&gt;    if (i &gt; 0 &amp;&amp; i &lt; s.length() - 1)&lt;br /&gt;    {&lt;br /&gt;      String s1 = s.substring(i + 1);&lt;br /&gt;      if (s1.equalsIgnoreCase("amr"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/amr";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mid"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/midi";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mmf"))&lt;br /&gt;      {&lt;br /&gt;        return "application/vnd.smaf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("qcp"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/vnd.qcelp";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("hqx"))&lt;br /&gt;      {&lt;br /&gt;        return "application/mac-binhex40";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("cpt"))&lt;br /&gt;      {&lt;br /&gt;        return "application/mac-compactpro";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("doc"))&lt;br /&gt;      {&lt;br /&gt;        return "application/msword";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jsp"))&lt;br /&gt;      {&lt;br /&gt;        return "application/jsp";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("oda"))&lt;br /&gt;      {&lt;br /&gt;        return "application/oda";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("pdf"))&lt;br /&gt;      {&lt;br /&gt;        return "application/pdf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ai"))&lt;br /&gt;      {&lt;br /&gt;        return "application/postscript";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("eps"))&lt;br /&gt;      {&lt;br /&gt;        return "application/postscript";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ps"))&lt;br /&gt;      {&lt;br /&gt;        return "application/postscript";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ppt"))&lt;br /&gt;      {&lt;br /&gt;        return "application/powerpoint";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("rtf"))&lt;br /&gt;      {&lt;br /&gt;        return "application/rtf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("bcpio"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-bcpio";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("vcd"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-cdlink";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("Z"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-compress";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("cpio"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-cpio";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("csh"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-csh";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("dcr"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-director";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("dir"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-director";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("dxr"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-director";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("dvi"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-dvi";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("gtar"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-gtar";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("gz"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-gzip";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("hdf"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-hdf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("cgi"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-httpd-cgi";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jnlp"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-java-jnlp-file";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("skp"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-koan";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("skd"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-koan";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("skt"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-koan";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("skm"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-koan";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("latex"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-latex";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mif"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-mif";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("nc"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-netcdf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("cdf"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-netcdf";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sh"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-sh";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("shar"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-shar";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sit"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-stuffit";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sv4cpio"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-sv4cpio";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sv4crc"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-sv4crc";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tar"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-tar";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tcl"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-tcl";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tex"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-tex";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("textinfo"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-texinfo";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("texi"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-texinfo";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("t"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tr"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("roff"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("man"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff-man";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("me"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff-me";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ms"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-troff-ms";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ustar"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-ustar";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("src"))&lt;br /&gt;      {&lt;br /&gt;        return "application/x-wais-source";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xml"))&lt;br /&gt;      {&lt;br /&gt;        return "text/xml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ent"))&lt;br /&gt;      {&lt;br /&gt;        return "text/xml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("cat"))&lt;br /&gt;      {&lt;br /&gt;        return "text/xml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sty"))&lt;br /&gt;      {&lt;br /&gt;        return "text/xml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("dtd"))&lt;br /&gt;      {&lt;br /&gt;        return "text/dtd";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xsl"))&lt;br /&gt;      {&lt;br /&gt;        return "text/xsl";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("zip"))&lt;br /&gt;      {&lt;br /&gt;        return "application/zip";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("au"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/basic";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("snd"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/basic";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mpga"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mp2"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mp3"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("aif"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-aiff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("aiff"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-aiff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("aifc"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-aiff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ram"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-pn-realaudio";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("rpm"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-pn-realaudio-plugin";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ra"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-realaudio";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wav"))&lt;br /&gt;      {&lt;br /&gt;        return "audio/x-wav";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("pdb"))&lt;br /&gt;      {&lt;br /&gt;        return "chemical/x-pdb";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xyz"))&lt;br /&gt;      {&lt;br /&gt;        return "chemical/x-pdb";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("gif"))&lt;br /&gt;      {&lt;br /&gt;        return "image/gif";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ief"))&lt;br /&gt;      {&lt;br /&gt;        return "image/ief";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jpeg"))&lt;br /&gt;      {&lt;br /&gt;        return "image/jpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jpg"))&lt;br /&gt;      {&lt;br /&gt;        return "image/jpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jpe"))&lt;br /&gt;      {&lt;br /&gt;        return "image/jpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("png"))&lt;br /&gt;      {&lt;br /&gt;        return "image/png";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tiff"))&lt;br /&gt;      {&lt;br /&gt;        return "image/tiff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tif"))&lt;br /&gt;      {&lt;br /&gt;        return "image/tiff";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ras"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-cmu-raster";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("pnm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-portable-anymap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("pbm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-portable-bitmap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("pgm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-portable-graymap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ppm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-portable-pixmap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("rgb"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-rgb";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xbm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-xbitmap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xpm"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-xpixmap";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("xwd"))&lt;br /&gt;      {&lt;br /&gt;        return "image/x-xwindowdump";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("html"))&lt;br /&gt;      {&lt;br /&gt;        return "text/html";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("htm"))&lt;br /&gt;      {&lt;br /&gt;        return "text/html";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("txt"))&lt;br /&gt;      {&lt;br /&gt;        return "text/plain";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("rtx"))&lt;br /&gt;      {&lt;br /&gt;        return "text/richtext";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("tsv"))&lt;br /&gt;      {&lt;br /&gt;        return "text/tab-separated-values";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("etx"))&lt;br /&gt;      {&lt;br /&gt;        return "text/x-setext";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sgml"))&lt;br /&gt;      {&lt;br /&gt;        return "text/x-sgml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("sgm"))&lt;br /&gt;      {&lt;br /&gt;        return "text/x-sgml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mpeg"))&lt;br /&gt;      {&lt;br /&gt;        return "video/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mpg"))&lt;br /&gt;      {&lt;br /&gt;        return "video/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mpe"))&lt;br /&gt;      {&lt;br /&gt;        return "video/mpeg";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("qt"))&lt;br /&gt;      {&lt;br /&gt;        return "video/quicktime";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mov"))&lt;br /&gt;      {&lt;br /&gt;        return "video/quicktime";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("avi"))&lt;br /&gt;      {&lt;br /&gt;        return "video/x-msvideo";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("movie"))&lt;br /&gt;      {&lt;br /&gt;        return "video/x-sgi-movie";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("ice"))&lt;br /&gt;      {&lt;br /&gt;        return "x-conference/x-cooltalk";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wrl"))&lt;br /&gt;      {&lt;br /&gt;        return "x-world/x-vrml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("vrml"))&lt;br /&gt;      {&lt;br /&gt;        return "x-world/x-vrml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wml"))&lt;br /&gt;      {&lt;br /&gt;        return "text/vnd.wap.wml";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wmlc"))&lt;br /&gt;      {&lt;br /&gt;        return "application/vnd.wap.wmlc";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wmls"))&lt;br /&gt;      {&lt;br /&gt;        return "text/vnd.wap.wmlscript";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wmlsc"))&lt;br /&gt;      {&lt;br /&gt;        return "application/vnd.wap.wmlscriptc";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("wbmp"))&lt;br /&gt;      {&lt;br /&gt;        return "image/vnd.wap.wbmp";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("css"))&lt;br /&gt;      {&lt;br /&gt;        return "text/css";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jad"))&lt;br /&gt;      {&lt;br /&gt;        return "text/vnd.sun.j2me.app-descriptor";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("jar"))&lt;br /&gt;      {&lt;br /&gt;        return "application/java-archive";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("3gp"))&lt;br /&gt;      {&lt;br /&gt;        return "video/3gp";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("3g2"))&lt;br /&gt;      {&lt;br /&gt;        return "video/3gpp2";&lt;br /&gt;      }&lt;br /&gt;      if (s1.equalsIgnoreCase("mp4"))&lt;br /&gt;      {&lt;br /&gt;        return "video/3gpp";&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    return "application/octet-stream";&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;Happy coding...! I hope this helps! :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3796646975890225794?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3796646975890225794/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3796646975890225794' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3796646975890225794'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3796646975890225794'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/01/giving-download-option-to-user-for-file.html' title='Giving download option to user for a file at a particular location on Application Server'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-522245524622226361</id><published>2010-01-05T22:46:00.000-08:00</published><updated>2010-06-09T01:18:22.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Implementing Export Button Functionality Programatically</title><content type='html'>Hi All,&lt;br /&gt;           There is often a requirement to export a VO data or a UI table data into a CSV file. OA Framework provides export button bean for the this functionality, which works fine in almost 99% of the cases. But sometimes, you might face a scenario when ur table u have complex UIs like switcher/hide show columns etc, where the standard export functionality doesn't work or you want some columns not to come in export, or you wanna change some data on export.&lt;br /&gt;&lt;br /&gt;In such cases, you can implement the export functionality programatically by yourself.Copy paste the following method in the page CO and pass appropriate parameters to get exported data.You can change this method, as per your requirement, to get data/format data or change data.&lt;br /&gt;&lt;br /&gt;  By default this method will bring all columns of fetch rows of VO instance,although you can use &lt;strong&gt;param hidden_attrib_list&lt;/strong&gt; to pass attributes which you don't want to be included in csv file.You can call this method in the submit button event that you have made in process form request like :&lt;br /&gt;&lt;br /&gt;//see api parameter details in the method below.&lt;br /&gt;//array of Vo attr names which need not be written in csv file&lt;br /&gt;String ss[]={xID,xName};&lt;br /&gt;downloadCsvFile(pageContext, "XxAdatVisSearchVO",null, "MAX",ss); &lt;br /&gt;&lt;br /&gt;  /**&lt;br /&gt;   * @param pageContext &lt;br /&gt;   * @param view_inst_name is the view object instance name like VO1 etc in root AM.&lt;br /&gt;   * Make sure the VO instance name you have passed should be same as in Root AM.&lt;br /&gt;   * @param file_name_without_ext - pass for eg for abc.csv , u should pass "abc".If no&lt;br /&gt;   * name is passed then by default it will pick "Export.csv".&lt;br /&gt;   * @param max_size -pass "MAX", if u want all rows, pass null to get fetch row count&lt;br /&gt;   * else pass integer number like 10,20 etc , the number of rows you want to fetch.&lt;br /&gt;   * @param hidden_attrib_list -Array of VO attribute names which doesn't need to be shown/written in&lt;br /&gt;   * csv file.&lt;br /&gt;   */&lt;br /&gt;  public void downloadCsvFile(OAPageContext pageContext, &lt;br /&gt;                              String view_inst_name, &lt;br /&gt;                              String file_name_without_ext, &lt;br /&gt;                              String max_size, String[] hidden_attrib_list)&lt;br /&gt;  {&lt;br /&gt;    OAViewObject v = &lt;br /&gt;      (OAViewObject) pageContext.getRootApplicationModule().findViewObject(view_inst_name);&lt;br /&gt;&lt;br /&gt;    if (v == null)&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("Could not find View object instance " + &lt;br /&gt;                            view_inst_name + " in root AM.");&lt;br /&gt;    }&lt;br /&gt;    if (v.getFetchedRowCount() == 0)&lt;br /&gt;    {&lt;br /&gt;      throw new OAException("There is no data to export.");&lt;br /&gt;    }&lt;br /&gt;    String file_name = "Export";&lt;br /&gt;    if (!((file_name_without_ext == null) || &lt;br /&gt;          ("".equals(file_name_without_ext))))&lt;br /&gt;    {&lt;br /&gt;      file_name = file_name_without_ext;&lt;br /&gt;    }&lt;br /&gt;    HttpServletResponse response = &lt;br /&gt;      (HttpServletResponse) pageContext.getRenderingContext().getServletResponse();&lt;br /&gt;    response.setContentType("application/text");&lt;br /&gt;    response.setHeader("Content-Disposition", &lt;br /&gt;                       "attachment; filename=" + file_name + ".csv");&lt;br /&gt;    PrintWriter pw = null;&lt;br /&gt;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      pw = response.getWriter();&lt;br /&gt;      int j = 0;&lt;br /&gt;      int k = 0;&lt;br /&gt;      boolean bb = true;&lt;br /&gt;      if ((max_size == null) || ("".equals(max_size)))&lt;br /&gt;      {&lt;br /&gt;        k = Integer.parseInt(pageContext.getProfile("VO_MAX_FETCH_SIZE"));&lt;br /&gt;        bb = false;&lt;br /&gt;      }&lt;br /&gt;      else if ("MAX".equals(max_size))&lt;br /&gt;      {&lt;br /&gt;        bb = true;&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;        k = Integer.parseInt(max_size);&lt;br /&gt;        bb = false;&lt;br /&gt;      }&lt;br /&gt;&lt;br /&gt;      //Making header&lt;br /&gt;      AttributeDef[] a = v.getAttributeDefs();&lt;br /&gt;      StringBuffer cc = new StringBuffer();&lt;br /&gt;      ArrayList exist_list = new ArrayList();&lt;br /&gt;      for (int l = 0; l &lt; a.length; l++)&lt;br /&gt;      {&lt;br /&gt;        boolean zx = true;&lt;br /&gt;        if (hidden_attrib_list != null)&lt;br /&gt;        {&lt;br /&gt;          for (int z = 0; z &lt; hidden_attrib_list.length; z++)&lt;br /&gt;          {&lt;br /&gt;            if (a[l].getName().equals(hidden_attrib_list[z]))&lt;br /&gt;            {&lt;br /&gt;              zx = false;&lt;br /&gt;              exist_list.add(String.valueOf(a[l].getIndex()));&lt;br /&gt;            }&lt;br /&gt;          }&lt;br /&gt;        }&lt;br /&gt;        if (zx)&lt;br /&gt;        {&lt;br /&gt;          cc.append("\"" + a[l].getName() + "\"");&lt;br /&gt;          cc.append(",");&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      String header_row = cc.toString() + "\n";&lt;br /&gt;      pw.write(header_row);&lt;br /&gt;&lt;br /&gt;      for (OAViewRowImpl row = (OAViewRowImpl) v.first(); row != null; &lt;br /&gt;           row = (OAViewRowImpl) v.next())&lt;br /&gt;      {&lt;br /&gt;        j++;&lt;br /&gt;        StringBuffer b = new StringBuffer();&lt;br /&gt;        for (int i = 0; i &lt; v.getAttributeCount(); i++)&lt;br /&gt;        {&lt;br /&gt;          boolean cv = true;&lt;br /&gt;          for (int u = 0; u &lt; exist_list.size(); u++)&lt;br /&gt;          {&lt;br /&gt;            if (String.valueOf(i).equals(exist_list.get(u).toString()))&lt;br /&gt;            {&lt;br /&gt;              cv = false;&lt;br /&gt;            }&lt;br /&gt;          }&lt;br /&gt;&lt;br /&gt;          if (cv)&lt;br /&gt;          {&lt;br /&gt;            Object o = row.getAttribute(i);&lt;br /&gt;&lt;br /&gt;            if (!(o == null))&lt;br /&gt;            {&lt;br /&gt;              if (o.getClass().equals(Class.forName("oracle.jbo.domain.Date")))&lt;br /&gt;              {&lt;br /&gt;                //formatting of date&lt;br /&gt;                oracle.jbo.domain.Date dt = (oracle.jbo.domain.Date) o;&lt;br /&gt;                java.sql.Date ts = (java.sql.Date) dt.dateValue();&lt;br /&gt;                java.text.SimpleDateFormat displayDateFormat = &lt;br /&gt;                  new java.text.SimpleDateFormat("dd-MMM-yyyy");&lt;br /&gt;                String convertedDateString = displayDateFormat.format(ts);&lt;br /&gt;                b.append("\"" + convertedDateString + "\"");&lt;br /&gt;              }&lt;br /&gt;              else&lt;br /&gt;              {&lt;br /&gt;                b.append("\"" + o.toString() + "\"");&lt;br /&gt;              }&lt;br /&gt;            }&lt;br /&gt;            else&lt;br /&gt;            {&lt;br /&gt;              b.append("\"\"");&lt;br /&gt;            }&lt;br /&gt;            b.append(",");&lt;br /&gt;          }&lt;br /&gt;        }&lt;br /&gt;        String final_row = b.toString() + "\n";&lt;br /&gt;        pw.write(final_row);&lt;br /&gt;        if (!bb)&lt;br /&gt;        {&lt;br /&gt;          if (j == k)&lt;br /&gt;          {&lt;br /&gt;            break;&lt;br /&gt;          }&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    catch (Exception e)&lt;br /&gt;    {&lt;br /&gt;      // TODO&lt;br /&gt;      e.printStackTrace();&lt;br /&gt;      throw new OAException("Unexpected Exception occured.Exception Details :" + &lt;br /&gt;                            e.toString());&lt;br /&gt;    }&lt;br /&gt;    finally&lt;br /&gt;    {&lt;br /&gt;      pw.flush();&lt;br /&gt;      pw.close();&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;            Happy coding!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-522245524622226361?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/522245524622226361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=522245524622226361' title='16 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/522245524622226361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/522245524622226361'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2010/01/implementing-export-button.html' title='Implementing Export Button Functionality Programatically'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>16</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3974862944470956032</id><published>2009-12-28T23:26:00.000-08:00</published><updated>2010-06-09T01:18:22.905-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Scrolling Table :Table with horizontal Scrollbars and vertical scrollbars</title><content type='html'>Hi All,&lt;br /&gt;       I hope this is quite an interesting reading for most developers and they will try to put this feature in OAF tables.This is a very essential requirement in any of the custom OAF pages, where you show data in OATableBean and table has lot of columns, so, user has to scroll the entire page from scroll bar which is automatically rendered by browser if table width is more than page width.This is very painful for user as everytime, he scrolls the scroll-bar to see extra table columns,entire page is scrolled and he has to scroll back to the page to see other data.Similary, if you are displaying more than 10-20 rows in the table , user needs to scroll the entire page to see all the rendered rows of table.&lt;br /&gt;&lt;br /&gt;         In order to lessen the pain of the user and to have better UI design, we will render scroll bars both horizontal and vertical just surrounding the table&lt;br /&gt;as , shown in the image below :&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_pm9lRhnES5k/S1s2pMWcAvI/AAAAAAAAAks/dE3Q9xMGHxk/s1600-h/TABLS.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 400px; height: 208px;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/S1s2pMWcAvI/AAAAAAAAAks/dE3Q9xMGHxk/s400/TABLS.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5429993857043137266" /&gt;&lt;/a&gt;&lt;br /&gt;         &lt;br /&gt;      So, now lets focus how can we bring these scroll bars. In that case you can use the DIV tag to do the job for you.Put 2 RawText Bean(named DivStart, DivEnd), before and after the Table Bean in the JRAD page as shown in the image below IN JDEVELOPER:&lt;br /&gt;&lt;br /&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_pm9lRhnES5k/S1s0ffqUmbI/AAAAAAAAAkk/SzposvzxVg8/s1600-h/TB.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 145px; height: 59px;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/S1s0ffqUmbI/AAAAAAAAAkk/SzposvzxVg8/s400/TB.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5429991491404863922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can use following API in process request :&lt;br /&gt; public void processRequest(OAPageContext pageContext, OAWebBean webBean)&lt;br /&gt; {&lt;br /&gt; super.processRequest(pageContext, webBean);&lt;br /&gt;//SEE ALL PARAMETER  values you need to pass in the java comments of the method&lt;br /&gt;addScrollBarsToTable(pageContext, webBean,"DivStart","DivEnd",true,"400",true,"400");&lt;br /&gt; .&lt;br /&gt; .&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;   * @param pageContext the current OA page context.&lt;br /&gt;   * @param webBean the web bean corresponding to the region.Pass the webBean of pagelayout.&lt;br /&gt;   * @param preRawTextBean is name of the Rawtext bean just above the table bean.&lt;br /&gt;   * @param postRawTextBean is name of the Rawtext bean just below the table bean.&lt;br /&gt;   * @param horizontal_scroll is boolean value if horizontal scrollbar is required/not required.&lt;br /&gt;   * @param width is the minimum width of table beyond which horizontal scrollbar is displayed.i.e&lt;br /&gt;   * if width is greater than this horizontal scrollbar is displayed.If this is passed as null, defalt value&lt;br /&gt;   * is considered which is 400.&lt;br /&gt;   * @param vertical_scroll is boolean value if vertical scrollbar is required/not required.&lt;br /&gt;   * @param height is the minimum height of table beyond which horizontal scrollbar is displayed .i.e&lt;br /&gt;   * if width is greater than this horizontal scrollbar is displayed.If this is passed as null, defalt value&lt;br /&gt;   * is considered which is 400.&lt;br /&gt;   */&lt;br /&gt;  public void addScrollBarsToTable(OAPageContext pageContext, &lt;br /&gt;                                   OAWebBean webBean, &lt;br /&gt;                                   String preRawTextBean, &lt;br /&gt;                                   String postRawTextBean, &lt;br /&gt;                                   boolean horizontal_scroll, String width, &lt;br /&gt;                                   boolean vertical_scroll, String height)&lt;br /&gt;  {&lt;br /&gt;    String l_height = &amp;quot;400&amp;quot;;&lt;br /&gt;    String l_width = &amp;quot;400&amp;quot;;&lt;br /&gt;    pageContext.putMetaTag(&amp;quot;toHeight&amp;quot;, &lt;br /&gt;                           &amp;quot;&amp;lt;style type=\&amp;quot;text/css\&amp;quot;&amp;gt;.toHeight {height:24px; color:black;}&amp;lt;/style&amp;gt;&amp;quot;);&lt;br /&gt;&lt;br /&gt;    OARawTextBean startDIVTagRawBean = &lt;br /&gt;      (OARawTextBean) webBean.findChildRecursive(preRawTextBean);&lt;br /&gt;    if (startDIVTagRawBean == null)&lt;br /&gt;    {&lt;br /&gt;      throw new OAException(&amp;quot;Not able to retrieve raw text bean just above the table bean. Please verify the id of pre raw text bean.&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    OARawTextBean endDIVTagRawBean = &lt;br /&gt;      (OARawTextBean) webBean.findChildRecursive(postRawTextBean);&lt;br /&gt;    if (endDIVTagRawBean == null)&lt;br /&gt;    {&lt;br /&gt;      throw new OAException(&amp;quot;Not able to retrieve raw text bean just below the table bean. Please verify the id of post raw text bean.&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    if (!((height == null) || (&amp;quot;&amp;quot;.equals(height))))&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        Integer.parseInt(height);&lt;br /&gt;        l_height = height;&lt;br /&gt;      }&lt;br /&gt;      catch (Exception e)&lt;br /&gt;      {&lt;br /&gt;        throw new OAException(&amp;quot;Height should be an integer value.&amp;quot;);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    if (!((width == null) || (&amp;quot;&amp;quot;.equals(width))))&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        Integer.parseInt(width);&lt;br /&gt;        l_width = width;&lt;br /&gt;      }&lt;br /&gt;      catch (Exception e)&lt;br /&gt;      {&lt;br /&gt;        throw new OAException(&amp;quot;Width should be an integer value.&amp;quot;);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    String divtext = &amp;quot;&amp;quot;;&lt;br /&gt;    if ((horizontal_scroll) &amp;amp;&amp;amp; (vertical_scroll))&lt;br /&gt;    {&lt;br /&gt;      divtext = &lt;br /&gt;          &amp;quot;&amp;lt;DIV style='width:&amp;quot; + l_width + &amp;quot;;height:&amp;quot; + l_height + &amp;quot;;overflow:auto;padding-bottom:20px;border:0'&amp;gt;&amp;quot;;&lt;br /&gt;    }&lt;br /&gt;    else if (horizontal_scroll)&lt;br /&gt;    {&lt;br /&gt;      divtext = &lt;br /&gt;          &amp;quot;&amp;lt;DIV style='width:&amp;quot; + l_width + &amp;quot;;overflow-x:auto;padding-bottom:20px;border:0'&amp;gt;&amp;quot;;&lt;br /&gt;    }&lt;br /&gt;    else if (vertical_scroll)&lt;br /&gt;    {&lt;br /&gt;      divtext = &lt;br /&gt;          &amp;quot;&amp;lt;DIV style='height:&amp;quot; + l_height + &amp;quot;;overflow-y:auto;padding-bottom:20px;border:0'&amp;gt;&amp;quot;;&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;      throw new OAException(&amp;quot;Both vertical and horizintal scrollbars are passed as false,hence, no scrollbars will be rendered.&amp;quot;);&lt;br /&gt;    }&lt;br /&gt;    startDIVTagRawBean.setText(divtext);&lt;br /&gt;    endDIVTagRawBean.setText(&amp;quot;&amp;lt;/DIV&amp;gt;&amp;quot;);&lt;br /&gt;  }&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Please Note : Height and Width passed in addScrollBarsToTable API are the minimum&lt;br /&gt;height and width of the table respectively which will be displayed on the page. Hence if this display resolution is available on page the scrollbars will not be displayed or corresponding one scrollbar or both scrollbars will be displayed.If you are not able see both scrollbars, even if you pass true for both in this method, try to put less resolution like 150 and 150 etc.&lt;br /&gt;&lt;/span&gt;               &lt;br /&gt;      Happy coding..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3974862944470956032?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3974862944470956032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3974862944470956032' title='15 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3974862944470956032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3974862944470956032'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/12/scrolling-table-table-with-horizontal.html' title='Scrolling Table :Table with horizontal Scrollbars and vertical scrollbars'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pm9lRhnES5k/S1s2pMWcAvI/AAAAAAAAAks/dE3Q9xMGHxk/s72-c/TABLS.JPG' height='72' width='72'/><thr:total>15</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-8716183970088904384</id><published>2009-12-18T00:54:00.000-08:00</published><updated>2010-06-09T01:18:22.905-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Blocking User on submit Action in a OAF page</title><content type='html'>This is one of the most frequently required feature in OAF page, in certain conditions. Basically our requirement is to block user from pressing a button twice, i.e.,if a button is pressed for the first time,till the time request processing is going on for the first request on server either the button should be disabled on page or an hourglass should be shown on the page, so that user should not be able to press it again to start another request, before this request's response has been received from server. This is very essential feature where&lt;br /&gt;&lt;br /&gt;1) You are lets say creating a account.&lt;br /&gt;2) Doing a transaction.&lt;br /&gt;3) Generating a report.&lt;br /&gt;4) Doing a transaction which takes significant amount of time which can make user impatient and press the button again.&lt;br /&gt;&lt;br /&gt;        The standard solution for this provided by OAF is setBlockOnEverySubmit API.Whenever a submit action takes place on a page, subsequent submits can be blocked. &lt;br /&gt;  When using a blocking on submit technique, when the submit action takes place, the cursor becomes busy and prevents any other submit action until the current submit event has been handled.       &lt;br /&gt;         The block on submit behavior is not enabled by default on a page. However, For Partial Page Refresh (PPR) events alone, it is enabled by default.&lt;br /&gt;        To implement the block on submit behavior on a specfic page, add the following code to the processRequest() of that page CO:&lt;br /&gt;&lt;br /&gt;import oracle.apps.fnd.framework.webui.beans.OABodyBean;&lt;br /&gt;&lt;br /&gt;public void processRequest(OAPageContext pageContext, OAWebBean webBean)&lt;br /&gt;{&lt;br /&gt;super.processRequest(pageContext, webBean);&lt;br /&gt;OAWebBean body = pageContext.getRootWebBean();&lt;br /&gt;if (body instanceof OABodyBean)&lt;br /&gt;{&lt;br /&gt;((OABodyBean)body).setBlockOnEverySubmit(true);&lt;br /&gt;}&lt;br /&gt;...&lt;br /&gt;...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;          But there are exceptions to this API functionality, what if my page has multiple buttons and I want this nature only on press of one of the button.Situations like this the standard solution is using OAProcessing page(See dev guide for OAProcessing page implementation, its explained well!), which is typically used in long running processed.But what if user is not ready to leave the page at all  and asks you to block the navigation somehow? What if you are mobile browser, where OAProcessing page does not work fine. Situations like this can be taken care through javascript. &lt;br /&gt;        I must repeat again, use this javascript solution only when your requirement is not fulfilled by standard setBlockOnEverySubmit API provided by framework.Ok here are the steps for the javascript solution, which will block the action by making the button disabled as soon as it is pressed and releasing it as soon as your action is finished :&lt;br /&gt;&lt;br /&gt;1) Add a button bean , instead of submit button bean. Lets say its id is "item1" in property inspector. Set destination uri property in property inspector as :&lt;br /&gt;javascript:document.getElementById('item1').disabled=true;submitForm('DefaultFormName',0,{'XXX':'Y'});&lt;br /&gt;&lt;br /&gt;2) In process form request, you can catch the event as :&lt;br /&gt;&lt;br /&gt;  public void processFormRequest(OAPageContext pageContext,&lt;br /&gt;                                 OAWebBean webBean)&lt;br /&gt;  {&lt;br /&gt;    super.processFormRequest(pageContext, webBean);&lt;br /&gt;   &lt;br /&gt;   .// the js button click event&lt;br /&gt;   // don't use pageContext.getParameter() API to get parameter values&lt;br /&gt;   // in R12 because its doing validation on JS paremeters.&lt;br /&gt;  // so,instead of getting parameter value from pagecontext&lt;br /&gt;  //getting directly from http request.  &lt;br /&gt; if(pageContext.getRenderingContext()&lt;br /&gt;    .getServletRequest().getParameter("XXX")!=null)&lt;br /&gt;    {&lt;br /&gt;     // ur button event logic in process form request&lt;br /&gt;      ......&lt;br /&gt;&lt;br /&gt;    //remove this parameter from http request&lt;br /&gt;     pageContext.removeParameter("XXX");&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;   I hope this helps to people which are facing such situations. Happy coding..!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-8716183970088904384?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/8716183970088904384/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=8716183970088904384' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8716183970088904384'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8716183970088904384'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/12/blocking-user-on-submit-action-in-oaf.html' title='Blocking User on submit Action in a OAF page'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-8348046037768556416</id><published>2009-12-15T23:10:00.000-08:00</published><updated>2010-06-09T01:21:23.577-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle Apps Generic'/><title type='text'>Migration of AOL setups from one instance to Another.</title><content type='html'>Hi All,&lt;br /&gt;          Typically this is the requirement of every Apps project whether its a upgrade/implementation/support. You might create AOL objects like profiles,alerts,AK regions etc. , here I am listing all the LDT commands  which will help you in migration.LDT download command extract the AOL object in a .ldt file and then u can put that in target instance and call upload LDT command to upload it in target instance.&lt;br /&gt;            I think there are numerous websites where this is listed, but still commands like ldt of alert, ak region is still hard to find. Hence, I am consolidating all of them at one place :&lt;br /&gt;&lt;br /&gt;function scripts&lt;br /&gt;------------------&lt;br /&gt;$FND_TOP/bin/FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct XXADAT_MAT_REQ_HIST.ldt FUNCTION FUNCTION_NAME=XXADAT_MAT_REQ_HIST&lt;br /&gt;&lt;br /&gt;$FND_TOP/bin/FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXADAT_MAT_REQ_HIST.ldt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;responsibility scripts&lt;br /&gt;------------------------&lt;br /&gt;FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscursp.lct XXADAT_PROD_TIME_BOOKING.ldt FND_RESPONSIBILITY RESP_KEY="XXADAT_PROD_TIME_BOOKING"&lt;br /&gt;&lt;br /&gt;$FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afscursp.lct file_name.ldt&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;menu scripts&lt;br /&gt;-------------&lt;br /&gt;FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afsload.lct AHL_PRD_MBENCH_USER_SUB_MENU.ldt MENU MENU_NAME="AHL_PRD_MBENCH_USER_SUB_MENU"&lt;br /&gt;&lt;br /&gt;$FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afsload.lct file_name.ldt&lt;br /&gt;&lt;br /&gt;lookup scripts&lt;br /&gt;--------------&lt;br /&gt;FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/aflvmlu.lct AHL_PRD_DEFERRAL_TYPE.ldt FND_LOOKUP_TYPE APPLICATION_SHORT_NAME ="XXADAT" LOOKUP_TYPE="AHL_PRD_DEFERRAL_TYPE"&lt;br /&gt;&lt;br /&gt;FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/aflvmlu.lct  XXADAT_NO_CONCURRENT_LOGIN_WOS.ldt&lt;br /&gt;&lt;br /&gt;ak region download script&lt;br /&gt;-------------------------------&lt;br /&gt;java oracle.apps.ak.akload apps apps THIN "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host = &lt; instance IP &gt; )(Port = 1541)) (CONNECT_DATA = (SID=DEV)))" DOWNLOAD XXADAT_EM_LOV.ldt GET CUSTOM_REGION AHL XXADAT_EM_LOV&lt;br /&gt;&lt;br /&gt;ak region upload script&lt;br /&gt;------------------------&lt;br /&gt;java oracle.apps.ak.akload apps apps THIN "(DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(Host = &lt; instance IP &gt; )(Port = 1620)) (CONNECT_DATA = (SID=RTST)))" UPLOAD XXADAT_EM_LOV.ldt UPDATE CUSTOM_REGION&lt;br /&gt;&lt;br /&gt;profile scripts&lt;br /&gt;---------------&lt;br /&gt;FNDLOAD apps/apps O Y DOWNLOAD $FND_TOP/patch/115/import/afscprof.lct XXADAT_BUDGET_MANHOURS_NROUTINE.ldt PROFILE PROFILE_NAME="XXADAT_BUDGET_MANHOURS_NROUTINE" APPLICATION_SHORT_NAME="XXADAT"&lt;br /&gt;&lt;br /&gt;FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afscprof.lct XXADAT_BUDGET_MANHOURS_ROUTINE.ldt&lt;br /&gt;&lt;br /&gt;message scripts&lt;br /&gt;----------------&lt;br /&gt;FNDLOAD apps/apps 0 Y DOWNLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXADAT_MIN_EXP_MSG.ldt FND_NEW_MESSAGES APPLICATION_SHORT_NAME="XXADAT" MESSAGE_NAME="XXADAT_MIN_EXP_MSG"&lt;br /&gt;&lt;br /&gt;FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afmdmsg.lct XXADAT_MIN_EXP_MSG.ldt &lt;br /&gt;&lt;br /&gt;CONCURRENT PROGRAM&lt;br /&gt;--------------------&lt;br /&gt;FNDLOAD apps/appsrtst O Y DOWNLOAD $FND_TOP/patch/115/import/afcpprog.lct XXADAT_CL_COMP_WO_F_VISIT.ldt PROGRAM APPLICATION_SHORT_NAME="XXADAT" CONCURRENT_PROGRAM_NAME="XXADAT_CL_COMP_WO_F_VISIT"&lt;br /&gt;&lt;br /&gt;FNDLOAD apps/apps O Y UPLOAD $FND_TOP/patch/115/import/afcpprog.lct XXADAT_CL_COMP_WO_F_VISIT.ldt&lt;br /&gt;&lt;br /&gt;alert&lt;br /&gt;------------&lt;br /&gt;FNDLOAD apps/apps 0 Y DOWNLOAD $ALR_TOP/patch/115/import/alr.lct XXADAT_INST_LOC_UPDATE.ldt ALR_ALERTS APPLICATION_SHORT_NAME='XXADAT' ALERT_NAME= 'XXADAT_INST_LOC_UPDATE'&lt;br /&gt;&lt;br /&gt;PS:This ldt command brings all alerts in the instance in the ldt file, so u need to remove all except the one u want to move.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;FNDLOAD apps/apps 0 Y UPLOAD $ALR_TOP/patch/115/import/alr.lct XXADAT_RESET_NR_TRACKING_NO_WHN_DEF.ldt&lt;br /&gt;&lt;br /&gt;Workflow Upload&lt;br /&gt;-----------------&lt;br /&gt;WFLOAD apps/apps 0 Y UPLOAD XXCLOSNR.wft&lt;br /&gt;&lt;br /&gt; In all these commands apps/apps is username/password of apps database user. Also, in all upload commands you can give full location from where your ldt/wft file should be picked to upload. I hope this helps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-8348046037768556416?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/8348046037768556416/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=8348046037768556416' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8348046037768556416'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8348046037768556416'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/12/migration-of-aol-setups-from-one.html' title='Migration of AOL setups from one instance to Another.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-9077947113571654049</id><published>2009-12-07T01:43:00.000-08:00</published><updated>2010-06-09T01:18:22.905-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Programatic PPR in OAF.</title><content type='html'>I was recently helping a friend in a customization in OAF, where through personalization, he wanted to put a ppr action in a seeded page in a seeded item. He was trying to do that customization using fire action, which was not acceptable by customer due to obvious reasons. Since, I think this section is missing in developers' guide, and is quite simple to approach, here is code you can write in process request of CO to attach programmatic PPR. lets take a simple example of attaching PPR to a message choice bean :&lt;br /&gt;&lt;br /&gt;//In Process Request() &lt;br /&gt;{&lt;br /&gt; //Please attach PPR only to those UIX beans which support it&lt;br /&gt; //otherwise it may not work&lt;br /&gt; OAMessageChoiceBean mcb=(OAMessageChoiceBean)webBean.findChildRecursive("&lt;id of bean&gt;");&lt;br /&gt;  FireAction firePartialAction = new FirePartialAction("empPositionChange");&lt;br /&gt;  mcb.setAttributeValue(PRIMARY_CLIENT_ACTION_ATTR,firePartialAction);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;//In process form request &lt;br /&gt;if ("empPositionChange".equals(pageContext.getParameter(OAWebBeanConstants.EVENT_PARAM)))    &lt;br /&gt;    {&lt;br /&gt;        //ur logic on PPR&lt;br /&gt;&lt;br /&gt;        //if PPR is attached in a table/hgrid child then we can find the row &lt;br /&gt;       //reference by&lt;br /&gt; String rowReference =pageContext.getParameter(OAWebBeanConstants.EVENT_SOURCE_ROW_REFERENCE);  &lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;I hope this helps. Happy oaf extensions :)!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-9077947113571654049?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/9077947113571654049/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=9077947113571654049' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/9077947113571654049'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/9077947113571654049'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/12/programatic-ppr-in-oaf.html' title='Programatic PPR in OAF.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1741210780828875553</id><published>2009-11-30T00:02:00.000-08:00</published><updated>2010-06-09T01:18:22.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Setting Query Dynamically in View Object. (Why in some cases even after using setQuery(), VO picks default query.)</title><content type='html'>Couple of time while making view object in OAF pages, you have conditions where instead of where clause or order by clause, you need to change the entire source of sql query of View Object. &lt;br /&gt;             There can be n number of such scenarios, for example you are using a querybean in a search page, and in a certain condition, you have to change your query, your VO is attached to a LOV and in certain condition you need the query to change in order to optimize the VO sql query etc. Following points always keep in mind while using setQuery():&lt;br /&gt;&lt;br /&gt;1) The new query you want to set in the view object should have same column name and types as the original VO query.&lt;br /&gt;&lt;br /&gt;2)As per OAF coding standards all coding related to setting where clause, order by clause or setQuery should be written in ViewObjectImpl class, so in such case, you should generate ViewObjectImpl class.&lt;br /&gt;&lt;br /&gt;3)&lt;span style="font-weight:bold;"&gt;Most Important :&lt;/span&gt;Always call &lt;span style="font-weight:bold;"&gt;vo.setFullSqlMode(FULLSQL_MODE_AUGMENTATION)&lt;/span&gt; before calling setquery() on the view object.This ensures that the order by or the WHERE clause, that is generated by OA Framework, can be correctly&lt;br /&gt;appended to your VO. The behavior with FULLSQL_MODE_AUGMENTATION is as follows:&lt;br /&gt;&lt;br /&gt;a) The new query that you have programmatically set takes effect when you call setQuery and execute the query.&lt;br /&gt;b) If you call setWhereClause or if a customer personalizes the criteria for your query region, BC4J augments the whereClause on the programmatic query that you set. &lt;br /&gt;&lt;br /&gt;For example:&lt;br /&gt;select * from (your programmatic query set through setQuery)&lt;br /&gt;where (your programmatic where clause set through setWhereClause)&lt;br /&gt;order by (your programmatic order set through setOrderBy)&lt;br /&gt;The same query is changed as follows if a customer adds a criteria using personalization:&lt;br /&gt;select * from (your programmatic query set through setQuery)&lt;br /&gt;where (your programmatic where clause set through setWhereClause) AND&lt;br /&gt;(additional personalization where clause)&lt;br /&gt;order by (your programmatic order set through setOrderBy)_&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Warning: If you do not set FULLSQL_MODE_AUGMENTATION, the whereClause and/or the&lt;br /&gt;orderBy, which was set programmatically, will not augment on the new query that you set using setQuery. It will instead augment on your design time VO query.&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Due to timing issues, always use the controller on the query region/LOV region while using setQuery().&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1741210780828875553?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1741210780828875553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1741210780828875553' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1741210780828875553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1741210780828875553'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/11/setting-query-dynamically-in-view.html' title='Setting Query Dynamically in View Object. (Why in some cases even after using setQuery(), VO picks default query.)'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1700441370909633580</id><published>2009-09-25T00:09:00.000-07:00</published><updated>2010-06-09T01:18:22.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Dynamically changing multiselect to single select in Table in OAF</title><content type='html'>I would like to share a small piece of code, which recently a friend shared with me, this is a typical requirement, which might look too trivial at first shot, but is quite easy to implement. Suppose you have a table where in you have a requirement to have single or multi selection based on a dynamic conditon eg, some selection or press of a button you wanna change the &lt;strong&gt;multiselection to single selection and vice versa&lt;/strong&gt;. &lt;br /&gt;&lt;br /&gt;       In such scenario, in the action of the event you redirect to same page and use following code in &lt;strong&gt;process request&lt;/strong&gt; on the base of parameter you set in session/pagecontext :&lt;br /&gt;// Hiding the Multiple Select Table Action and add single selection&lt;br /&gt;OAAdvancedTableBean tabBean = (OAAdvancedTableBean)webBean.&lt;br /&gt;findIndexedChildRecursive("[table item id]");&lt;br /&gt;&lt;br /&gt;//Since the multiselect is at the end, get the total count -1 for removing&lt;br /&gt;int count = tabBean.getIndexedChildCount(pageContext.getRenderingContext());&lt;br /&gt;System.out.println("Child Count "+count);&lt;br /&gt;tabBean.removeIndexedChild(count-1);&lt;br /&gt;&lt;br /&gt;OAMultipleSelectionBean sel = (OAMultipleSelectionBean)tabBean.getTableSelection();  &lt;br /&gt;OASingleSelectionBean singleSelection = new OASingleSelectionBean() ;&lt;br /&gt;singleSelection.setText("Select");&lt;br /&gt;&lt;br /&gt;//Set the attribute for the single select&lt;br /&gt;singleSelection.setViewAttributeName("SelectFlag");&lt;br /&gt;tabBean.setTableSelection(singleSelection);&lt;br /&gt;&lt;br /&gt; I hope this helps anybody who tries to implement such scenario!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1700441370909633580?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1700441370909633580/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1700441370909633580' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1700441370909633580'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1700441370909633580'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/09/dynamically-changing-multiselect-to.html' title='Dynamically changing multiselect to single select in Table in OAF'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-48181420431706335</id><published>2009-06-06T01:44:00.000-07:00</published><updated>2010-06-09T01:18:22.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Error while running a OAF page with 12.1.1 (jdeveloper patch 8431482</title><content type='html'>We recetly migrated to newly released on Oracle apps R12.1.1.We tried using jdeveloper with patch 8431482 which is mentioned in metalink Doc Id 416708.1.We got following error stack:&lt;br /&gt;Error Page &lt;br /&gt;Exception Details. &lt;br /&gt;oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.lang.NullPointerException; &lt;br /&gt;at oracle.apps.fnd.framework.OAException.wrapperException(Unknown Source)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(Unknown Source)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.createSession(Unknown Source)&lt;br /&gt;at _runregion._jspService(_runregion.java:132)&lt;br /&gt;at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)&lt;br /&gt;at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)&lt;br /&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)&lt;br /&gt;at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)&lt;br /&gt;at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)&lt;br /&gt;at java.lang.Thread.run(Thread.java:595)&lt;br /&gt;## Detail 0 ##&lt;br /&gt;java.lang.NullPointerException&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.recordSuccess(SessionManager.java:3820)&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.validateLogin(SessionManager.java:2082)&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.validateLogin(SessionManager.java:1946)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(Unknown Source)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.createSession(Unknown Source)&lt;br /&gt;at _runregion._jspService(_runregion.java:132)&lt;br /&gt;at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)&lt;br /&gt;at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)&lt;br /&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)&lt;br /&gt;at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)&lt;br /&gt;at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)&lt;br /&gt;at java.lang.Thread.run(Thread.java:595)&lt;br /&gt;java.lang.NullPointerException&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.recordSuccess(SessionManager.java:3820)&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.validateLogin(SessionManager.java:2082)&lt;br /&gt;at oracle.apps.fnd.security.SessionManager.validateLogin(SessionManager.java:1946)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.getEncryptedSessId(Unknown Source)&lt;br /&gt;at oracle.apps.fnd.framework.CreateIcxSession.createSession(Unknown Source)&lt;br /&gt;at _runregion._jspService(_runregion.java:132)&lt;br /&gt;at com.orionserver.http.OrionHttpJspPage.service(OrionHttpJspPage.java:59)&lt;br /&gt;at oracle.jsp.runtimev2.JspPageTable.service(JspPageTable.java:462)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.internalService(JspServlet.java:594)&lt;br /&gt;at oracle.jsp.runtimev2.JspServlet.service(JspServlet.java:518)&lt;br /&gt;at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)&lt;br /&gt;at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)&lt;br /&gt;at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)&lt;br /&gt;at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:239)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:34)&lt;br /&gt;at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:880)&lt;br /&gt;at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:298)&lt;br /&gt;at java.lang.Thread.run(Thread.java:595)&lt;br /&gt;&lt;br /&gt;We raised an SR with Oracle and they have responded back saying : Set profile "Sign-On:Notification" to "No" at site level, which resloves the issue and jdev works fine.&lt;br /&gt;Hope this helps all, which are trying to use patch 8431482 for Apps 12.1.1.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-48181420431706335?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/48181420431706335/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=48181420431706335' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/48181420431706335'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/48181420431706335'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/06/error-while-running-oaf-page-with-1211.html' title='Error while running a OAF page with 12.1.1 (jdeveloper patch 8431482'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-6578827623025791954</id><published>2009-06-05T13:25:00.000-07:00</published><updated>2010-06-09T01:18:22.906-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Custom Logging in Java Layer in Oracle Applications R12</title><content type='html'>Hi All,&lt;br /&gt;         I have often felt for years simple SOP (System.out.Println) is the best way of debugging in java/j2ee applications. I have the evil habit.. of putting lots of SOPs while writing code for OAF or ADF or simple j2ee applications. I generally create a method with sop in it eg:&lt;br /&gt;&lt;br /&gt;private void putLog(Object o)&lt;br /&gt;{&lt;br /&gt; System.out.println(o);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; and call it with the code wherever required. The benefit is at the point of deployment of code, i just need to change this method from sop to writeDiagnostics().The worst part of diagnostic logging is when you enable logging on the Applications... "Show Log On Screen", it shows so many logs apart from my custom log statements, that its really difficult to debug.&lt;br /&gt;&lt;br /&gt;                The other standard way of debugging java code on server is using OACore log in OC4J server.In R12,&lt;br /&gt;Goto $ORA_CONFIG_HOME/10.1.3/opmn/conf&lt;br /&gt;take the backup of opmn.xml&lt;br /&gt;edit opmn.xml for data id="java-options" and add the following:&lt;br /&gt;-DAFLOG_ENABLED=true -DAFLOG_LEVEL=statement &lt;br /&gt;-DAFLOG_MODULE=fnd% &lt;br /&gt;-DAFLOG_FILENAME=/tmp/aflog.txt -Djbo.debugoutput=console &lt;br /&gt;&lt;br /&gt;The log message should get written in,&lt;br /&gt;$INST_TOP/logs/ora/10.1.3/opmn/oacore_default_group_1/oacorestd.out &lt;br /&gt;&lt;br /&gt;         But for this my code should contain SOPs, which is also a problem, because I don't wanna SOPs in my code after deployment on server, as SOPs have huge impact on performance.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;So, I need a way (probably a magic .... :) )that my debug statements become SOPs  when I run my code in jdeveloper automatically, and when I run the same code in server, these statements should go in a text file if I enable  logging on server, lets' say we make it dependent on a profile , so that I  can also disable these statements/logging  in production just by changing profile value.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;  Ok so make this magic or logic happen I used a trick and have written a custom logger class with &lt;strong&gt;static methods&lt;/strong&gt;, let see how this class works.Ok for making this logging happen follow these steps:&lt;br /&gt;&lt;br /&gt;STEP1&lt;br /&gt;-------------&lt;br /&gt;&lt;strong&gt;Copy this class and put in any pkg under custom directory in java top, like I have used &lt;strong&gt;package xx.oracle.apps.ak.logging&lt;/strong&gt;. Replace this pkg name with the pkg u want to put this class in.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;package xx.oracle.apps.ak.logging;&lt;br /&gt;&lt;br /&gt;import java.awt.Toolkit;&lt;br /&gt;import java.io.FileNotFoundException;&lt;br /&gt;import java.io.FileOutputStream;&lt;br /&gt;import java.io.PrintStream;&lt;br /&gt;import oracle.apps.fnd.framework.OAException;&lt;br /&gt;import oracle.apps.fnd.framework.server.OADBTransaction;&lt;br /&gt;import oracle.apps.fnd.framework.webui.OAPageContext;&lt;br /&gt;import java.io.PrintWriter;&lt;br /&gt;import oracle.apps.fnd.common.WebAppsContext;&lt;br /&gt;public class XxLogger&lt;br /&gt;{&lt;br /&gt;  public XxLogger()&lt;br /&gt;  {&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void putLog(OADBTransaction ot, Object o)&lt;br /&gt;  {&lt;br /&gt;    printLog(ot, null, null, null, o);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void putLog(OAPageContext pageContext, Object o)&lt;br /&gt;  {&lt;br /&gt;    printLog(null, null, pageContext, null, o);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void putLog(WebAppsContext ctx, Object o)&lt;br /&gt;  {&lt;br /&gt;    printLog(null, ctx, null, null, o);&lt;br /&gt;&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;  public static void printLog(OADBTransaction ot, WebAppsContext ctx, &lt;br /&gt;                              OAPageContext pageContext, Exception exp, &lt;br /&gt;                              Object o)&lt;br /&gt;  {&lt;br /&gt;    FileOutputStream outFile = null;&lt;br /&gt;    try&lt;br /&gt;    {&lt;br /&gt;      //this line should throw headless exception on server&lt;br /&gt;      //due to opmn.xml configuration for oc4j node.&lt;br /&gt;      //and would work fine in local jdev&lt;br /&gt;      Toolkit.getDefaultToolkit().getScreenSize();&lt;br /&gt;      if (o == null)&lt;br /&gt;      {&lt;br /&gt;        exp.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;      else&lt;br /&gt;      {&lt;br /&gt;        System.out.println(o);&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;    catch (Exception e)&lt;br /&gt;    {&lt;br /&gt;      try&lt;br /&gt;      {&lt;br /&gt;        String profile = null;&lt;br /&gt;        if (ot != null)&lt;br /&gt;        {&lt;br /&gt;          profile = ot.getProfile("XX_LOG");&lt;br /&gt;        }&lt;br /&gt;        else if (pageContext != null)&lt;br /&gt;        {&lt;br /&gt;          profile = pageContext.getProfile("XX_LOG");&lt;br /&gt;        }&lt;br /&gt;        else if (ctx != null)&lt;br /&gt;        {&lt;br /&gt;          profile = ctx.getProfileStore().getProfile("XX_LOG");&lt;br /&gt;        }&lt;br /&gt;        if ((profile == null) || ("".equals(profile)))&lt;br /&gt;        {&lt;br /&gt;          //No logging &lt;br /&gt;&lt;br /&gt;        }&lt;br /&gt;        else&lt;br /&gt;        {&lt;br /&gt;          outFile = new FileOutputStream(profile + "/xx_log.log", true);&lt;br /&gt;          PrintStream ps = new PrintStream(outFile);&lt;br /&gt;&lt;br /&gt;          if (exp != null)&lt;br /&gt;          {&lt;br /&gt;            ps.append(new java.util.Date().toString() + " : " + &lt;br /&gt;                      "*************************************Exception Details*****************************");&lt;br /&gt;            ps.append(" \n ");&lt;br /&gt;            exp.printStackTrace(ps);&lt;br /&gt;            ps.append("*************************************Exception Details End *****************************");&lt;br /&gt;&lt;br /&gt;          }&lt;br /&gt;          else&lt;br /&gt;          {&lt;br /&gt;            ps.append(new java.util.Date().toString() + " : " + o);&lt;br /&gt;          }&lt;br /&gt;          ps.append(" \n ");&lt;br /&gt;        }&lt;br /&gt;      }&lt;br /&gt;      catch (FileNotFoundException f)&lt;br /&gt;      {&lt;br /&gt;        // TODO&lt;br /&gt;        e.printStackTrace();&lt;br /&gt;      }&lt;br /&gt;    }&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public static void printStack(OADBTransaction ot, Exception e)&lt;br /&gt;  {&lt;br /&gt;    printLog(ot, null, null, e, null);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public static void printStack(WebAppsContext ctx, Exception e)&lt;br /&gt;  {&lt;br /&gt;    printLog(null, ctx, null, e, null);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;  public static void printStack(OAPageContext pageContext, Exception e)&lt;br /&gt;  {&lt;br /&gt;    printLog(null, null, pageContext, e, null);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;STEP2&lt;br /&gt;----------    &lt;br /&gt;Now create a custom profile which will store path of log file we want to get generated,please note if this profile value is null then no log will be generated.Replace the profile name with "XX_LOG" in the code at all 3 places.&lt;br /&gt;&lt;br /&gt;STEP3&lt;br /&gt;========&lt;br /&gt;set the profile value to the path where you wanna log file to be generated.Also please note you would have to manually create "xx_log.log" file there for the first time(for that just create a simple fie and rename as "xx_log.log"), this I have done purposely in code, so that even if by mistake profile value is not null in production, no log should be generated.&lt;br /&gt;&lt;br /&gt;STEP 4&lt;br /&gt;===========&lt;br /&gt;Use this logging in OAF/JTT/JTF/JSP file :&lt;br /&gt;&lt;br /&gt;In CO&lt;br /&gt;========&lt;br /&gt;XxLogger.putLog(OAPageContext pageContext, Object o)&lt;br /&gt;&lt;br /&gt;In AM,VO,EO&lt;br /&gt;============&lt;br /&gt;XxLogger.putLog(OADBTransaction ot, Object o)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In JTT/JTF&lt;br /&gt;============&lt;br /&gt;import oracle.apps.fnd.common.WebRequestUtil;&lt;br /&gt;import oracle.apps.fnd.common.WebAppsContext;&lt;br /&gt;WebAppsContext ctx = WebRequestUtil.validateContext(request, response);&lt;br /&gt;XxLogger.putLog(WebAppsContext ctx, Object o)&lt;br /&gt;&lt;br /&gt;STEP 5&lt;br /&gt;===========&lt;br /&gt;For printing stacktrace of exceptions :&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In CO&lt;br /&gt;========&lt;br /&gt;XxLogger.printStack(OAPageContext pageContext, Exception e)&lt;br /&gt;&lt;br /&gt;In AM,VO,EO&lt;br /&gt;============&lt;br /&gt;XxLogger.printStack(OADBTransaction ot, Exception e)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In JTT/JTF&lt;br /&gt;============&lt;br /&gt;import oracle.apps.fnd.common.WebRequestUtil;&lt;br /&gt;import oracle.apps.fnd.common.WebAppsContext;&lt;br /&gt;WebAppsContext ctx = WebRequestUtil.validateContext(request, response);&lt;br /&gt;XxLogger.printStack(WebAppsContext ctx, Exception e)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;We are done the log would now be generated at the position marked in profile and the these messages will automatically converted to SOPs when you run your code in local jdev&lt;br /&gt;&lt;br /&gt;Advantages of this logging&lt;br /&gt;=============================&lt;br /&gt;1) You don't need to change your code again and again while working in local or deployed on server.&lt;br /&gt;2) If the development is done in a team, everybody in the team can set the profile at his/her user level so that different log is generated for each user.&lt;br /&gt;3)This code when run in jdeveloper without any change all putLog() and printStack() statements will convert into System.out.println.&lt;br /&gt;4) On server if profile value is set to null , no log is generated, else if some location is set, log is generated there.&lt;br /&gt;5) Same class can be used in all OAF AND JSP components.&lt;br /&gt;6) All methods putLog and printStack are static, so you need not instanciate the class, direct call of method will work.&lt;br /&gt;7) Sometimes while working at offshore, you don't have access to DBA, who can enable log.... :) this is my personal one... u might not face it.&lt;br /&gt;&lt;br /&gt;Logic of how code works&lt;br /&gt;=========================&lt;br /&gt;If you have read the code of class , in all the methods code essentially calls printLog method, which has the first line as&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Toolkit.getDefaultToolkit().getScreenSize();&lt;/strong&gt;&lt;br /&gt;This line throws headless exception on server mainly because opmn.xml file configuration by default throws headless exception if any JAVA awt api is called, but this line works fine in jdev, so we utilise this logic to identify whether the code is running on server or jdev. Accordingly it writes the statements in a file, if file is enabled or else calls SOP in jdev.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-6578827623025791954?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/6578827623025791954/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=6578827623025791954' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6578827623025791954'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6578827623025791954'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/06/custom-logging-in-java-layer-in-oracle.html' title='Custom Logging in Java Layer in Oracle Applications R12'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1112594849213166417</id><published>2009-04-06T01:01:00.000-07:00</published><updated>2010-06-09T01:18:22.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>MOAC(Multi Org Access Control) in OA Framework</title><content type='html'>Hi All,&lt;br /&gt;           After a long time a small and crisp article of how you can set MOAC in your custom OAF code. With release of R12 Oracle EBS has introduced a security feature in apps for multi -org access. Lets have a quick introduction of what is MOAC all abaout :&lt;br /&gt;&lt;br /&gt;What is MOAC ?&lt;br /&gt;---------------&lt;br /&gt;The Access Control feature in Release 12 allows the user to enter or query records in one or more operating units without changing application responsibility. It is the system administrator’s discretion to either implement the feature or use the same multiple organizations profile option setting available before Release 12 by using the single operating unit mode (i.e. one operating unit for a responsibility).&lt;br /&gt;In Release 12, the multiple organizations context value is no longer initialized by the FND_GLOBAL.APPS_INITIALIZE routine thereby reducing unnecessary context setting and resource consumption for applications that do not use operating unit context for data security.&lt;br /&gt;To use the single operating unit mode, you must set the value for the "Initialization SQL Statement – Custom profile" to "mo_global.init('S',null);". This initializes the operating unit context based on the "MO: Operating Unit" profile option and the "MO: Security Profile" profile option must not be set.&lt;br /&gt;Fresh install of Release 12 Application is enabled with multiple organizations, however, the system administrator must create operating units to use multi organizations sensitive application products. The user can create new operating units in the Accounting Setup Manager page in addition to HRMS’s Define Organizations page.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;MOAC Implementation In Apps&lt;br /&gt;-----------------------------&lt;br /&gt;A new or fresh installation of an Oracle Applications instance does not automatically enable multiple organizations. Typically, the system administrator defines "MO: Operating Unit" profile at Responsibility and/or User level. The "organization_id" of the "MO: Operating Unit" profile option value filters the transactional data. The CLIENT_INFO application context space stores the multiple organizations context value.&lt;br /&gt;Multi-Org views use the following WHERE clause to filter application records:&lt;br /&gt;'org_id = substrb(userenv(''CLIENT_INFO''),1,10)' &lt;br /&gt;&lt;br /&gt;MOAC in terms of OAF:&lt;br /&gt;----------------------&lt;br /&gt;                         Its very natural while developing extension or developing OAF custom pages , you may require quering of views, synonyms which use MOAC via VO.Also, it is possible that you might be calling some standard Oracle PL/SQL APIs which usually need MOAC context to be set.&lt;br /&gt;&lt;br /&gt;           Every transaction that requires multiple organizations must call the Multiple Organizations initialization in the root Application Module (AM).&lt;br /&gt;Use the following declarative mechanism to initialize the multiple organizations settings for application teams to implement multiple organizations:&lt;br /&gt;1. To enable multiple organizations for the root application module , go to the BC4J Application Module wizard - Properties section and specify the property as MULTIORG_ENABLED and value as either S (single operating unit mode) or M (Multiple operating unit mode). &lt;br /&gt;2. Click Add, then Apply or OK. &lt;br /&gt;On specifying this property, the OA Framework automatically initializes the multiple organizations context at the following appropriate program event points:&lt;br /&gt;1. When reserving or activating the application module. &lt;br /&gt;2. When initializing or validating the Oracle Applications user session. &lt;br /&gt;You initialize the context once for each transaction and session and not instantiate for every page. If your transaction retains the root AM, then the above steps are the easiest to initialize multiple organizations.&lt;br /&gt;&lt;br /&gt;If a transaction has multiple pages and the root AM is not retained, then you must call the method OADBTransaction.setMultiOrgAccess to initialize the multiple organizations context to help the user select an operating unit for a transaction.Here is how u can code in AM&lt;br /&gt;OADBTransactionImpl trx = (OADBTransactionImpl)getOADBTransaction();  getOADBTransaction().setMultiOrgAccess(String.valueOf(trx.getOrgId()),String.valueOf(trx.getSecurityProfileId()),trx.getApplicationShortName());&lt;br /&gt;   &lt;br /&gt;&lt;br /&gt;&lt;br /&gt; If the operating unit the user selected must appear in the subsequent pages, then pass the curr_org_id to the page and use OADBTransaction.setMultiOrgPolicyContext method to set the operating unit context for the pages that need multiple organizations.&lt;br /&gt;OADBTransactionImpl trx = (OADBTransactionImpl)getOADBTransaction();  &lt;br /&gt;getOADBTransaction().setMultiOrgPolicyContext("S",trx.getMultiOrgCurrentOrgId());&lt;br /&gt;&lt;br /&gt;   There is often a case when you create a custom application in apps under $JAVA_TOP, in order to keep all your customizations, lets say XXABC.When we make a new application in Apps like XXABC, we need to register the application for Multi-Org as single or multiple.&lt;br /&gt;       This is important, if we are defining new custom responsibilities on this application and we are planning to have custom, as well as seeded pages attached in this responsibility.If you have this scenario, where you custom responsibility is defined on custom application and it is using seeded pages as well as custom pages, you may face a error in your multi-org enabled seeded AM pages like :&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;oracle.apps.fnd.framework.OAException: Application: FND, Message Name: FND_GENERIC_MESSAGE. Tokens: MESSAGE = java.sql.SQLException: ORA-20001: SQL_PLSQL_ERROR: N, ROUTINE, MO_GLOBAL.INIT, N, ERRNO, -20001, N, REASON, ORA-20001: SQL_PLSQL_ERROR: N, ROUTINE, MO_GLOBAL.SET_ORG_ACCESS, N, ERRNO, -20001, N, REASON, ORA-20001: APP-FND-02938: Multi-organization routine failed to initialize a session for the product: &amp;PRODUCT. Please inform your support representative.&lt;br /&gt;ORA-06512: at "APPS.FND_MESSAGE", line 509&lt;br /&gt;ORA-06512: at "APPS.MO_GLOBAL", line 36&lt;br /&gt;ORA-06512: at "APPS.MO_GLOBAL", line 757&lt;br /&gt;ORA-06512: at "APPS.MO_GLOBAL", line 700&lt;br /&gt;ORA-06512: at line 1 &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;         The reason for this error is Oracle Apps &lt;span style="font-weight:bold;"&gt;seeded&lt;/span&gt; pages which have AM with multi-org enabled,if you will check the AM xml file , they use MULTIORG_ENABLED as &lt;span style="font-weight:bold;"&gt;Y&lt;/span&gt;  and not as &lt;span style="font-weight:bold;"&gt;S &lt;/span&gt;or &lt;span style="font-weight:bold;"&gt;M&lt;/span&gt; . This is because in Apps, you can directly register an application with multi-org enabled in table fnd_mo_product_init by using API :&lt;br /&gt;--  To enable MO access in a custom application:&lt;br /&gt;begin &lt;br /&gt;FND_MO_PRODUCT_INIT_PKG.register_application('XXABC','SEED','N');&lt;br /&gt;end;&lt;br /&gt;&lt;br /&gt;    Since, seeded applications are already registered here, its not a problem, when you run seeded pages because MULTIORG_ENABLED=Y in AM sets correct  multi org access, but in case of custom application/responsibility based on custom application running seeded pages throws error, because the custom application XXABC is not registered in table fnd_mo_product_init. Hence , in order to run both seeded pages and custom pages fine i.e. code work correctly in case of MULTIORG_ENABLED=Y (used by seeded pages)  or MULTIORG_ENABLED=S/M (custom pages), register the custom application using the FND_MO_PRODUCT_INIT_PKG.register_application API.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1112594849213166417?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1112594849213166417/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1112594849213166417' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1112594849213166417'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1112594849213166417'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/04/moacmulti-org-access-control-in-oa.html' title='MOAC(Multi Org Access Control) in OA Framework'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-2808067051928045119</id><published>2009-01-07T10:40:00.000-08:00</published><updated>2010-06-09T01:17:25.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF 10G'/><title type='text'>ADF 10g : How to show faces message both globally and below the UI component.</title><content type='html'>Hi all,&lt;br /&gt;         Welcome again,  after a long time I am finally back on blogging.. in the time of economy recession!I think I was not able to update my blog from almost last 7-8 months because of various resons, joining new company, working new technologies of Oracle Fusion and working on multiple projects simultaneously.&lt;br /&gt;&lt;br /&gt;        In the past 6 months i have worked as an architect on two ADF 10G projects.  When I compare ADF with my OA Framework experience, I  find ADF to be much more challenging as well as flexible to mold as per the requirement in your project.&lt;br /&gt;&lt;br /&gt;     From now I would be coming up with small articles on ADF which will be helpful, to develop  useful APIs by product architects, so that other developers would be able to use  them , without worrying about the actual implementation.&lt;br /&gt;&lt;br /&gt;           One task in ADF which looks very easy, is showing of different jsf messages.One great feature of ADF is that Faces messages can be shown globally at the top of page, as well as just below  the UI ADF bean, which is very illustrative for users. &lt;br /&gt;&lt;br /&gt;CASE I:Showing Global Message in an ADF page&lt;br /&gt;-----------------------------------------------&lt;br /&gt;1)af:messages tag is used for showing global messages in an ADF page.This tag is created automatically whenever you drop an input widget from the&lt;br /&gt;Data Control Palette. However, if you need to insert the tag, simply insert the&lt;br /&gt;following code within the afh:body tag:&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/Se9_HsQFpsI/AAAAAAAAAfc/IvnT8j-nUc8/s1600-h/a.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;width: 321px; height: 78px;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/Se9_HsQFpsI/AAAAAAAAAfc/IvnT8j-nUc8/s400/a.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5327616654317037250" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2. In the Property Inspector set the following attributes:&lt;br /&gt;■ globalOnly: By default ADF Faces displays global messages (i.e., messages&lt;br /&gt;that are not associated with components) followed by individual component&lt;br /&gt;messages. If you wish to display only global messages in the box, set this&lt;br /&gt;attribute to true. Component messages will continue to display with the&lt;br /&gt;associated component.&lt;br /&gt;■ message: The main message text that displays just below the message box&lt;br /&gt;title, above the list of individual messages.&lt;br /&gt;■ text: The text that overrides the default title of the message box.&lt;br /&gt;&lt;br /&gt;Code for displaying global Faces message :&lt;br /&gt;    //You need to enter  error description&lt;br /&gt;    String error_decp="";&lt;br /&gt;    //You need to enter error detail&lt;br /&gt;    String error_detail="";&lt;br /&gt;    //Get current instance of faces context&lt;br /&gt;    FacesContext fc = FacesContext.getCurrentInstance();&lt;br /&gt;    //Creating faces message with description and detail&lt;br /&gt;    FacesMessage message = new FacesMessage(error_descp, error_detail);&lt;br /&gt;    //setting severity of message,i.e. message type&lt;br /&gt;      message.setSeverity(FacesMessage.SEVERITY_ERROR);&lt;br /&gt;   //Adding message to faces context.&lt;br /&gt;    fc.addMessage(null, message);&lt;br /&gt;&lt;br /&gt;CASE II:Showing Faces Message in an ADF UI COMPONENT along with global error message:&lt;br /&gt;-----------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;a)JSF Validator :&lt;br /&gt;-------------------&lt;br /&gt;                  This approcah is typically used when you have same kind of validation repeatdly in your code. Lets take a very generic example you need to verify that the entered number  should have precision of 2 decimal places, i.e. whatever number user enters should have  2 digits after decimal.You can write a jsf validator for this register in the application and use in any othe pages. If you are new to JSF validator just search google you will find numerous examples of how to write a JSF validator.&lt;br /&gt;                  &lt;br /&gt;   &lt;br /&gt; &lt;br /&gt;b) Directly adding message with UI component based of custom code in backing bean:&lt;br /&gt;   --------------------------------------------------------------------------------   &lt;br /&gt;&lt;br /&gt;i)In complex data UI components like table:      &lt;br /&gt;  --------------------------------------------&lt;br /&gt;String global_error="";   //Error that need to be shown at top of the page&lt;br /&gt;String component_error="";//Error that need to be shown on the component&lt;br /&gt;String formId="";// Id of Form bean&lt;br /&gt;String TableId="";//Id of table bean&lt;br /&gt;String rowIndex="";//String value of row index&lt;br /&gt;String message="";//message type&lt;br /&gt;&lt;br /&gt;FacesContext fc = FacesContext.getCurrentInstance();&lt;br /&gt;FacesMessage message = new FacesMessage(global_error, component_error);&lt;br /&gt;message.setSeverity(FacesMessage.SEVERITY_ERROR);&lt;br /&gt;fc.addMessage(formId+":"+TableId+":"+String.valueOf(rowIndex)+":"+ComponentId, message);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ii)In simple data UI components like input text:&lt;br /&gt;   ---------------------------------------------&lt;br /&gt;FacesContext fc = FacesContext.getCurrentInstance();&lt;br /&gt;FacesMessage message = new FacesMessage(global_error, component_error);&lt;br /&gt;message.setSeverity(FacesMessage.SEVERITY_ERROR);&lt;br /&gt;fc.addMessage(formId+":"+ComponentId, message);&lt;br /&gt;&lt;br /&gt;I hope the above article has provided a brief description about how to show global and UI specific messages , you can use in ADF via JSF APIs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-2808067051928045119?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/2808067051928045119/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=2808067051928045119' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2808067051928045119'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2808067051928045119'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2009/01/adf-10g-how-to-show-faces-message-both.html' title='ADF 10g : How to show faces message both globally and below the UI component.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pm9lRhnES5k/Se9_HsQFpsI/AAAAAAAAAfc/IvnT8j-nUc8/s72-c/a.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-7401258653046030391</id><published>2008-07-16T10:50:00.000-07:00</published><updated>2010-06-09T01:18:22.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Hide "Privacy Link" and "Copy right information" from dialog page!</title><content type='html'>Explaination By Kali:&lt;br /&gt;&lt;br /&gt;Try the following,&lt;br /&gt;Login with the user who has functional administrator and goto pesonalization tab,&lt;br /&gt;query the document path,&lt;br /&gt;/oracle/apps/fnd/framework/webui/OAFooter&lt;br /&gt;press go, once you get the doc name /oracle/apps/fnd/framework/webui/OAFooter&lt;br /&gt;click on Personalize Page icon,&lt;br /&gt;&lt;br /&gt;Clear all other default values and uncheck the site check box, &lt;br /&gt;and select OAFWK_DIALOG_PG in Function.&lt;br /&gt;Then apply,&lt;br /&gt;&lt;br /&gt;You will get personalization struction the /oracle/apps/fnd/framework/webui/OAFooter at Function OAFWK_DIALOG_PG level,&lt;br /&gt;&lt;br /&gt;Now change the rendered propertly to false for Privacy Link and Copy right.&lt;br /&gt;&lt;br /&gt;Then check the dialog page.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-7401258653046030391?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/7401258653046030391/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=7401258653046030391' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7401258653046030391'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7401258653046030391'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/07/hide-privacy-link-and-copy-right.html' title='Hide &quot;Privacy Link&quot; and &quot;Copy right information&quot; from dialog page!'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-6023574191779242795</id><published>2008-07-06T19:22:00.000-07:00</published><updated>2010-06-09T01:18:22.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Creation Of the Anonymous page Introduction( By Kalimuthu Vellaichamy,Senior Consultant,Oracle )</title><content type='html'>1.1 Purpose&lt;br /&gt;This document explains the OAFramework (ver 5.7 H for Apps 11.5.9 and 5.10 for Apps 11.5.10) Anonymous User page (like registration page) development and deployment in an instance and pack for the other instances.&lt;br /&gt;This document assumes that the reader has a basic knowledge of OA Frmework page creation and deployment.&lt;br /&gt;&lt;br /&gt;1.2 Background&lt;br /&gt;This document should be used for creating Guest User pages and all type of registration pages. When this document fails to cover a topic, recommendations from OA Framework Development Team should be followed. If you have a Guest user page to display that does not require a user to log in.&lt;br /&gt;&lt;br /&gt;1.3 Related Documents&lt;br /&gt;1. OA Framework Developers’ Guide&lt;br /&gt;2 Creation Of the Anonymous page&lt;br /&gt;&lt;br /&gt;2.1 New page with anonymous user setup.&lt;br /&gt;&lt;br /&gt;To create a page with anonymous setup we should have a standard OAFramework page with all the components required for the page.&lt;br /&gt;We have to create the function for this page.&lt;br /&gt; Let us consider a Registration page NewEmpRegistrationPG.xml and the registered function for this page is NEW_EMP_REGN.&lt;br /&gt;We have to change the following properties for the MainRN for the page.&lt;br /&gt;Rendered: ${oa.FunctionSecurity. NEW_EMP_REGN}&lt;br /&gt;Security Mode: selfSecured&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_pm9lRhnES5k/SHQfL3K44iI/AAAAAAAAAWM/No4d5Lzb5DI/s1600-h/1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_pm9lRhnES5k/SHQfL3K44iI/AAAAAAAAAWM/No4d5Lzb5DI/s400/1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220832156677890594" /&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Use the following command to upload the page to the instance,&lt;br /&gt;java oracle.jrad.tools.xml.importer.XMLImporter &lt;PageName&gt; -username &lt;APPS Username&gt; -password &lt;APPS Password&gt; -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=&lt;DB_HOSTNAME&gt;)(PORT=&lt;DB_PORT&gt;))(CONNECT_DATA=(SID=&lt;DB_SID&gt;)))" -rootdir ./ -rootPackage &lt;fullpacakage&gt;&lt;br /&gt;&lt;br /&gt;Example. &lt;br /&gt;java oracle.jrad.tools.xml.importer.XMLImporter NewEmpRegistrationPG.xml -username apps -password apps -dbconnection "(DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=I3SN021E.idc.oracle.com)(PORT=1610))(CONNECT_DATA=(SID=scmtrng)))" -rootdir ./ -rootPackage /xxt/oracle/apps/pon/registration/webui&lt;br /&gt;&lt;br /&gt;2.2 Create a function for the new page&lt;br /&gt;Use functional administrator (Self Service) or using system administrator (Forms) responsibility and create a function for the uploaded page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQfbumnirI/AAAAAAAAAWU/Q-9BndbKELQ/s1600-h/2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQfbumnirI/AAAAAAAAAWU/Q-9BndbKELQ/s400/2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220832429256182450" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_pm9lRhnES5k/SHQfpva4suI/AAAAAAAAAWc/1FUD5utWkSg/s1600-h/3.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_pm9lRhnES5k/SHQfpva4suI/AAAAAAAAAWc/1FUD5utWkSg/s400/3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220832669993579234" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;After the function creation we have to add this function to a menu and the menu has to be granted to GUEST user.&lt;br /&gt;&lt;br /&gt;2.3 Add the function to a new menu&lt;br /&gt;Use fuctional administrator responsibility to create a new Menu. Add the created function with this new menu. &lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQfy2oWlPI/AAAAAAAAAWk/msilFtOBeyQ/s1600-h/4.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQfy2oWlPI/AAAAAAAAAWk/msilFtOBeyQ/s400/4.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220832826547934450" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_pm9lRhnES5k/SHQf_5IlhMI/AAAAAAAAAWs/opiTP1sINdM/s1600-h/5.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_pm9lRhnES5k/SHQf_5IlhMI/AAAAAAAAAWs/opiTP1sINdM/s400/5.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220833050558301378" /&gt;&lt;/a&gt; &lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Now we are ready with the menu that is having a function, which points to a page which we want to access without the user log in.&lt;br /&gt;If you want to give access to more than one page you can add, as many functions to the menu, like below.&lt;br /&gt;&lt;a href="http://bp0.blogger.com/_pm9lRhnES5k/SHQgkPKqbqI/AAAAAAAAAW0/yvExoMNvOMo/s1600-h/6.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp0.blogger.com/_pm9lRhnES5k/SHQgkPKqbqI/AAAAAAAAAW0/yvExoMNvOMo/s400/6.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220833674947882658" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2.4 Create Grant for the created menu.&lt;br /&gt;To create Grant for the menu we have created now, use Security Tab in the functional administrator responsibility. Follow the below mentioned steps.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_pm9lRhnES5k/SHQg1OjPqiI/AAAAAAAAAW8/Gl9SzyP48xE/s1600-h/7.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_pm9lRhnES5k/SHQg1OjPqiI/AAAAAAAAAW8/Gl9SzyP48xE/s400/7.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220833966840326690" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Step I: Log on to Application with Functional Administrator Responsibility and click on functional administrator responsibility.  Click on “Create Grant” button (To create a Global Grant)&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_pm9lRhnES5k/SHQhENXMfuI/AAAAAAAAAXE/sHDFVNl2-cM/s1600-h/8.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_pm9lRhnES5k/SHQhENXMfuI/AAAAAAAAAXE/sHDFVNl2-cM/s400/8.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220834224219389666" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Step II: Enter the Grant Name and select Grantee Type as “All Users” and click “Next”&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQhQ78WoYI/AAAAAAAAAXM/YHzHGotMjFA/s1600-h/9.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQhQ78WoYI/AAAAAAAAAXM/YHzHGotMjFA/s400/9.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220834442881704322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Step III: Enter the User Menu Name of the newly created Menu and click “Next”&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQhYT2UJFI/AAAAAAAAAXU/KEUR4YVbwtQ/s1600-h/10.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQhYT2UJFI/AAAAAAAAAXU/KEUR4YVbwtQ/s400/10.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220834569557910610" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Step IV : Click “Finish” button&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_pm9lRhnES5k/SHQhpbUyfZI/AAAAAAAAAXc/dNmzBFLntvw/s1600-h/11.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_pm9lRhnES5k/SHQhpbUyfZI/AAAAAAAAAXc/dNmzBFLntvw/s400/11.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220834863622552978" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;Step V: Again click on “Create Grant” (To create Guest Grant)&lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQh7mGPB-I/AAAAAAAAAXk/I0LMLpI3iNA/s1600-h/12.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQh7mGPB-I/AAAAAAAAAXk/I0LMLpI3iNA/s400/12.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220835175751944162" /&gt;&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;Step VI : Enter the Grant Name and select Grantee Type as “Specific User”. The page refreshes to display a new field called “Grantee” (If the page fails to refresh click “Next” button to go to the next screen and click “Back” button on the next screen to come back to this screen)&lt;br /&gt;Enter “GUEST” in the “Grantee” field and click “Next”&lt;br /&gt;&lt;a href="http://bp2.blogger.com/_pm9lRhnES5k/SHQiMhXmqKI/AAAAAAAAAXs/OJD0aZ7UNvY/s1600-h/13.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp2.blogger.com/_pm9lRhnES5k/SHQiMhXmqKI/AAAAAAAAAXs/OJD0aZ7UNvY/s400/13.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220835466540394658" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Step VII: Enter the User Menu Name of the newly created Menu and click “Next”&lt;br /&gt;&lt;br /&gt;&lt;a href="http://bp1.blogger.com/_pm9lRhnES5k/SHQiZ_QA2ZI/AAAAAAAAAX0/b_rN0EksQdc/s1600-h/14.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp1.blogger.com/_pm9lRhnES5k/SHQiZ_QA2ZI/AAAAAAAAAX0/b_rN0EksQdc/s400/14.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220835697899919762" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;Step VIII : Click “Finish” button&lt;br /&gt; &lt;br /&gt;&lt;a href="http://bp3.blogger.com/_pm9lRhnES5k/SHQim5PGzUI/AAAAAAAAAX8/3K4e0lYRlOg/s1600-h/15.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://bp3.blogger.com/_pm9lRhnES5k/SHQim5PGzUI/AAAAAAAAAX8/3K4e0lYRlOg/s400/15.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5220835919623802178" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step IX: Grant creations successfully completed.&lt;br /&gt;&lt;br /&gt;3 Download and Upload the Grant&lt;br /&gt;Following command used to download the created Grant.&lt;br /&gt;FNDLOAD apps/apps 0 Y DOWNLOAD  $FND_TOP/patch/115/import/afsload.lct XXTGUESTGRT_US.ldt GRANT GNT_MENU_NAME= NEW_EMP_REGN_MENU&lt;br /&gt;To upload this grant into a new instance upload the page and the menu as usual and upload the Grant for the menu using the following command.&lt;br /&gt;Following command used to upload the downloaded Grant.&lt;br /&gt;FNDLOAD apps/apps 0 Y UPLOAD $FND_TOP/patch/115/import/afsload.lct XXTGUESTGRT_US.ldt&lt;br /&gt;No we can access the newly created page without login into the applications using the following URL.&lt;br /&gt;http://&lt;Host Name&gt;: &lt;Port&gt;/OA_HTML/OA.jsp?OAFunc=NEW_EMP_REGN&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-6023574191779242795?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/6023574191779242795/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=6023574191779242795' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6023574191779242795'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6023574191779242795'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/07/creation-of-anonymous-page-introduction.html' title='Creation Of the Anonymous page Introduction( By Kalimuthu Vellaichamy,Senior Consultant,Oracle )'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://bp1.blogger.com/_pm9lRhnES5k/SHQfL3K44iI/AAAAAAAAAWM/No4d5Lzb5DI/s72-c/1.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3334575145188220114</id><published>2008-07-01T08:42:00.000-07:00</published><updated>2010-06-09T01:18:22.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Disable Browser Back Button in OAF</title><content type='html'>Hi all,&lt;br /&gt;        These days I am so muh busy with SOA, ADF and Bpel projects that I do not get time to write articles. But recently helped a friend in old team for fixing browser back button in one of his OAF transaction pages which was creating error in his page.&lt;br /&gt;&lt;br /&gt;        Basically a small trick used in various J2EE projects in javascript helps to sort of nullify the browser back button in oaf page. This is what you need to do,&lt;br /&gt;Put following code in process request of OAF page :&lt;br /&gt;OABodyBean bodyBean = (OABodyBean) OAPageContext.getRootWebBean();&lt;br /&gt;String javaS = “javascript:window.history.forward(1);”;&lt;br /&gt;bodyBean.setOnLoad(javaS);&lt;br /&gt; &lt;br /&gt; &lt;br /&gt;             Actually window.history.forward(1) would push the current page ahead in the "visited pages history". A negative number like -1 would restore the previous visited page from browser's cache. Zero is relative to the current (displayed) page. Positive numbers would navigate forward.&lt;br /&gt;If the page number (positive) does not exist in history, your browser will create an entry "copying" the current page to it and setting it as the current entry, so that the previous and actual are the same.&lt;br /&gt;&lt;br /&gt;Using window.history.forward(1) does not disable "Back button". The button will work BUT as this script runs on page loading, it will send you "ahead" the history, which stored URL (or page) is the same. So it works like a "Refresh" button, without actually refreshing content from server, but just restoring from cache.&lt;br /&gt;              Hope this helps all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3334575145188220114?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3334575145188220114/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3334575145188220114' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3334575145188220114'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3334575145188220114'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/07/disable-browser-back-button-in-oaf.html' title='Disable Browser Back Button in OAF'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-675364678087056476</id><published>2008-05-14T11:29:00.000-07:00</published><updated>2010-06-09T01:18:22.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Some facts About R12  OAF techstack</title><content type='html'>As Applications R12 is maturing and stabilising , we are seeing more and more R12 projects coming up. One prominent question I find very often on Oracle OAF forums as well as e mails, is there any change is relation of OA Framework components development and deployment in R12?? Here is list of some changes which you will come across while working on any R12 project:&lt;br /&gt;&lt;br /&gt;1)Apache Jserv is upgraded to OC4J(Oracle Containers for Java) server in R12.&lt;br /&gt;&lt;br /&gt; 2)How to enable log in R12?Since there is no Jserv as in 11i, there is no more dependency on jserv.properties file for enabling of log.Here are the details how to enable log on R12:&lt;br /&gt;&lt;strong&gt;In R12,&lt;br /&gt;Goto $ORA_CONFIG_HOME/10.1.3/opmn/conf&lt;br /&gt;take the backup of opmn.xml&lt;br /&gt;edit opmn.xml for data id="java-options" and add the following:&lt;br /&gt;-DAFLOG_ENABLED=true -DAFLOG_LEVEL=statement &lt;br /&gt;-DAFLOG_MODULE=fnd% &lt;br /&gt;-DAFLOG_FILENAME=/tmp/aflog.txt -Djbo.debugoutput=console &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The log message should get written in,&lt;br /&gt;$INST_TOP/logs/ora/10.1.3/opmn/oacore_default_group_1/oacorestd.out &lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;3)How to add custom classpath in OC4J server classpath ? &lt;br /&gt;&lt;strong&gt;Add an entry in,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;$ORA_CONFIG_HOME/10.1.3/j2ee/oacore/application-deployments/oacore/orion-application.xml&lt;br /&gt;&lt;br /&gt;&lt;  library path="..."/ &gt;&lt;br /&gt;&lt;br /&gt;prepending the existing library path.Modifying orion-application.xml works only if you manually go and modify it. But whenever we run autoconfig orion-application.xml is generated again and it does not have the custom jar files which we had specified.&lt;br /&gt;In case you need to permanently add a custom classpath to the OC4J instances then you need to update the template file&lt;br /&gt;&lt;br /&gt;$FND_TOP/admin/template/orion_application_xml_1013.tmp&lt;br /&gt;There would be some set of entries with tags like&lt;br /&gt;&lt; library path="%s_oacore_prepend_classpath%" /&gt;&lt;br /&gt;&lt; library path="%s_javatop%" /&gt;&lt;br /&gt;&lt; library path="%s_af_jlib%/ojdigsig.zip" /&gt;&lt;br /&gt;&lt; library path="%s_oacore_append_classpath%" /&gt;&lt;br /&gt;&lt; library path="%s_weboh_oh%/j2ee/forms/applications/forms/formsweb/WEB-INF/lib/frmsrv.jar" /&gt;&lt;br /&gt;&lt; library path="%s_tools_oh%/forms/java/frmxlate.jar" /&gt;&lt;br /&gt;&lt; library path="%s_weboh_oh%/j2ee/oafm/applications/mapviewer/web/WEB-INF/lib/mvclient.jar" /&gt;&lt;br /&gt;&lt;library path="%s_weboh_oh%/rdbms/jlib/xdb.jar" /&gt;&lt;br /&gt;&lt;library path="%s_weboh_oh%/j2ee/home/lib/http_client.jar" /&gt;&lt;br /&gt;&lt;library path="%s_weboh_oh%/javacache/lib/cache.jar" /&gt;&lt;br /&gt;&lt;library path="%s_javatop%/oracle/apps/fnd/jar/fndewt.jar" /&gt;&lt;br /&gt;you can add your custom path like this after all the existing library path entires&lt;br /&gt;&lt;library path="/abc/xyz/classpath.jar" /&gt;&lt;br /&gt;where /abc/xyz/classpath.jar is the path for your custom libraries&lt;br /&gt;&lt;br /&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;4)Autocompilation setting of jsp files in R12.&lt;br /&gt;&lt;strong&gt;In file&lt;br /&gt;$INST_TOP/ora/10.1.3/j2ee/oacore/application-deployments/oacore/html/orion-web.xml&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/SCtIOJhZdfI/AAAAAAAAAWE/2T6YeUAWs-c/s1600-h/COES.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/SCtIOJhZdfI/AAAAAAAAAWE/2T6YeUAWs-c/s400/COES.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5200329602640737778" /&gt;&lt;/a&gt;&lt;br /&gt;afterwards please restart apache&lt;br /&gt;$ADMIN_SCRIPTS_HOME/adapcctl.sh stopall&lt;br /&gt;$ADMIN_SCRIPTS_HOME/adapcctl.sh startall&lt;br /&gt;now, whenever you change a character in your jsp, this will immediate reflect your output. In production environments this setting is not recommended.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;4)Steps for Manual compilation of jsp in R12.&lt;br /&gt;&lt;strong&gt;&gt; cd $FND_TOP/patch/115/bin&lt;br /&gt;&gt; ojspCompile.pl --compile -s hello.jsp&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;5) Why R12 uses two Oracle homes in ? &lt;br /&gt;There is an interesting article on Steven Chan's blog on this which explains y Oracle introduced 10.1.3 and 10.1.2 both in R12 Application server archietecture:&lt;br /&gt;&lt;a href="http://blogs.oracle.com/schan/newsItems/departments/release12/2006/04/26#a64"&gt;Why Use Two ORACLE_HOMEs for Release 12's Application Tier?&lt;/a&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;blockquote&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;6)DBC file location in R12:&lt;br /&gt;&lt;strong&gt;$INST_TOP/appl/fnd/12.0.0/secure&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;7)&lt;strong&gt;Bouncing OC4J server, for OAF to pick latest class and xml files.&lt;/strong&gt;&lt;br /&gt;In R12, there are &lt;strong&gt;two&lt;/strong&gt; scripts which need to run to bounce the HTTP server and make OC4J container pick latest class files instead of one as in 11i, we only need to run &lt;strong&gt;adapcctl.sh&lt;/strong&gt; shell script to bounce Apache Jserv. &lt;br /&gt;&lt;br /&gt;      Since in R12 Jserv is replaces by OC4J container, we need to run two scripts:&lt;br /&gt; 1)Script which is responsible for bouncing Oracle HTTP Server (powered by Apache).(&lt;strong&gt;adapcctl.sh&lt;/strong&gt;)&lt;br /&gt; 2)Script  which responsible for bouncing OC4J container (&lt;strong&gt;adoacorectl.sh&lt;/strong&gt;)&lt;br /&gt;&lt;br /&gt;     So basically, here is the sequence of steps you need to do :&lt;br /&gt;1)adapcctl.sh stop &lt;br /&gt;2)adoacorectl.sh stop &lt;br /&gt;3)adapcctl.sh start &lt;br /&gt;4)adoacorectl.sh start&lt;br /&gt;             All these scripts are in &lt;strong&gt;$ADMIN_SCRIPTS_HOME&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-675364678087056476?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/675364678087056476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=675364678087056476' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/675364678087056476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/675364678087056476'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/05/some-facts-about-r12-oaf-techstack.html' title='Some facts About R12  OAF techstack'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_pm9lRhnES5k/SCtIOJhZdfI/AAAAAAAAAWE/2T6YeUAWs-c/s72-c/COES.JPG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3960305921206847086</id><published>2008-05-12T19:37:00.000-07:00</published><updated>2010-06-09T01:18:22.908-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>E-Business Suite Application Development Using Oracle Application Framework (OAF) and Application Development Framework (ADF</title><content type='html'>Latest Update of the much discussed topic on Oracle OA Technology Forum ... which techstack to use OAF or ADF till the time Oracle comes up with Fusion Release, is that Oracle has now released official guidelines for using which framework OAF/ADF while building your custom web application.This white paper is there on the metalink:&lt;br /&gt;&lt;strong&gt;E-Business Suite Application Development Using Oracle Application Framework (OAF) and Application Development Framework (ADF) (Metalink Note 563047.1) &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3960305921206847086?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3960305921206847086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3960305921206847086' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3960305921206847086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3960305921206847086'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/05/e-business-suite-application.html' title='E-Business Suite Application Development Using Oracle Application Framework (OAF) and Application Development Framework (ADF'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-8862868226055789024</id><published>2008-04-05T23:32:00.000-07:00</published><updated>2010-06-09T01:19:27.156-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Discussion for deploying ADF project in R12.</title><content type='html'>Hi all,&lt;br /&gt;             I recently had a interesting mail conversation with couple of senior guys of Oracle regarding Deployments of ADF project in R12.Here is the conversation:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Mukul----&gt;Hi Steven, I have worked in both OAF , ADF Faces. I would like to know is it possible to deploy a standalone adf faces j2ee application in R12 OC4J server. If yes, can anybody on this blog provide a article/ metalink note regarding this! This is really important for R12 customers to know whether they can move their custom applications in ADF or not!&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Steven Chan(Steven Chan, Sr. Director, Oracle Applications Technology Integration,Oracle)----&gt;&lt;br /&gt;Hi, Prabodh, &lt;br /&gt;How are you making out with the whitepaper on this subject?   Can you share any information with Mukul until its release?&lt;br /&gt; &lt;br /&gt;Regards,&lt;br /&gt;Steven &lt;br /&gt;&lt;br /&gt;Probodh(From Oracle)----&gt;&lt;br /&gt;Hi Mukul,&lt;br /&gt;       As far as I know, this has not been tried out internally yet, but there is nothing technically preventing you from achieving deploying an ADF app within an EBS OC4J server. I've also cc'ed Shay Shmeltzer who is the Product Manager for ADF, and who might have come across customers who have already done this.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Shay Shmeltzer(Group Manager,Oracle Development Tools) ---&gt;&lt;br /&gt;&lt;br /&gt;I also don't know if this has been tested.&lt;br /&gt;&lt;br /&gt;That said - as long as the OC4J that is included with EBS is the same version as the public external one and the ADF Libraries are the same this should work.&lt;br /&gt;&lt;br /&gt;              &lt;strong&gt;Hence, in a nut shell deploying ADF project in R12 OC4J server has not yet been tried even in internal Oracle..!&lt;/strong&gt; Actually I was facing some problem in deployment... anyways.... if I will get time.. will try this again  and will let all know a common solution.&lt;br /&gt;&lt;br /&gt;&lt;em&gt;Regarding  deployment of any ADF project in any standard j2ee server its pretty straight forward will put the screenshots for this soon with description!&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-8862868226055789024?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/8862868226055789024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=8862868226055789024' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8862868226055789024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/8862868226055789024'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/04/discussion-for-deploying-adf-project-in.html' title='Discussion for deploying ADF project in R12.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-7998789645615899811</id><published>2008-03-13T12:34:00.000-07:00</published><updated>2010-06-09T01:20:06.201-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF 10G'/><title type='text'>ADF : Hello World Page</title><content type='html'>Hi guys,&lt;br /&gt;               I am back for the much discussed topic on our OAF forum regarding ADF page creation and deployment .Without wasting much time  lets see how to create a very basic Hello world page and &lt;em&gt;in the next article i will discuss how to deploy it.&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;Step 1 : I hope you have downloaded Jdev, from the link I have mentioned in my last article.&lt;br /&gt;&lt;br /&gt;Step 2: Setup Of Jdeveloper.&lt;br /&gt;a)Unzip jdevstudio10133.zip&lt;br /&gt;b)Click jdeveloper.exe inside the unzopped folder to start Jdev.&lt;br /&gt;c)Create a DB connection with R12 instance.(Although not required since this is a hello world page) You don't need a dbc file for ADF project. You just need to have db credentials to create DB connection.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Step 3: Create a Application, see screenshots&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wWc_f8XdI/AAAAAAAAARk/rs1xRDRvwJY/s1600-h/1.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wWc_f8XdI/AAAAAAAAARk/rs1xRDRvwJY/s400/1.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178038358906789330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wZEff8XgI/AAAAAAAAAR8/5BQSnVv1mJM/s1600-h/2.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wZEff8XgI/AAAAAAAAAR8/5BQSnVv1mJM/s400/2.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178041236534877698" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enter project name and location where you wanna make this project. We will use jdev directory to hold our projects, this is not mandatory, you can have any directory for the same.Enter following details:&lt;br /&gt;Application Name:  Mukul_ADF_SAMPLE&lt;br /&gt;Directory name  : (Jdev install dir)/jdev/(project name) &lt;br /&gt;See screenshot below:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9waNff8XhI/AAAAAAAAASE/nnLvRUr1T8M/s1600-h/3.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9waNff8XhI/AAAAAAAAASE/nnLvRUr1T8M/s400/3.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178042490665328146" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Step 3: Create projects  for the Application created.&lt;br /&gt;  When you create an application it prompts for creating a project.We are creating a project with name "Model" in the application we created.&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wcg_f8XiI/AAAAAAAAASM/gGpEUmV23_g/s1600-h/4.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wcg_f8XiI/AAAAAAAAASM/gGpEUmV23_g/s400/4.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178045024696032802" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wdRPf8XjI/AAAAAAAAASU/EfJYYVVuAqc/s1600-h/5.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wdRPf8XjI/AAAAAAAAASU/EfJYYVVuAqc/s400/5.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178045853624720946" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Now since , every application can be divided into MVC-- Model, View and Controller, we will make 2 projects.One project for Model(name--"Model") and one project for View and Controller(name--"ViewController").Here are the steps for creating ViewController project in the same application:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wd6ff8XkI/AAAAAAAAASc/wRZ8kVjbZhs/s1600-h/6.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wd6ff8XkI/AAAAAAAAASc/wRZ8kVjbZhs/s400/6.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178046562294324802" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/R9weGvf8XlI/AAAAAAAAASk/BJn8Q-U7RGI/s1600-h/7.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/R9weGvf8XlI/AAAAAAAAASk/BJn8Q-U7RGI/s400/7.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178046772747722322" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/R9wecvf8XmI/AAAAAAAAASs/sqk5UrJpwLI/s1600-h/8.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/R9wecvf8XmI/AAAAAAAAASs/sqk5UrJpwLI/s400/8.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178047150704844386" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Basically our model project will contain all objects for the model layer, i.e BC4J layer, EO, VO, VL etc.Our viewController project will contain all web realted stuff and backing beans. The role of backing beans  in ADF is somewhat similar to controller in OA Framework.&lt;br /&gt;&lt;strong&gt;In this present example we need at all create the model project,because this is just a hello world page( we are not creating any BC4J object like EO,VO etc). I have created this just give a idea how do we work on a standard project, where there would be some Model layer objects.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wen_f8XnI/AAAAAAAAAS0/uQUaWPNquVA/s1600-h/9.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wen_f8XnI/AAAAAAAAAS0/uQUaWPNquVA/s400/9.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178047343978372722" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;STEP 4:Marking projects as dependent.&lt;br /&gt; Now... as I explained that one project contains all model related stuff(Model) and one project for view and controller(ViewController),so, basically we need to tell application that our view and Controller project is depedent on Model project for all data bindings. This can be done declaratively through Jdeveloper.&lt;br /&gt;   Right click on ViewController project and click on "project properties":&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wkWPf8XoI/AAAAAAAAAS8/rrSvh8Ig7cA/s1600-h/11.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wkWPf8XoI/AAAAAAAAAS8/rrSvh8Ig7cA/s400/11.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178053636105461378" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;   Select "Dependencies" node and click tick on "Model.jpr", as shown in screenshot below:&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wkz_f8XpI/AAAAAAAAATE/zjPIfyVzDZE/s1600-h/10.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wkz_f8XpI/AAAAAAAAATE/zjPIfyVzDZE/s400/10.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178054147206569618" /&gt;&lt;/a&gt;&lt;br /&gt;            This will in turn update web.xml and tell project the ViewController project components are based on Model project.&lt;br /&gt;&lt;br /&gt;STEP 5:Creating faces-config.xml&lt;br /&gt;I guess the step heading sounds quite difficult.... :), like we need to write a faces-config.xml. I hope you must thank to Jdev where most of your xml code is generated through wizards.Ok, so basically this xml file  holds the flow diagram of the application.Entirely different from OA Framework, ADF provides a very lucid and effective flow mechanism.Lets see how?&lt;br /&gt;         Right click on your ViewController project and select new... and follow as shown in screenshots to create faces-config.xml file.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wkWPf8XoI/AAAAAAAAAS8/rrSvh8Ig7cA/s1600-h/11.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wkWPf8XoI/AAAAAAAAAS8/rrSvh8Ig7cA/s400/11.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178053636105461378" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/R9wpsvf8XqI/AAAAAAAAATM/aFG3W9ZqqVI/s1600-h/12.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/R9wpsvf8XqI/AAAAAAAAATM/aFG3W9ZqqVI/s400/12.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178059520210656930" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wp0Pf8XrI/AAAAAAAAATU/lulMCro90gU/s1600-h/13.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R9wp0Pf8XrI/AAAAAAAAATU/lulMCro90gU/s400/13.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178059649059675826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wp_ff8XsI/AAAAAAAAATc/5ouvmGL8RgI/s1600-h/14.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wp_ff8XsI/AAAAAAAAATc/5ouvmGL8RgI/s400/14.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178059842333204162" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;STEP 6:Defining Pages and flow.&lt;br /&gt;In the component pallete for faces-config.xml you can see items like jsf page, note etc, jsf navigation case etc. They signify exactly what there name signifies. We will do the follwoing:&lt;br /&gt;1)Drag Note from pallete to our diagram. The purpose of note, is to make a heading or notes in the diagram.Click in the note after u have dragged it in diagram and type"Flow diagram of project".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wt9_f8XtI/AAAAAAAAATk/jnyir57rmWg/s1600-h/15.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wt9_f8XtI/AAAAAAAAATk/jnyir57rmWg/s400/15.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178064214609911506" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2)Drag a JSF page into the diagram. You would be "a yellow exclamation mark on page diagram", this basically signifies that this project is still not created,so, that user should remember the which pages in the flow diagram are not created yet.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wwf_f8XuI/AAAAAAAAATs/5Y2CCZao0Gc/s1600-h/16.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wwf_f8XuI/AAAAAAAAATs/5Y2CCZao0Gc/s400/16.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178066997748719330" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Click untitled.jspx and edit it as /apps/HelloWorldPG.jspx.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wwl_f8XvI/AAAAAAAAAT0/QsoD7LfXrFM/s1600-h/17.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9wwl_f8XvI/AAAAAAAAAT0/QsoD7LfXrFM/s400/17.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178067100827934450" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;       Since, in my example I am just showing one page with hello world we don't need more pages. Still, to give you a idea, we will create one more page to show how we make navigation.Hence darg one more jsf page and edit its name as shown in screenshot.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wzkff8XwI/AAAAAAAAAT8/k-SMOxjmUwI/s1600-h/18.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9wzkff8XwI/AAAAAAAAAT8/k-SMOxjmUwI/s400/18.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178070373593014018" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3)Now to make navigation case from helloworld page to search page, click  jsf navigation in component pallette, now click on helloworld page and extending the line click on search page.You would see following screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9w0hff8XxI/AAAAAAAAAUE/62enhVKn7Uo/s1600-h/19.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9w0hff8XxI/AAAAAAAAAUE/62enhVKn7Uo/s400/19.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178071421565034258" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;          This diagram basically tells that any action/ost event occured on helloworld page with action name "success", will forward the flow to search page. We will change name of action from "success" to"search", this is just for appropriate name puprose, you can keep any action name like xyz.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R9w1Nff8XyI/AAAAAAAAAUM/CwCLBFXmhEI/s1600-h/20.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R9w1Nff8XyI/AAAAAAAAAUM/CwCLBFXmhEI/s400/20.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178072177479278370" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;4) Now in this step we will actually create the page.Double click hello world page in the faces-config.xml diagram, you would see following screenshot:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R9w2B_f8XzI/AAAAAAAAAUU/vfSGcvLGO54/s1600-h/21.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R9w2B_f8XzI/AAAAAAAAAUU/vfSGcvLGO54/s400/21.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178073079422410546" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Make sure that select jspx document and click next...&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/R9w2Pvf8X0I/AAAAAAAAAUc/BAOq74m9nmE/s1600-h/22.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/R9w2Pvf8X0I/AAAAAAAAAUc/BAOq74m9nmE/s400/22.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178073315645611842" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Select "Automatically Expose UI Component in new  Managed Bean", this is like your controller, you want to create or not. Although we won't need this in our hello world page, but just creating this to give you an idea what this file contains. By selecting this option in wizard, any UI bean attached to page, its getters/setters are automatically exposed in your backing bean class. Edit the backing bean name as shown:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R9w2WPf8X1I/AAAAAAAAAUk/iLlWmOg5quY/s1600-h/23.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R9w2WPf8X1I/AAAAAAAAAUk/iLlWmOg5quY/s400/23.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178073427314761554" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In the next screen select following libraries:&lt;br /&gt;1)ADF Faces Components&lt;br /&gt;2)ADF Faces HTML&lt;br /&gt;3)JSF Core&lt;br /&gt;4)JSF HTML&lt;br /&gt;&lt;br /&gt;Press finish.You would see following screenshot on finishing this in Application Navigator:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://3.bp.blogspot.com/_pm9lRhnES5k/R90av_f8X2I/AAAAAAAAAUs/exr2uBB5dV4/s1600-h/24.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://3.bp.blogspot.com/_pm9lRhnES5k/R90av_f8X2I/AAAAAAAAAUs/exr2uBB5dV4/s400/24.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178324558347525986" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;You can click pkg viewcontroller.backing.apps and see the backing bean class.It will contain getters/setters for all the beans in the page.Also, every new bean you add to page, is automatically  added in this class. This class will contain all controller logic and will be used to invoke any method in AM. But method here to access AM is a little different than from AM, due to fundamental differences in techstack.&lt;br /&gt;      Also like the methods process request and process form request, we can customise lifecycle of a JSF page, but, here its all a bit different. All these facts can be fould in ADF developer guide, I am not explaining each and every fact here, to make this article short and crisp.Main purpose of this article is to give you start with ADF, rest depends on individual effort.&lt;br /&gt;&lt;br /&gt;STEP 7:Page UI creation.&lt;br /&gt;Extend all nodes in structure window of HelloWorldPG and click h:form. In the Component pallete select "ADF Faces Core".&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R91BVPf8X3I/AAAAAAAAAU0/zrCTh8Yh2e4/s1600-h/25.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R91BVPf8X3I/AAAAAAAAAU0/zrCTh8Yh2e4/s400/25.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178366979739508594" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt; Drag the scrollbar down in component pallete and select PanelPage and drag and drop this mouse to h:form, here are the screenshots, how it will look like:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R91B5vf8X4I/AAAAAAAAAU8/SNor7RCXY6o/s1600-h/26.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R91B5vf8X4I/AAAAAAAAAU8/SNor7RCXY6o/s400/26.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178367606804733826" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;"PanelPage" can be considered as pagelayout region in OAF, basic page layout with header and footer. Typically every page would have this, and all regions and otems will be child of this.One feature of Jdev is that as soon as you drag and drop any item from component pallete to structure of page, you can immediately see its look and feel on the page. This nis very essential from the point of development, as you would not everytime run the page and see that what your UI look like.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;       Now we can edit the title of page to Hello world from property inspector as shown in figure&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_pm9lRhnES5k/R91CDvf8X5I/AAAAAAAAAVE/VeTGMlMT9uc/s1600-h/27.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://2.bp.blogspot.com/_pm9lRhnES5k/R91CDvf8X5I/AAAAAAAAAVE/VeTGMlMT9uc/s400/27.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178367778603425682" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;STEP 7:Run The page.&lt;br /&gt;We are done with our hello world page. You can right click the HelloWorldPage.jspx file and click run, a new browser window will open and your page will something like:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R91D0Pf8X6I/AAAAAAAAAVM/fKdiqfblQ8w/s1600-h/28.JPG"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R91D0Pf8X6I/AAAAAAAAAVM/fKdiqfblQ8w/s400/28.JPG" border="0" alt=""id="BLOGGER_PHOTO_ID_5178369711338708898" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;               This finishes creation of Hello world page in ADF.... and I hope this article will give u an idea of ADF to self start it. In the next article will discuss how to deploy it.You can go through ADF developers' guide and  learn fundamentals.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-7998789645615899811?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/7998789645615899811/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=7998789645615899811' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7998789645615899811'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7998789645615899811'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/03/adf-hello-world-page.html' title='ADF : Hello World Page'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_pm9lRhnES5k/R9wWc_f8XdI/AAAAAAAAARk/rs1xRDRvwJY/s72-c/1.JPG' height='72' width='72'/><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-6807115083205306588</id><published>2008-02-21T12:08:00.000-08:00</published><updated>2010-06-09T01:20:06.202-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF 10G'/><title type='text'>The Next BIG thing  ADF Faces: Getting the comfort level in comparison to OAF.</title><content type='html'>Hi all.... starting with new interesting article... after I have returned from my Vaishnodevi Trip!I was thinking of writing this article from quite a some time, but was busy with various things, as I recently moved back to Delhi!&lt;br /&gt;&lt;br /&gt;         Ok, I think lets' start, as we all know Oracle Fusion techstack includes ADF faces for all web related development, I think this is the best time to optimize your skillset to ADF faces and Bpel.ADF is an extensive J2EE framework, which is &lt;br /&gt;documented as well as used for two category of programmers:&lt;br /&gt;&lt;br /&gt;1)Developers from J2EE background,i.e. people having knowldge of JSF,STRUTS,JAVASCRIPT,SWING,TOPLINKS,EJBs etc,&lt;br /&gt;&lt;br /&gt;2)Developers from Forms background,i.e. the best suited guys are the OAF guys, who already have exposure to BC4J.Basically this category of developers, as they work on this framework, they gradually learn more and more standard J2EE technologies gradually.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;In this article, I have typically covered approach for OAF developers, who I assume have a good exposure to core Java and BC4J, but have not worked/have knowledge of toplinks, ejbs',struts etc.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;       Here is the list of downloads, you would need to have to start with ADF Faces on your laptop/computer:&lt;br /&gt;&lt;br /&gt;1)JDEVELOPER 10G (Download &lt;strong&gt;Oracle JDeveloper (10.1.3.3)&lt;/strong&gt;)&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html"&gt;Oracle JDeveloper(10.1.3.3)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;2)ADF Faces guide for forms developers (&lt;strong&gt;Download Developer's Guide for Forms/4GL Developers pdf version&lt;/strong&gt;)&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/documentation/jdev/b25947_01/index.html"&gt;Download Developer's Guide for Forms/4GL Developers&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;3)Database server(This you would require to download, if you don't have a database server, and your working on your home pc/laptop.Download &lt;strong&gt;Oracle Database 10g Express Edition (Western European)&lt;/strong&gt; )&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/software/products/database/xe/htdocs/102xewinsoft.html"&gt;Oracle Database 10g Express Edition&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;em&gt;&lt;strong&gt;Similarities between OAF and ADF&lt;/strong&gt;&lt;/em&gt;&lt;br /&gt;           Both OAF and ADF follow industry best pratices i.e. MVC standard(Model-View-Controller), for people who still don't have a fundamental understanding of MVC, i would suggest reading:&lt;br /&gt;&lt;a href="http://java.sun.com/blueprints/guidelines/designing_enterprise_applications_2e/web-tier/web-tier5.html"&gt;Article On Web-Tier Application Framework Design&lt;/a&gt;&lt;br /&gt;     Here are MVC layers of both:&lt;br /&gt; &lt;br /&gt; OAF&lt;br /&gt;--------&lt;br /&gt;Model      : All BC4J Component classes like AM,EO,VO,VL etc.&lt;br /&gt;View       : UIX&lt;br /&gt;Controller : CO classes.&lt;br /&gt;&lt;br /&gt;ADF&lt;br /&gt;-----&lt;br /&gt;Model      : All BC4J Component classes like AM,EO,VO,VL etc.&lt;br /&gt;View       : JSF JSPs, in simple terms file with extension &lt;strong&gt;.jspx&lt;/strong&gt;&lt;br /&gt;Controller : Backing bean classes.&lt;br /&gt;&lt;br /&gt;        As we see above Model layer is same for both i.e. BC4J, hence OAF developers, have a added advantage since, working with OAF, they already have sound knowledge of this. Next comes the view layer thats changed from UIX to JSF.One major problem with UIX in OAF is that UI is not very extensive, in the sense that there are many limitations on UI front , while if you take JSF, its a Sun's standard j2ee technology where you can have all web features integrated and is also flexible enough to integrate UIs from other technologies.... like industry popular Flex, flash etc.Jsf is capable enough to deliver most complex and extensive UIs.&lt;br /&gt;&lt;br /&gt;          Now, as in OAF,most of the UI development is done through drag and drop and wizards in Jdeveloper(Or even if the page is dynamic you would write java code for adding various UIX beans to pagelayout region), hence, even if you don't have any knowledge/limited knowledge of xml and UIX, then also you can work with ease,because Jdeveloper generates the xml for you.The same is in the case of ADF, &lt;strong&gt;most(not all)&lt;/strong&gt; UI development is done through wizards and drag-drop functionality in Jdeveloper.You only need to have bean level knowledge, similar to OAF.&lt;br /&gt;&lt;br /&gt;        The last layer, i.e. the controller layer is quite similar to what we code in CO classes in OAF, typically every page where you need to put event logic, you would need to attach a backing bean class to that jspx page. This can be automatically done through wizard in Jdeveloper.The backing bean class typically contain getter/setter methods of all beans in the page, so you can add your custom event methods to this class which will be attached to UI through EL.&lt;br /&gt;&lt;br /&gt;        I think by now you would have developed some &lt;strong&gt;comfort level &lt;/strong&gt;with ADF! One stunning feature of ADF are the flow diagrams, like in OAF to redirect to diffent page you use vaious page forward apis' in pageContext class.In ADF, you can design the whole flow in flow-diagram, which is a completely drag and drop feature of Jdeveloper ad then attach it with action of any bean say a "command button", on whose submission you want to redirect the flow.&lt;br /&gt;&lt;br /&gt;     To start with example, Oracle provides a fantastic tutorial called SRDEMO. You can run it on your Jdev, read the guide and get aquittaned with ADF.&lt;br /&gt;&lt;br /&gt;    Recently, there was a discussion on "OAF Forum" regarding "&lt;strong&gt;Can ADF Faces/ADF BC aplications developed on Jdeveloper 10g can be deployed on Apps 11i?&lt;/strong&gt;".&lt;br /&gt;Here is the Steven Chan's blog comments link which gives you the answer:&lt;br /&gt;&lt;a href="http://blogs.oracle.com/schan/comments?u=stevenChan&amp;p=1721&amp;link=http%3A%2F%2Fblogs.oracle.com%2Fschan%2F2007%2F06%2F28%23a1721"&gt;Read last question on this link.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;He basically says "&lt;em&gt;The E-Business Suite 11.5.10.2 uses Oracle9i Application Server 1.0.2.2.2 as its application tier server.  You cannot use this to run externally-developed applications.  &lt;br /&gt;&lt;br /&gt;I would recommend running your custom application on an external Oracle Application Server 10g instance.&lt;/em&gt;"&lt;br /&gt;&lt;br /&gt;         Another point is  pointed by Tapash for Apache Jserv application server used in Oracle Apps 11i, he says "&lt;em&gt;Apache JServ module , QApache are servers built at oracle not totally open sourced, so these are not pure J2EE servers, although you can run some J2EE components like jsps/servlets/EJBs, but these servers dont have containers for all J2EE components.&lt;/em&gt;". So, i would say &lt;strong&gt;Apache name is misleading, because Apache.org things immediately flicks my mind saying open source :)!&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;        Hence, for Apps 11i version ADF faces can't be atleast in straight forward way be deployed. If you are using Apps 11i version , you should use external J2ee compliant server, like Apache Tomcat,OC4J etc. for hosting your ADF Faces/ ADF BC application.&lt;br /&gt;         This is not the case with Apps R12, which is a j2ee compliant server, hence you can deploy all ur ADF faces applications on the same application server.This is because of the fact Oracle has moved to OC4J application server with R12.  &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I hope I am able to give some picture of vast ADF to OAF developer community through this article!I will soon write another article of making a sample page in ADF and integrating it with OAF/JTT/JTF pages in Apps.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-6807115083205306588?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/6807115083205306588/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=6807115083205306588' title='13 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6807115083205306588'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/6807115083205306588'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2008/02/next-big-thing-adf-faces.html' title='The Next BIG thing  ADF Faces: Getting the comfort level in comparison to OAF.'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>13</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1204425824214340878</id><published>2007-12-28T10:12:00.000-08:00</published><updated>2010-06-09T01:19:27.156-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Passing pl/sql table to Java using Oracle JDBC and vice - versa</title><content type='html'>While replying several threads on OA Forums(http://forums.oracle.com/forums/forum.jspa?forumID=210), I have seen couple of threads where developers have a requirement to pass a pl/sql table to OA Framework Page and vice-versa.Even if people copy paste this code from google. oracle or other available sources, they are not sure what actually they are doing!&lt;br /&gt;            Actually the best practice for such a requirement is to use Rosetta to generate class file for the particular pl/sql pkg.But the point is Rosetta is Oracle's internal tool and Oracle does not ship it to customers.Then also,I have seen it to be used in consulting industry, very often, i don't know how :)!But if u don't have rosetta, u don't have an option that to go with jdbc, which is anyways base of Oracle and Java bridge.When talking of JDBC, there is two set of JDBC classes popular in market, one from SUN(Founder of Java)and Oracle.Oracle jdbc wrapper classes are better in the sense, that they are flexible enough to cater almost all pl/sql objects.&lt;br /&gt;          Ok, so if you are not using Rosetta, then how would u  pass pl/sql table to Java using Oracle JDBC and vice - versa?Recently was helping a friend in this code, had to some struggle for this code , so thought to put it on my blog, so that would help other developers with similar requirement.&lt;br /&gt;            &lt;br /&gt;So, lets start:&lt;br /&gt;&lt;strong&gt;Read comments carefully to understand the code &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;1)Define Object with the same structure as your table of records u need to use in ur pl/sql procedureof some pkg.&lt;strong&gt;Remember define it as global object type and not inside package specification, because in that case our jdbc code would not be to find this object type.&lt;/strong&gt;&lt;br /&gt; /******************************************************************************/ &lt;br /&gt;/*The Script used to create Object type   in this example is as follows:*******/&lt;br /&gt;/******************************************************************************/   &lt;br /&gt;create or replace type rectype as object(col1 varchar2(10),col2 Date,col3 Number);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;2)Define table of object u have defined above which u need to use in ur pl/sql procedure of some pkg.&lt;strong&gt;Remember define it as global table type and not inside package specification, because in that case our jdbc code would not be to find this object type.&lt;/strong&gt;&lt;br /&gt;/******************************************************************************/ &lt;br /&gt;/*The Script used to create table of Object type          is as follows:*******/&lt;br /&gt;/******************************************************************************/   &lt;br /&gt;create or replace type rectab as table of rectype;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;3)Defining package specification and procedure definition&lt;br /&gt;/*********************************************************************************/ &lt;br /&gt;/*The Script used to create package specification in this eg.is as follows:*******/&lt;br /&gt;/******************************************************************************/ &lt;br /&gt;&lt;br /&gt;create or replace package ioStructArray as&lt;br /&gt;procedure testproc(iorec in rectab,orec out rectab);&lt;br /&gt;end ioStructArray;&lt;br /&gt;/&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;4)Defining package body and procedure &lt;br /&gt;/*********************************************************************************/ &lt;br /&gt;/*The Script used to create package specification in this eg.is as follows:*******/&lt;br /&gt;/******************************************************************************/ &lt;br /&gt;create or replace package body ioStructArray as&lt;br /&gt; procedure testproc(iorec in rectab,orec out rectab) is&lt;br /&gt;   begin&lt;br /&gt;      /*see how to loop and assign values*/&lt;br /&gt;      for i in 1..iorec.count loop&lt;br /&gt;         iorec(i).col1 := orec(i).col2;&lt;br /&gt;         iorec(i).col2 := orec(i).col1;&lt;br /&gt;      end loop;&lt;br /&gt;   end testproc;&lt;br /&gt;   end ioStructArray;&lt;br /&gt;   /&lt;br /&gt;&lt;br /&gt;5)Getting connection object in JDBC Code :&lt;br /&gt;//Getting db connection in a jdbc&lt;br /&gt;DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());&lt;br /&gt;// Connect to the database&lt;br /&gt;Connection conn=DriverManager.getConnection ("jdbc:oracle:oci8:@S692815.WORLD",&lt;br /&gt;                                   "scott", "tiger");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;6)If writing in AM in OAF page, code to get connection:&lt;br /&gt;OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();&lt;br /&gt;OracleConnection conn = (OracleConnection)oadbtransactionimpl.getJdbcConnection();&lt;br /&gt;&lt;br /&gt;7)Lets, consider a simple scenario where we have a XXVO in AM and I have to pass all VO rows data to the pl/sql procedure we just created and then receieve a table of data back and then based on it values do something in AM.Here is the Code:&lt;br /&gt;//imports&lt;br /&gt;import oracle.sql.*;&lt;br /&gt;import oracle.jdbc.driver.OracleConnection;&lt;br /&gt;import oracle.jdbc.driver.OracleCallableStatement;&lt;br /&gt;import oracle.apps.fnd.framework.server.OADBTransaction;&lt;br /&gt;import oracle.apps.fnd.framework.server.OADBTransactionImpl;&lt;br /&gt;&lt;br /&gt;Public void  arryToPLSQL()&lt;br /&gt;{&lt;br /&gt;//Getting Db connection&lt;br /&gt;OADBTransactionImpl oadbtransactionimpl = (OADBTransactionImpl)getOADBTransaction();&lt;br /&gt;OracleConnection conn = (OracleConnection)oadbtransactionimpl.getJdbcConnection();&lt;br /&gt;&lt;br /&gt;//Defining variables&lt;br /&gt;&lt;br /&gt;//oracle.sql.ARRAY we will use as out parameter  from the package&lt;br /&gt;//and will store pl/sql table&lt;br /&gt;ARRAY  message_display = null; &lt;br /&gt;&lt;br /&gt;//ArrayList to store object of type struct    &lt;br /&gt;ArrayList arow= new ArrayList();&lt;br /&gt;&lt;br /&gt;//StructDescriptor &gt;&gt; use to describe pl/sql object&lt;br /&gt;//type in java.&lt;br /&gt;StructDescriptor voRowStruct = null; &lt;br /&gt;&lt;br /&gt;//ArrayDescriptor &gt;&gt; Use to describe pl/sql table&lt;br /&gt;//as Array of objects in java&lt;br /&gt;ArrayDescriptor  arrydesc = null;&lt;br /&gt;&lt;br /&gt;//Input array to pl/sql procedure&lt;br /&gt;ARRAY  p_message_list = null;&lt;br /&gt;&lt;br /&gt;//Oracle callable statement used to execute procedure&lt;br /&gt;OracleCallableStatement cStmt=null;&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;   {&lt;br /&gt;     //initializing object types in java.&lt;br /&gt;     voRowStruct = StructDescriptor.createDescriptor("RECTYPE",conn); &lt;br /&gt;     arrydesc = ArrayDescriptor.createDescriptor("RECTAB",conn);&lt;br /&gt;   }&lt;br /&gt;&lt;br /&gt; catch (Exception e)&lt;br /&gt; {&lt;br /&gt;   throw OAException.wrapperException(e);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;for(XXVORowImpl row  = (XXVORowImpl)XXVO.first(); &lt;br /&gt;    row!=null;&lt;br /&gt;    row  = (XXVORowImpl)XXVO.next())&lt;br /&gt;  {&lt;br /&gt;     //We have made this method to create struct arraylist&lt;br /&gt;     // from which we will make ARRAY&lt;br /&gt;     //the reason being in java ARRAY length cannot be dynamic&lt;br /&gt;     //see the method defination below.&lt;br /&gt;     &lt;strong&gt;populateObjectArraylist(row,voRowStruct,arow);&lt;/strong&gt;     &lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt; //make array from arraylist&lt;br /&gt;STRUCT [] obRows= new STRUCT[arow.size()];&lt;br /&gt;for(int i=0;i &lt; arow.size();i++)&lt;br /&gt;{&lt;br /&gt; obRows[i]=(STRUCT)arow.get(i);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;try &lt;br /&gt; {&lt;br /&gt;   p_message_list = new ARRAY(arrydesc,conn,obRows); &lt;br /&gt; }&lt;br /&gt; catch (Exception e)&lt;br /&gt;  {&lt;br /&gt;    throw OAException.wrapperException(e);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;//jdbc code to execute pl/sql procedure                            &lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;cStmt&lt;br /&gt; =(OracleCallableStatement)conn.prepareCall("{CALL ioStructArray.testproc(:1,:2)}"); &lt;br /&gt;cStmt.setArray(1,p_message_list);&lt;br /&gt;cStmt.registerOutParameter(2,OracleTypes.ARRAY,"RECTAB");  &lt;br /&gt;cStmt.execute();&lt;br /&gt;&lt;br /&gt;//getting Array back&lt;br /&gt;message_display = cStmt.getARRAY(2);&lt;br /&gt;//Getting sql data types in oracle.sql.datum array&lt;br /&gt;//which will typecast the object types&lt;br /&gt;Datum[] arrMessage = message_display.getOracleArray();&lt;br /&gt;&lt;br /&gt;//getting data and printing it&lt;br /&gt;for (int i = 0; i &lt; arrMessage.length; i++)&lt;br /&gt; { &lt;br /&gt;     oracle.sql.STRUCT os = (oracle.sql.STRUCT)arrMessage[i];&lt;br /&gt;     Object[] a = os.getAttributes(); &lt;br /&gt;     System.out.println("a [0 ] &gt;&gt;attribute1=" + a[0]); &lt;br /&gt;     System.out.println("a [1 ] &gt;&gt;attribute2=" + a[1]);&lt;br /&gt;     System.out.println("a [2 ] &gt;&gt;attribute3=" + a[2]);&lt;br /&gt;  //You can typecast back these objects to java object type&lt;br /&gt;&lt;br /&gt;                                                  &lt;br /&gt; }&lt;br /&gt;                                                &lt;br /&gt; }&lt;br /&gt;catch (Exception e1)&lt;br /&gt;  {&lt;br /&gt;    throw OAException.wrapperException(e1);&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;/*Our custom method which will populate&lt;br /&gt;  arraylist with struct object type&lt;br /&gt; */&lt;br /&gt;public void populateObjectArraylist( XXVORowImpl row,StructDescriptor voRowStruct , ArrayList arow)&lt;br /&gt;{&lt;br /&gt;Object[] attribMessage = new Object[3];&lt;br /&gt;String attr1 = null;&lt;br /&gt;Date attr2 = null;&lt;br /&gt;Number attr3 = null; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;//Get value from Vo row and put in attr1,att2 and attr 3&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//Putting values in object array&lt;br /&gt;attribMessage[0]=attr1;&lt;br /&gt;attribMessage[1]=attr2;&lt;br /&gt;attribMessage[2]=attr3;&lt;br /&gt;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt; STRUCT loadedStructTime = new STRUCT(voRowStruct, conn, attribMessage);&lt;br /&gt; arow.add(loadedStructTime);&lt;br /&gt;}&lt;br /&gt;catch (Exception e)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;So, i hope every step is clear in the above code. I hope it helps all OAF developer community.Special Thanks to Pooja Arora for her contribution and constantly bugging me to fix this!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1204425824214340878?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1204425824214340878/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1204425824214340878' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1204425824214340878'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1204425824214340878'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/12/passing-plsql-table-to-java-using.html' title='Passing pl/sql table to Java using Oracle JDBC and vice - versa'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-2085235953251949718</id><published>2007-12-16T03:16:00.000-08:00</published><updated>2010-06-09T01:19:27.157-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>PPR-- An insight !</title><content type='html'>PPR or Partial Page Rendering is one of the most attractive feature put up by Oracle in 11.5.10 release of Oracle Apps, or OA Famework.&lt;br /&gt;              Although most of OAF developer community use this feature, i think very few would have idea, how excatly it works in UIX.PPR uses Ajax kind of design and hence very attractive to use, because it can put dynamic features in various UIX beans, without the use of any client side script like javascript, which is otherwise a integral part of any web application. PPR events are very fast as they refresh only a particular region or protion of page and no the entire page.&lt;br /&gt;&lt;br /&gt;Developers that want to add such behaviors to their web pages are often faced with a difficult decision. All of these actions can be implemented using a very simple solution: by refreshing the entire page in response to the user interaction. However easy, this solution is not always desirable. The full page refresh can be slow, giving the user the impression that the application is unresponsive. Another option is to implement such actions using JavaScript (or other client-side scripting technologies). This results in faster response times, at the expense of more complex, less portable code. JavaScript may be a good choice for simple actions, such as updating an image. However, for more complicated actions, such as scrolling through data in a table, writing custom JavaScript code can be a very challenging undertaking. &lt;br /&gt;&lt;br /&gt;Oracle UIX provides another solution which avoids some of the drawbacks of the full page refresh and custom JavaScript solutions: partial page rendering (or PPR for short). The UIX partial page rendering functionality provides the ability to re-render a limited portion of a page. As in the full page render solution, PPR sends a request back to the application on the middle-tier to fetch the new contents. However, when PPR is used to update the page, only the modified contents are sent back to the browser. UIX automatically merges the new contents back into the web page. The end result is that the page is updated without custom JavaScript code, and without the loss of context that typically occurs with a full page refresh. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;How Partial Page Rendering Works&lt;/strong&gt;&lt;br /&gt;The partial page rendering process breaks down into three main areas: the partial page event, the partial page rendering pass, and the partial page replacement. &lt;br /&gt;&lt;br /&gt;The partial page event is the request that the browser sends to the application to request new contents. Partial page events are very similar to their full page event equivalents. For example, when the user navigates to a new record set in a table bean, a goto event with a value event parameter is sent to the application regardless of whether the event is a partial or full page event. There are two important differences between partial and full page events. First, partial page events specify partial page rendering-specific event parameters which are not present on the full page event equivalents. For example, partial page events may include an event parameter which identifies the set of nodes that should be re-rendered (referred to as "partial targets"). The second difference between partial page events an full page events is how the events are sent. &lt;br /&gt;&lt;br /&gt;Unlike full page events, partial page events must be sent in a way which does not force the browser to reload the current page. To implement this capability, UIX partial page rendering uses a hidden inline frame (iframe) as a communication channel between the browser and the web application running on the middle-tier. Partial page events are sent by forcing a navigation in the hidden iframe, which in turn causes a request to be sent to the application on the middle-tier. Since the iframe is hidden, the process of sending a partial page event and rendering partial page contents can take place behind the scenes, without discarding the contents of the current page. &lt;br /&gt;&lt;br /&gt;When the partial page event is received by the application, the application responds by determining the set of partial targets to render and performing the partial page rendering pass. The partial page rendering pass is similar to a full page rendering pass. In both cases, the UINode tree is traversed by calling render() on each node in the tree. However, in the partial page rendering case, only the contents generated by the partial targets are actually sent back to the browser. All other contents are dropped. So, although the scope of a partial page rendering pass and full page rendering pass are similar in the number of UINodes that are rendered, the partial page response is generally much smaller, since only the modified contents are sent back to the browser. &lt;br /&gt;&lt;br /&gt;The final part of the PPR process is the partial page replacement. When the browser receives the partial page response, the new contents for each partial target node are copied from the hidden iframe into the main browser window, replacing the existing contents for each target node. So, for example, in the table navigation case, rather than replacing the entire page, just the contents of the table itself are replaced. The browser reflows in response to the modifications, displaying the new contents to the user without fully re-rendering the entire page. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;To recap, the sequence of steps which occur during a partial page render are:&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;The initial page is rendered. &lt;br /&gt;The user performs some action which triggers a partial page render, for example clicking on a link or button. &lt;br /&gt;JavaScript event handlers provided by UIX force a navigation in a hidden iframe. &lt;br /&gt;The partial page event is sent to the application. &lt;br /&gt;The application determines whether the request is a partial page event and which partial target nodes to re-render. &lt;br /&gt;The partial page rendering pass is performed. &lt;br /&gt;The contents of the partial target nodes are sent back to the iframe in the browser. &lt;br /&gt;The partial page replacement is performed, at which point the new contents are copied from the iframe into the main browser window. &lt;br /&gt;The browser re-flows and displays the new content to the end user. &lt;br /&gt;Note that the partial page rendering process requires no custom JavaScript code.&lt;br /&gt;&lt;em&gt;(The source of this article is Oracle UIX documentation.)&lt;/em&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-2085235953251949718?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/2085235953251949718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=2085235953251949718' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2085235953251949718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2085235953251949718'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/12/ppr-insight-source-of-this-article-is.html' title='PPR-- An insight !'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-5798986191339840625</id><published>2007-11-21T23:00:00.000-08:00</published><updated>2010-06-09T01:19:27.157-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>What the hell is JVM , Session , Cache ?</title><content type='html'>From quite some days, I find threads on OAF Forums, where people could not understand the basic terminology of J2EE like session,JVM , Oracle user session, cache etc. I think these terms are not new for people from Java background, but for people who come from pl/sql background or not from Java background, these terms might look like hammers.I remember one thread where I and Tapash were replying somebody asked whats' the difference between ICX session and http session, I wanted to reply, but I thought, replying there would make thread too long, i guess that thread already crossed  4 pages and replying there may not reach to all target audience.&lt;br /&gt;     So, I decided to write a small article for the same..... and in fact I must say my article is nothing but compilation of information from &lt;strong&gt; OAF Developer's guide , googling , metalink, blogs and lastly my knowledge....&lt;/strong&gt;[You must be doubting on the last point.... even i am :)]&lt;br /&gt;&lt;br /&gt;So, lets start with basic terminalogy:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;About JVM&lt;/strong&gt;&lt;br /&gt;At the heart of the Java platform lies the Java Virtual Machine, or JVM. Most programming languages compile source code directly into machine code, suitable for execution on a particular microprocessor architecture. The difference with Java is that it uses bytecode - a special type of machine code. &lt;br /&gt;Java bytecode executes on a special type of microprocessor. Strangely enough, there wasn't a hardware implementation of this microprocessor available when Java was first released. Instead, the processor architecture is emulated by what is known as a "virtual machine". This virtual machine is an emulation of a real Java processor - a machine within a machine (Figure One). The only difference is that the virtual machine isn't running on a CPU - it is being emulated on the CPU of the host machine.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/R0Uq-ZWkCwI/AAAAAAAAAN8/72J-48KHQWs/s1600-h/1.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://1.bp.blogspot.com/_pm9lRhnES5k/R0Uq-ZWkCwI/AAAAAAAAAN8/72J-48KHQWs/s320/1.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5135558201531697922" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Java Virtual Machine is responsible for interpreting Java bytecode, and translating this into actions or operating system calls. For example, a request to establish a socket connection to a remote machine will involve an operating system call. Different operating systems handle sockets in different ways - but the programmer doesn't need to worry about such details.  It is the responsibility of the JVM to handle these translations, so that the operating system and CPU architecture on which Java software is running is completely irrelevant to the developer.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_pm9lRhnES5k/R0UrTJWkCxI/AAAAAAAAAOE/XUHOZ2WO0ms/s1600-h/2.jpg"&gt;&lt;img style="display:block; margin:0px auto 10px; text-align:center;cursor:pointer; cursor:hand;" src="http://4.bp.blogspot.com/_pm9lRhnES5k/R0UrTJWkCxI/AAAAAAAAAOE/XUHOZ2WO0ms/s320/2.jpg" border="0" alt=""id="BLOGGER_PHOTO_ID_5135558558013983506" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The Java Virtual Machine forms part of a large system, the Java Runtime Environment (JRE). Each operating system and CPU architecture requires a different JRE. The JRE comprises a set of base classes, which are an implementation of the base Java API, as well as a JVM. The portability of Java comes from implementations on a variety of CPUs and architectures. Without an available JRE for a given environment, it is impossible to run Java software.&lt;br /&gt;Differences between JVM implementations&lt;br /&gt;Though implementations of Java Virtual Machines are designed to be compatible, no two JVMs are exactly alike. For example, garbage collection algorithms vary between one JVM and another, so it becomes impossible to know exactly when memory will be reclaimed. The thread scheduling algorithms are different between one JVM and another (based in part on the underlying operating system), so that it is impossible to accurately predict when one thread will be executed over another.&lt;br /&gt;Initially, this is a cause for concern from programmers new to the Java language. However, it actually has very little practical bearing on Java development. Such predictions are often dangerous to make, as thread scheduling and memory usage will vary between different hardware environments anyway. The power of Java comes from not being specific about the operating system and CPU architecture - to do so reduces the portability of software.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Summary&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;The Java Virtual Machine provides a platform-independent way of executing code, by abstracting the differences between operating systems and CPU architectures. Java Runtime Environments are available for a wide variety of hardware and software combinations, making Java a very portable language. Programmers can concentrate on writing software, without having to be concerned with how or where it will run. The idea of virtual machines is nothing new, but Java is the most widely used virtual machine used today. Thanks to the JVM, the dream of Write Once-Run Anywhere (WORA) software has become a reality.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;JVM Cache and Its impelemetation in Oracle Apps:&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Qestions like what is cache? How is it related to JVM? How is caching implementated in Oracle Apps?Instead of me explaining this, it would be best if you go through the brilliant explanation by Mike Shaw on Steven Chan’s blog.Here is the link:&lt;br /&gt;&lt;a href="http://blogs.oracle.com/schan/2007/05/01" target="_blank"&gt;Mike Shaw's article about JVM Cache&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;HTTP SESSION&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;HttpSession is nothing but a java interface.The servlet container uses this interface to create a session between an HTTP client and an HTTP server.&lt;br /&gt;The session persists for a specified time period, across more than one connection or page request from the user. A session usually corresponds to one user,&lt;br /&gt;who may visit a site many times. The server can maintain a session in many ways such as using cookies or rewriting URLs. &lt;br /&gt;     This interface allows servlets to View and manipulate information about a session, such as the session identifier, creation time, and last accessed time &lt;br /&gt;Bind objects to sessions, allowing user information to persist across multiple user connections. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ICX Session or Oracle Applications User Session&lt;br /&gt;(Is it same as HTTP session/servelet session ?)&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;                A http session or a servelet session usually corresponds to an application login/logout cycle, but that is not strictly true in the case of OA Framework applications.I tell u y ? When the user logs in to an OA Framework application, the OA Framework creates an AOL/J oracle.apps.fnd.common.WebAppsContext object and a browser session-based cookie that together keep track of key Oracle Applications context information like the current responsibility, organization id and various user attributes such as user name, user id,&lt;br /&gt;employee id and so on.&lt;br /&gt;     The cookie contains an encrypted key identifier for a session row stored in the Applications database.Specifically, this is the servlet session ID which, in its decrypted form, serves as the primary key in the&lt;br /&gt;ICX_SESSIONS table.(to get an idea do run Select * from ICX_SESSIONS , to get an exact idea of what information is stored in the table)&lt;br /&gt;   The WebAppsContext retrieves this key value after each request and uses it to query the current session state.&lt;br /&gt;    The Oracle Applications user session or ICX SESSION is associated and not dependent with a servlet session, because , it has its own life cycle and time-out characteristics. Generally, the Oracle Applications user session has a longer life span than the servlet session. The servlet session should time-out sooner.&lt;br /&gt;&lt;br /&gt;User session is dependent on following profiles:&lt;br /&gt;&lt;br /&gt;a)&lt;strong&gt;ICX: Limit Time&lt;/strong&gt; :Determines the maximum Oracle Applications user session length( in&lt;br /&gt;                   hours.&lt;br /&gt;&lt;br /&gt;b)&lt;strong&gt;ICX:Session Timeout&lt;/strong&gt;: Maximum idle time for the Oracle Applications user session&lt;br /&gt;(specified in minutes).&lt;br /&gt;&lt;br /&gt;While servelet session timeout is purely dependent on setting in Apache Jserv session timeout setting.&lt;br /&gt;&lt;br /&gt;             An Oracle Applications user session might be associated with multiple http servlet sessions. For example, the servlet session times out &lt;br /&gt;while the user takes a phone call in the middle of creating an OA Framework expense report, then resumes work before the Oracle Applications user session &lt;br /&gt;times out.If the Oracle Applications user session times out, aslong as the user does not close the browser window (so the browser session-based cookie isn't&lt;br /&gt;lost) and no one deletes the corresponding session row in the ICX_SESSIONS table, the user can resume her transaction at the point where he stopped working&lt;br /&gt; after being prompted to log back in.&lt;br /&gt;                 Although the best practice as per Oracle standards is to sync ICX_SESSION and servelet session,till passivation feature is implenented in Oracle Apps. Passivation is still not supported in 11i and 12i.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is straight from metalink “&lt;em&gt;The ICX: Session Timeout option sets the the maximum number of minutes to wait before invalidating an idle ICX Session. The default value is null. The web server session timeout value, or more appropriately the Apache Jserv Session value is used to specify the number of milliseconds to wait before invalidating an unused session. The default value is 1800000 or 30 minutes. &lt;br /&gt;We recommend that you set the ICX: Session Timeout and the Apache Jserv Session to be the same. It's better to be consistent and let the ICX session and the Apache Jserv (middle tier) session expire at the same time. If the ICX session expires before the Jserv session, the user will be presented with a login page even though the Jserv session is still active. If the user logs back in before the Jserv session expires, they will see the old state of their middle-tier transaction. This can be confusing, since from the point of view of the user there is no distinction between the ICX session and the Jserv session. &lt;br /&gt;We also recommend that you do not set the Apache Jserv Session timeout to be any higher than 30 minutes. Longer idle sessions will drain the JVM resources and can also cause out of memory errors. &lt;br /&gt;The session timeout for the webserver is specified via the following directive in the &lt;ORAHTTP_TOP&gt;/Jserv/etc/zone.properties file.&lt;br /&gt;session. timeout=1800000”&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;               I think by now you must be crystal in ur understanding of basic key terms in J2EE.I would like to stress on one thing... &lt;strong&gt;JVM cache is shared across servelet/http sessions , and is purely dependent on first login, it can be removed progrmatically by invalidating the cache or by bouncing the apache server.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Any doubts or queries are welcome!&lt;a href="http://blogs.oracle.com/schan/2007/05/01"&gt;&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-5798986191339840625?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/5798986191339840625/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=5798986191339840625' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5798986191339840625'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5798986191339840625'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/11/j2ee-terms-in-oaf.html' title='What the hell is JVM , Session , Cache ?'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pm9lRhnES5k/R0Uq-ZWkCwI/AAAAAAAAAN8/72J-48KHQWs/s72-c/1.jpg' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-5725646325814061445</id><published>2007-11-02T20:45:00.000-07:00</published><updated>2010-06-09T01:19:27.157-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Setting the default selected date for an OAMessageDateFieldBean</title><content type='html'>I have seen couple of threads in recent past on OA Forums about setting default value in OAMessageDateFieldBean, so, did a little R n D :) on OAMessageDateFieldBean.&lt;br /&gt;            &lt;br /&gt;&lt;strong&gt;OAMessageDateFieldBean in framework, u will find its nothing but a onClick js event is called on the imageicon attached with messagetextinput bean(in case the type is Date) and OAInlineDatePickerBean is opened in a modal js window.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;             Setting deafult date in the OAMessageDateFieldBean, also sets the OAInlineDatePickerBean , as it takes the default value from OAMessageDateFieldBean.&lt;br /&gt;So, here is code for setting/getting value both in both in OAMessageDateFieldBean and OAInlineDatePickerBean :&lt;br /&gt;import java.sql.Date;&lt;br /&gt;import java.text.SimpleDateFormat;&lt;br /&gt;java.sql.Timestamp;&lt;br /&gt;&lt;br /&gt;//defining format of date&lt;br /&gt;SimpleDateFormat f = new SimpleDateFormat("mm/dd/yyyy");&lt;br /&gt;//define date as string&lt;br /&gt;String dateString = "06/30/1984";&lt;br /&gt;//defining new java.sql.date&lt;br /&gt;Date sqlDate=new Date(f.parse(dateString).getTime());&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OAMessageDateFieldBean dateField = (OAMessageDateFieldBean)webBean.findIndexedChildRecursive(&lt;item id&gt;);&lt;br /&gt;dateField.setValue(pageContext,sqlDate);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;//getting oracle.jbo.domain.Date object from OAMessageDateFieldBean &lt;br /&gt;//in process form request&lt;br /&gt;Timestamp ts = (Timestamp)dateField.getValue(pageContext);&lt;br /&gt;System.out.println(ts.getTime());&lt;br /&gt;java.sql.Date select = new java.sql.Date(ts.getTime());&lt;br /&gt;oracle.jbo.domain.Date sd=new oracle.jbo.domain.Date(select);&lt;br /&gt;&lt;br /&gt;//You can also set min Value and Max value in OAMessageDateFieldBean  which &lt;br /&gt;//will also be set in OAInlineDatePickerBean&lt;br /&gt;//Here is code&lt;br /&gt;dateField.setMinValue(minDate);&lt;br /&gt;dateField.setMaxValue(maxValue);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;                I hope this helps all.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-5725646325814061445?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/5725646325814061445/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=5725646325814061445' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5725646325814061445'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5725646325814061445'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/11/setting-default-selected-date-for.html' title='Setting the default selected date for an OAMessageDateFieldBean'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-5161151066990968200</id><published>2007-09-25T11:34:00.000-07:00</published><updated>2010-06-09T01:19:27.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Implementing a simple watch in a OA Framework Page</title><content type='html'>I hope this is interesting ... implementing a watch in OA Framework page.There can be several other functionalities, one can do after implementing this watch.Here i am just writing a simple function for javascript watch,you can take an idea.... and change this function accordingly.&lt;br /&gt;&lt;br /&gt;Just read this function.....&lt;br /&gt;&lt;br /&gt;/* Here is the  javascript  function, which is self explainatory&lt;br /&gt;Read this function carefully&lt;br /&gt;to understand it.*/&lt;br /&gt;&lt;br /&gt; function update()&lt;br /&gt; {&lt;br /&gt;     //Define a new date object&lt;br /&gt;  var today=new Date();&lt;br /&gt;&lt;br /&gt;  var hours=today.getHours();&lt;br /&gt;  var minutes=today.getMinutes();&lt;br /&gt;  var seconds=today.getSeconds();&lt;br /&gt;&lt;br /&gt;  //for formatting output&lt;br /&gt;  if (hours&lt;10)&lt;br /&gt;   hours="0"+hours;&lt;br /&gt;  if (minutes&lt;10)&lt;br /&gt;   minutes="0"+minutes;&lt;br /&gt;  if (seconds&lt;10)&lt;br /&gt;   seconds="0"+seconds;&lt;br /&gt;&lt;br /&gt; //writing output to message text input&lt;br /&gt;  document.getElementByID('OAclockDisplay').value=hours+":"+minutes+":"+seconds;&lt;br /&gt;        &lt;br /&gt;  //refreshing ever sec&lt;br /&gt;  setTimeout("update()",1000);&lt;br /&gt; }&lt;br /&gt;&lt;br /&gt;              I hope this clear. Now here are the steps how you can put it in your OA Framework page.Add a message text input to your page, say its id is "OAclockDisplay".&lt;br /&gt;             &lt;br /&gt;Now add this code in process request of controller of page:&lt;br /&gt;&lt;br /&gt;//storing javascript function is a string&lt;br /&gt;// "\" is used as escape character&lt;br /&gt;String s="function update(){var today=new Date();var hours=today.getHours();var minutes=today.getMinutes();var seconds=today.getSeconds();if(hours&lt;10){hours=\"0\"+hours;} if(minutes&lt;10){minutes=\"0\"+minutes;} if(seconds&lt;10){seconds=\"0\"+seconds;} document.getElementById('OAclockDisplay').value=hours+\":\"+minutes+\":\"+seconds;setTimeout(\"update()\",1000);}";&lt;br /&gt;&lt;br /&gt;//getting body bean&lt;br /&gt;OABodyBean bodyBean = (OABodyBean)pageContext.getRootWebBean();&lt;br /&gt;&lt;br /&gt;//attaching javascript function to page&lt;br /&gt;pageContext.putJavaScriptFunction("update",s);&lt;br /&gt;&lt;br /&gt;// calling this function on load of body bean&lt;br /&gt;String javaS = "javascript:update();";&lt;br /&gt;bodyBean.setOnLoad(javaS);&lt;br /&gt;&lt;br /&gt;We are done, run this page you will be able to see a watch in oa framework page in that particular message text input.&lt;br /&gt;Cheers!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-5161151066990968200?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/5161151066990968200/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=5161151066990968200' title='12 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5161151066990968200'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/5161151066990968200'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/09/implementing-simple-watch-in-oa.html' title='Implementing a simple watch in a OA Framework Page'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>12</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-2697047310383957325</id><published>2007-09-14T20:57:00.000-07:00</published><updated>2010-06-09T01:19:27.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Few Useful threads</title><content type='html'>Here is the list of few useful of the many threads replied by me on OA forums:&lt;br /&gt;&lt;br /&gt;1)&lt;strong&gt;Dynamic tool tip in classic table&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=2056047&amp;amp;#2056047"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=2056047&amp;amp;#2056047&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;2)Putting a different color message in OA Framework page for instrtuction text etc:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1966417&amp;amp;#1966417"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1966417&amp;amp;#1966417&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3)How to make the cursor as "Busy" (i.e. HOURGLASS) and not like the usual "ARROW"..., when ur doing lot of tasks on an event&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1940174&amp;amp;#1940174"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1940174&amp;amp;#1940174&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;4)Delete Personilization:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1959670&amp;amp;#1959670"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1959670&amp;amp;#1959670&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;5)Putting error message stack on OA page:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1890435&amp;amp;#1890435"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1890435&amp;amp;#1890435&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;6)Make some rows' some columns read only in a table:&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1813973&amp;amp;#1813973"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1813973&amp;amp;#1813973&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;7)Not able to find server.xml&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1787572&amp;amp;#1787572"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1787572&amp;amp;#1787572&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;8)Runtime VO&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=1886728&amp;amp;#1886728"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=1886728&amp;amp;#1886728&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;9)Using alerts in OA Framework Page&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=2067435&amp;amp;#2067435"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=2067435&amp;amp;#2067435&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;10)Showing pl/sql exceptions in java(Also, see this thread if ur facing previous message stack retaining probling while using OAExceptionUtils class)&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=598831&amp;start=0&amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=598831&amp;start=0&amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;11)Dynamic CSS class generation in a OAF Page&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=598398&amp;tstart=15"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=598398&amp;tstart=15&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://forums.oracle.com/forums/thread.jspa?threadID=605557&amp;start=15&amp;tstart=0"&gt;http://forums.oracle.com/forums/thread.jspa?threadID=605557&amp;start=15&amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;12)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-2697047310383957325?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/2697047310383957325/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=2697047310383957325' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2697047310383957325'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/2697047310383957325'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/09/collection-of-few-useful-threads-i.html' title='Few Useful threads'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-172582630979313569</id><published>2007-09-06T10:27:00.000-07:00</published><updated>2010-06-09T01:19:27.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Dependent Dynamic message choicelists</title><content type='html'>This is one of the most common scenario in any web application page.Basically here i am just giving an idea how to code for dependent message choicelists in OA Framework page both at page level or in a collective ui feature like table or hgrid.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;3 Message Choicelists in a Page&lt;/strong&gt; :&lt;br /&gt;&lt;br /&gt;Lets consider the first scenario, where we have 3 dependent message choicelists(mc1,mc2,mc3), these can be n in number, just follow the same approach.Here mc1,mc2 and mc3 are the item ids of the message choice lists in the page UIX file, which are attached to vo instances mc1VO1 and mc2VO1 and mc3vo1 respectively.Assuming "Intial value" property value is blank and "Add blank value" is "true" in property inspector for all three poplists.&lt;br /&gt;Lets start from controller code, please read comments, as they explain each and every line..&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Controller Code&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;/*Code in Controller*/&lt;br /&gt;import oracle.apps.fnd.framework.webui.beans.message.OAMessageChoiceBean;&lt;br /&gt;&lt;br /&gt;//Code in process request&lt;br /&gt;OAMessageChoiceBean mc1 = (OAMessageChoiceBean)webBean.findChildRecursive("mc1");&lt;br /&gt;/*The poplist data object that OA Framework creates the first&lt;br /&gt;* time is cached in the JVM and reused&lt;br /&gt;*until you explicitly disable caching&lt;br /&gt;*Hence, use setPickListCacheEnabled API to stop JVM&lt;br /&gt;* from caching Poplist values, this API needs to be called on any Poplist&lt;br /&gt;* where the VO where clause keeps on changing&lt;br /&gt;*/&lt;br /&gt;mc1.setPickListCacheEnabled(false);&lt;br /&gt;//Similarly for second Poplist&lt;br /&gt;OAMessageChoiceBean mc2 = (OAMessageChoiceBean)webBean.findChildRecursive("mc1");&lt;br /&gt;mc2.setPickListCacheEnabled(false);&lt;br /&gt;&lt;br /&gt;//Similarly for third Poplist&lt;br /&gt;OAMessageChoiceBean mc3 = (OAMessageChoiceBean)webBean.findChildRecursive("mc3");&lt;br /&gt;mc3.setPickListCacheEnabled(false);&lt;br /&gt;&lt;br /&gt;//Code in process form request&lt;br /&gt;/*If a value is selected in mc1&lt;br /&gt;*"update" is the name of PPR event&lt;br /&gt;* attached to poplist mc1&lt;br /&gt;*/&lt;br /&gt;if("update".equals(pageContext.getParamete(OAWebBeanConstants.EVENT_PARAM))) {&lt;br /&gt;String value_selected=pageContext.getParameter("mc1");&lt;br /&gt;//Priniting the value selected&lt;br /&gt;System.out.println("value_selected in mc1&gt;&gt;"+value_selected);&lt;br /&gt;//if the selected value is not null&lt;br /&gt;if(!(("".equals(value_selected)) (value_selected==null)))&lt;br /&gt;{&lt;br /&gt;//then calling the method in AM which will reinitialise VO query&lt;br /&gt;// in second message choicelist and not third because&lt;br /&gt;//the value selected in seocond will null&lt;br /&gt;//as we have turned Add blank value to true&lt;br /&gt;//and initial value is null in property inspector&lt;br /&gt;Serializable[] param = {value_selected};&lt;br /&gt;am.invokeMethod("initmc2VOQuery", param);&lt;br /&gt;// if user selects some value in first choicelist&lt;br /&gt;// pass some dummy_value in mc3vo query so that it returns 0 records&lt;br /&gt;//or you can put some condition in vo query like where 5=6&lt;br /&gt;Serializable[] param = {dummy_value};&lt;br /&gt;am.invokeMethod("initmc3VOQuery", param);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;// if user selects null in first choicelist&lt;br /&gt;// pass some dummy_value in mc2vo query so that it returns 0 records&lt;br /&gt;//or you can put some condition in vo query like where 5=6&lt;br /&gt;//doing this for mc2vo1 and mc3vo1&lt;br /&gt;Serializable[] param = {dummy_value};&lt;br /&gt;am.invokeMethod("initmc2VOQuery", param);&lt;br /&gt;am.invokeMethod("initmc3VOQuery", param);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/*If a value is selected in mc2&lt;br /&gt;*"update1" is the name of PPR event&lt;br /&gt;* attached to poplist mc2&lt;br /&gt;*/&lt;br /&gt;if("update1".equals(pageContext.getParamet(OAWebBeanConstants.EVENT_PARAM)))&lt;br /&gt;{&lt;br /&gt;String value_selected=pageContext.getParameter("mc2");&lt;br /&gt;//Priniting the value selected&lt;br /&gt;System.out.println("value_selected in mc2&gt;&gt;"+value_selected);&lt;br /&gt;//if the selected value is not null&lt;br /&gt;if(!(("".equals(value_selected)) (value_selected==null)))&lt;br /&gt;{&lt;br /&gt;//then calling the method in AM which will reinitialise VO query&lt;br /&gt;// in third message choicelist&lt;br /&gt;Serializable[] param = {value_selected};&lt;br /&gt;am.invokeMethod("initmc3VOQuery", param);&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;// if user selects null in second choicelist&lt;br /&gt;// pass some dummy_value in mc3vo query so that it returns 0 records&lt;br /&gt;//or you can put some condition in vo query like where 5=6&lt;br /&gt;//doing this only for mc3vo1&lt;br /&gt;Serializable[] param = {dummy_value};&lt;br /&gt;am.invokeMethod("initmc3VOQuery", param);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Dependent message choicelists in Table&lt;/strong&gt;&lt;br /&gt;&lt;p&gt;&lt;strong&gt;Controller Code :&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;/*Cosider two message choicelist items HeaderPoplistItem and LinePoplistItem in table with item id "XXX".We will use &lt;strong&gt;setListVOBoundContainerColumn api,which  is typically used for containers that repeat it's content multiple times and want to attach different set of records for each iteration, eg table or hgrid.&lt;/strong&gt;&lt;strong&gt;*/&lt;/strong&gt;&lt;/p&gt;OATableBean XXX = (OATableBean)webBean.findChildRecursive("XXX");&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;/*LinePoplistItem is a poplist item, in which view def is filled and not view instance this is based on initial value in HeaderPoplistItem which is a poplistwith view instance name*/&lt;/strong&gt;&lt;br /&gt;OAMessageChoiceBean LinePoplistItem = (OAMessageChoiceBean)XXX.findChildRecursive("LinePoplistItem");&lt;br /&gt;//&lt;br /&gt;LinePoplistItem.&lt;strong&gt;setListVOBoundContainerColumn&lt;/strong&gt;(0, XXX,"HeaderPoplistItem");&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;AM code&lt;/strong&gt;&lt;br /&gt;//Also note for runtime dependency of table of hgrid poplists, you have attach PPR in the LinePoplistItem and in your event method in &lt;strong&gt;AM&lt;/strong&gt; write:&lt;br /&gt;getVO().setWhereClauseParam(0,&lt;vo&gt;);&lt;br /&gt;getVO().executeQuery();&lt;br /&gt;                                &lt;br /&gt;                     In this article , i have covered the Dependent Dynamic message choicelists in tables and independent poplists on page. Hope this scenario is now clear.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-172582630979313569?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/172582630979313569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=172582630979313569' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/172582630979313569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/172582630979313569'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/09/dependent-dynamic-message-choicelists.html' title='Dependent Dynamic message choicelists'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-1051495503777653920</id><published>2007-08-31T04:25:00.000-07:00</published><updated>2010-06-09T01:19:27.158-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>More updates on Javascript usage</title><content type='html'>&lt;strong&gt;Common errors in Pop up pages and their resolution:&lt;/strong&gt;&lt;br /&gt;One thing i missed out in previous post is the profile options related to pop up page .Sometimes while trying to run a pop up page you get errors like:&lt;br /&gt;"You are trying to access a page which is no longer active....."&lt;br /&gt;&lt;br /&gt;                   The root cause of this error are the profile options:&lt;br /&gt;1) FND_VALIDATION_LEVEL - None&lt;br /&gt;2) FND_FUNCTION_VALIDATION_LEVEL - None&lt;br /&gt;3)Framework Validation Level- None&lt;br /&gt;                 They should be none in order to avoid the error.The root cause of the error is MAC key url validation, which is governed by the above 3 profiles.&lt;br /&gt;&lt;br /&gt;            Also, if you are getting error in doing a page submit on pop up page confirm:&lt;br /&gt;FND: Framework Compatibility Mode profile option should have value greater than or equal to "11.5.10".&lt;br /&gt;&lt;strong&gt;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;                   Will be back with a artcle on databound values in the next post.&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;                &lt;/strong&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-1051495503777653920?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/1051495503777653920/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=1051495503777653920' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1051495503777653920'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/1051495503777653920'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/08/more-updates-on-javascript-usage.html' title='More updates on Javascript usage'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-3943147277465638587</id><published>2007-07-02T18:04:00.000-07:00</published><updated>2010-06-09T01:19:27.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>JavaScript In OA Framework</title><content type='html'>&lt;em&gt;“To be or not to be…… is the question…..!”&lt;/em&gt; The famous soliloquy by William Shakespeare in Hamlet…. a similar scenario we have in OA Framework for JavaScript!&lt;br /&gt;The exact lines of Developers’ guide for use JavaScript are as follows:&lt;br /&gt;&lt;em&gt;“UIX and the OA Framework are rapidly adding new features to provide a more interactive user experience&lt;br /&gt;(partial page rendering, automatic table totaling, and so on). You are certainly encouraged to leverage these&lt;br /&gt;features as they are released, however, you should not attempt to implement them yourself before they're&lt;br /&gt;ready.&lt;br /&gt;In short, JavaScript is prohibited without explicit permission from the OA Framework team. Furthermore, you&lt;br /&gt;must have confirmation from the corporate UI design team that a Javascript implementation is essential for&lt;br /&gt;your product.”&lt;/em&gt;&lt;br /&gt;&lt;br /&gt;But this is really funny, if you are developing some web pages for your application, so expect all web features in the framework, and if they are missing definitely you have to use JavaScript to implement them, you cannot wait , for the framework team to implement them.&lt;br /&gt;&lt;br /&gt;So, if you are developing some custom pages for your application, you can go ahead with JavaScript. I will advice to refrain from JavaScript if your extending standard OA pages, because, Oracle may not support it, in that case.&lt;br /&gt;In case of custom pages, anyways oracle will not support customization, so you dam care for support.&lt;br /&gt;&lt;br /&gt;Another interesting thing in OA Framework is that you will methods for JavaScript usage method in almost every UIX beans; in fact, framework team must be using them in development of various features in OA Framework.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;What is JavaScript?&lt;/em&gt; &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;JavaScript is the Netscape-developed object scripting language used in millions of web pages and server applications worldwide. Netscape's JavaScript is a superset of the ECMA-262 Edition 3 (ECMAScript) standard scripting language, with only mild differences from the published standard.&lt;br /&gt;&lt;br /&gt;Contrary to popular misconception, JavaScript is not "Interpretive Java". In a nutshell, JavaScript is a dynamic scripting language supporting prototype based object construction.&lt;br /&gt;&lt;br /&gt;For those who are interested and new to concept of javascript, should explore this link&lt;br /&gt;&lt;a href="http://www.javascriptmall.com/learn/"&gt;http://www.javascriptmall.com/learn/&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I will like to stress on one point before starting the various scenarios where JavaScript can be used, is that JavaScript is a browser specific script and may behave different in different browsers, so you must test your application code on various browsers like internet explorer, mozilla firefox, Netscape etc.&lt;br /&gt;&lt;br /&gt;Scenarios in OA Framework, where you are bound to use javascript.&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Various Pop Up Window scenarios&lt;br /&gt;Closing a Window&lt;br /&gt;Timely refresh of a OA Page&lt;br /&gt;Client side events on different beans&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Various Pop Up Window scenarios: &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;This is the most common scenario in OA Framework, as framework does not provide anything for pop windows, except standard LOVs, which may or may not suit your requirement.I think I have replied this thread several times on OA Framework forum, in fact, thought of writing this article, after I replied the thread so many times J.&lt;br /&gt;Lets, take the most common scenario:&lt;br /&gt;You need to fire a custom page as a pop up window , do some processing(say add some new values in one of the VO) and on returning back to base page, reflect the changes on base page(say the base page VO should reflect the changes done on pop up page).&lt;br /&gt;Follow these steps for the solution:&lt;br /&gt;1. To open a custom page..... as a modal window.... u can have a link or button(button of type button and not submit button) on base page with destination url property as following javascript:&lt;br /&gt;&lt;br /&gt;javascript:var a = window.open('OA.jsp?page=/XXX/oracle/apps/xxx/......&amp;retainAM=Y', 'a','height=500,width=900,status=yes,toolbar=no,menubar=no,location=no'); a.focus();&lt;br /&gt;&lt;br /&gt;Meaning of each parameter in this javascript:&lt;br /&gt;· RetainAM:If this is equal to “Y”, AM will be retained when child window is opened.&lt;br /&gt;· Height: Height of the pop up or child window.&lt;br /&gt;· Width: Width of pop up or child window&lt;br /&gt;· Status: String, Specifies a priority or transient message in the window's status bar (This property is not readable.).&lt;br /&gt;· Toolbar: Object, Represents the browser window's tool bar.&lt;br /&gt;· Menubar: Object, Represents the browser window's&lt;br /&gt;menu bar.&lt;br /&gt;· Location:Location of window on the sceen&lt;br /&gt;· Resizable: if resizable=yes, is included in above api, then child window size can be maximized.By default the child window size is fixed user cannot, increase or decrease the size.&lt;br /&gt;· Scrollbar: if scrollbar=yes, is included in above api, scrollbars will appear in the child window.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Please Note : While trying to run a pop up page you get errors like:&lt;br /&gt;"You are trying to access a page which is no longer active....."&lt;br /&gt;&lt;br /&gt;The root cause of this error are the profile options:&lt;br /&gt;1) FND_VALIDATION_LEVEL - None&lt;br /&gt;2) FND_FUNCTION_VALIDATION_LEVEL - None&lt;br /&gt;3)Framework Validation Level- None&lt;br /&gt;They should be none in order to avoid the error.The root cause of the error is MAC key url validation, which is governed by the above 3 profiles.There can be scenarios when your DBA/Admin would not allow you to set these profiles at site level in order to maintain security of Apps from cross site scripting attacks.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;           In such scenarios, or I will say in all scenarios, its better to use a utility class in OAF called OABoundValueEmbedURL which secures your js function by bypassing the MAC key validation.You can use following code to attach js url programatically to a button/image bean :&lt;br /&gt;OAImageBean img = (OAImageBean) webBean.findChildRecursive("&lt;beanId&gt;");&lt;br /&gt;//url of the page&lt;br /&gt;String url ="/XXX/oracle/apps/xxx/......"&lt;br /&gt;//retain am parameter&lt;br /&gt;string amMode ="true";&lt;br /&gt;//additional parameters i want to pass to to pop up page&lt;br /&gt;String params="order_id={@workorder_id}";&lt;br /&gt;&lt;br /&gt;//Computing page_url&lt;br /&gt;String page = &lt;br /&gt;      url + "&amp;retainAM=" + amMode + "&amp;fndOAJSPinEmbeddedMode=y" + "&amp;" + &lt;br /&gt;      params;&lt;br /&gt;//Computing final url&lt;br /&gt;String destURL = &lt;br /&gt;      OAWebBeanConstants.APPS_HTML_DIRECTORY + OAWebBeanConstants.APPLICATION_JSP + &lt;br /&gt;      "?" + OAWebBeanConstants.JRAD_PAGE_URL_CONSTANT + "=" + page;&lt;br /&gt;&lt;br /&gt;//Securing js function from MAC key validation      &lt;br /&gt;OABoundValueEmbedURL jsBound = &lt;br /&gt;        new OABoundValueEmbedURL(img, "openWindow(self, '", destURL, &lt;br /&gt;                                 "' , 'longTipWin', {width:" + width + &lt;br /&gt;                                 ", height:" + height + &lt;br /&gt;                                 "}, true); return false;");&lt;br /&gt;&lt;br /&gt;//Attaching bound value embed url to on click of image.&lt;br /&gt;img.setAttributeValue(OAWebBeanConstants.ON_CLICK_ATTR, jsBound);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;There are 3 important points to understand here :&lt;br /&gt;1) This code has to be written in process request and not process form request, because as per OA Developer standards bean properties can only be set in process request and not process form request.&lt;br /&gt;&lt;br /&gt;2)The additional parameters you want to pass can be  passed at runtime, this is especially in case of tables/hgrids where lets say a particular column has link and each row has different parameter values to pass, you can send VO attributes as parameters like &lt;em&gt;@Vo_attr_name&lt;/em&gt;.This will make your pop window link to be dynamic as each row js url will have different parameter values depending upron row of VO.&lt;br /&gt;&lt;br /&gt;3)If you see the final url computed here I have used an additional parameter like &lt;br /&gt;fndOAJSPinEmbeddedMode=y, this is especially in case of pages which use jtfchrome.jsp where in the JTF/JTT and OAF flows are integrated.This parameter will take care that the JS URL OF LOV page, should not be changed to jtfcrmchrome.jsp from OA.jsp which results in error of lov page.&lt;/strong&gt; &lt;br /&gt;&lt;br /&gt;In one of the 2 approaches you would be able to open the pop up page.     &lt;br /&gt;&lt;br /&gt;2. Now, you can do your pop up page processing by the pop page controller.&lt;br /&gt;3. Now your child window should have two buttons, one for select(submit button) and another for close(button).On press of select button you will have all vaues in your trasient VO, and you can also show user a message like, " values created successfully....".The second button will be of type "button", whose destination url property will be&lt;br /&gt;&lt;br /&gt;javascript:opener.submitForm('DefaultFormName',0,{XXX:' abc'});window.close();&lt;br /&gt;(In this api you can pass &lt;strong&gt;n&lt;/strong&gt; number of attributes, the second parameter will be correspondingly &lt;strong&gt;n-1&lt;/strong&gt;, e.g you have to pass three attr, then second parameter of api will be 2&lt;br /&gt;javascript:opener.submitForm('DefaultFormName',&lt;strong&gt;2&lt;/strong&gt;,{'XXX':' abc','XXX1':'efg','XXX2':'ijk'});window.close(); )&lt;br /&gt;Now in the process request of the base page CO, u can get parametre 'XXX' from the pagecontext....so&lt;br /&gt;if((("abc").equals(pageContext.getParameter("XXX"))))&lt;br /&gt;{///LOGIC to initialize or not to intialize some components of base page}&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Please Note :&lt;br /&gt;1)From Apps R12.1, the framework is also validating parameter security, so getting js parameter values by pageContext.getParameter("XXX"), can throw security exception error&lt;br /&gt;FND_FORM_POST_SECURITY_FAILED. To bypass this parameter security validation , you need to take js parameter values directly from http request  using following code:&lt;br /&gt; pageContext.getRenderingContext().getServletRequest().getParameter("XXX");&lt;br /&gt;&lt;br /&gt;2)Also, if you are getting error in doing a page submit on pop up page confirm:&lt;br /&gt;FND: Framework Compatibility Mode profile option should have value greater than or equal to "11.5.10".&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Closing a Window &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;To open a custom page..... as a modal window.... u can have a link or button(button of type button and not submit button) on base page with destination url property as following javascript:window.close();&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Timely refresh of a OA Page &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Lets, consider a scenario when you want a page refresh after every 10 seconds.Here is javascript for it:javascript:setTimeout(window.location.reload(),10000);where 10,000--&gt;10 sec(10,000 milli sec)&lt;br /&gt;&lt;br /&gt;What you need to do is attach with onLoad method of OABody bean, so that when the page is rendered, this javascript is triggered.You can code like this:&lt;br /&gt;&lt;br /&gt;OABodyBean bodyBean = (OABodyBean) oapagecontext.getRootWebBean();&lt;br /&gt;&lt;br /&gt;String javaS = “javascript:setTimeout('window.location.reload()',10000)”;&lt;br /&gt;bodyBean.setOnLoad(javaS);&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;Client side events on different beans: &lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;Above I have given a few of million possible situations of javascript in OA Framework.In almost all ui beans u will find methods like setOnLoad *, setOnClick* etc., where you can attach a javascript function to the bean.&lt;br /&gt;Will be back with more examples of javascript in OA Framework, soon!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-3943147277465638587?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/3943147277465638587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=3943147277465638587' title='108 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3943147277465638587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/3943147277465638587'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/07/javascript-in-oa-framework.html' title='JavaScript In OA Framework'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><thr:total>108</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4890411074348189661.post-7049814031775225901</id><published>2007-06-01T20:45:00.000-07:00</published><updated>2010-06-09T01:19:27.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OAF'/><title type='text'>Extensions in OA framework</title><content type='html'>1. Introduction&lt;br /&gt;2. What is Oracle Applications Framework?&lt;br /&gt;3. Setting up your Environment&lt;br /&gt;4. How to confirm whether actually go for extension or not?&lt;br /&gt;5. BC4J Extensions&lt;br /&gt;6. Deploying your extensions on the application server&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467616"&gt;1. Introduction&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This purpose of this document is to help its readers understand the extensions in Oracle Applications Framework (OAF) and provide a general guideline as to how to create and deploy extensions in OAF.&lt;br /&gt;&lt;br /&gt;This document is created based on experiences while implementing iProcurement module in R11.5.10 for one of US Banking Client.&lt;br /&gt;&lt;strong&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/RmDu5m3osQI/AAAAAAAAAAM/iBH03xcuFX4/s1600-h/aa.JPG"&gt;&lt;/a&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467617"&gt;2. What is Oracle Applications Framework?&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Oracle Applications Framework is a development and deployment platform for Oracle Self-Service Web Applications. It is a&lt;br /&gt;100% Java &amp; XML, middle-tier application framework and services for the rapid development &amp;amp; deployment of HTML based applications. This framework is based on MVC archietecture (Model-View-Controller).&lt;br /&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br /&gt; &lt;/div&gt;&lt;div&gt;&lt;strong&gt;&lt;a href="http://1.bp.blogspot.com/_pm9lRhnES5k/RmDu5m3osQI/AAAAAAAAAAM/iBH03xcuFX4/s1600-h/aa.JPG"&gt;&lt;img id="BLOGGER_PHOTO_ID_5071315853873033474" style="FLOAT: left; MARGIN: 0px 10px 10px 0px; WIDTH: 368px; CURSOR: hand; HEIGHT: 235px" height="249" alt="" src="http://1.bp.blogspot.com/_pm9lRhnES5k/RmDu5m3osQI/AAAAAAAAAAM/iBH03xcuFX4/s320/aa.JPG" width="405" border="0" /&gt;&lt;/a&gt;&lt;/strong&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Correspondingly, MVC in OA Framework can be categorized as:&lt;br /&gt;View – Common UIX-based HTML components used throughout Applications.&lt;br /&gt;Controller – OA Controller responds to user actions, directs application flow.&lt;br /&gt;Model – Business logic encapsulated in Business Components for Java view objects and entity objects.&lt;br /&gt;OA Framework provides with two main features:&lt;br /&gt;&lt;br /&gt;1.Personalizations&lt;br /&gt;2.Extensibility&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467618"&gt;1. Personalization&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Personalization means declaratively tailoring the user interface (UI) look-and-feel, layout or visibility of page content to suite a business need or a user preference.&lt;br /&gt;Note that with personalization we are not adding a custom functional flow to the system. It plainly refers to modifying the User Interface with the capabilities provided by the framework, for a better user experience.&lt;br /&gt;&lt;br /&gt;Examples of personalization include:&lt;br /&gt;&lt;br /&gt;Changing the order of the column in a UI table&lt;br /&gt;Making certain attributes as read-only&lt;br /&gt;Hiding/Showing certain attributes to the user&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467619"&gt;2. Extensibility&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Extensibility refers to the ability to programmatically extend an application's functionality. In other words, extending the n functionality of an application gives developer the ability of:&lt;br /&gt;&lt;br /&gt;· Adding new content or business logic&lt;br /&gt;· Extending/overriding existing business logic&lt;br /&gt;&lt;br /&gt;The tool which we use for extending various applications in Oracle Applications 11i is JDeveloper.Oracle Self-Service Web Applications can be customized using extensibility feature as per business requirement, in following two ways:&lt;br /&gt;&lt;br /&gt;· Customization by extensions: The Oracle Self-Service Web Applications can be customized as per business requirement by adding the custom code to the extended class of the base class. Oracle support this approach because in case of upgrading or applying any patch, if the base class file is replaced by a new class file, then the custom code will still be present in the extended class.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;· Customization by modification: The Oracle Self-Service Web Applications can also be customized as per business requirement by adding the custom code to base class itself. However, Oracle does not support this , because in case of upgrading or applying any patch, if the base class file is replaced, then the custom code is removed and so, is the related functionality. That is why Oracle advises for customization by extensions.&lt;br /&gt;With extension, custom functional flows can be created or existing business logic can be overridden to suit customer needs. Examples of extensions include:&lt;br /&gt;&lt;br /&gt;· Extending View Objects in order to include an extra transient attribute.&lt;br /&gt;· Extending Application Modules in order to add a new logic as per business requirement.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467620"&gt;&lt;/a&gt;&lt;a name="_Toc142400852"&gt;3. Setting up your Environment&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In order to start with extensions we first have to setup appropriate environment for it, i.e. setup Jdeveloper environment. For setting JDeveloper environment, we follow following steps:&lt;br /&gt;&lt;br /&gt;Download the latest version of JDeveloper (OAJdev.zip) which is patched for OA Framework from metalink.(We used 9.0.3 version of JDeveloper) and install it as per the instructions on metalink.&lt;br /&gt;&lt;br /&gt;To start Jdeveloper go to JDev\jdevbin\jdev\bin and click&lt;br /&gt;jdevw.exe (For convenience, we can create a shortcut of this icon on desktop.)&lt;br /&gt;&lt;br /&gt;Put the dbc file extracted from server from &lt;$FND_TOP&gt;\secure\&lt;dbc&gt; and put it in appropriate folder i.e.&lt;br /&gt;&lt;jdev_user_home&gt;\dbc_files\secure&lt;br /&gt;Here, &lt;jdev_user_home&gt;refers to path till “jdev” directory in “jdevhome” directory of JDeveloper&lt;br /&gt;&lt;br /&gt;Expand the Connections node in the JDeveloper System Navigator, and then expand the Database node. Right-click on the Database node, and select New Connection... to open the Connection Wizard. Follow the JDeveloper instructions to define a new database connection for the Oracle Applications database identified by the DBC file you selected above.&lt;br /&gt;&lt;br /&gt;Please confirm that the dbc file does not contain any slashes in the line:&lt;br /&gt;APPS_JDBC_URL=……&lt;br /&gt;Originally the dbc file contains back slashes in this line it is extracted from Unix database server.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5077935921421229570" style="DISPLAY: block; MARGIN: 0px auto 10px; WIDTH: 444px; CURSOR: hand; HEIGHT: 235px; TEXT-ALIGN: center" height="231" alt="" src="http://2.bp.blogspot.com/_pm9lRhnES5k/Rnhz0QSCHgI/AAAAAAAAAIw/muj2_BVNYy4/s320/jd.JPG" width="447" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;The various information needed to complete the connection wizard can be filled by opening the dbc file and then filling Host name, Port, Sid etc. If you get any errors while making the database connection, again cross check the database entries from dbc file and see that there are no back slashes in line&lt;br /&gt;APPS_JDBC_URL=……&lt;br /&gt;of the dbc file. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;In order to set our module related environment in Jdeveloper,make a folder named “myclasses” under path &lt;jdev_user_home&gt;\myclasses&lt;br /&gt;Zip the application top from your UNIX application server specific to your module. Eg., since, we were working on IProcurement, so it was&lt;br /&gt;$JAVA_TOP\oracle\apps\icx&lt;br /&gt;&lt;br /&gt;Extract this under &lt;jdev_user_home&gt;\myclasses. Please ensure that we have exactly same directory structure under myclasses folders as the zip file of application top has.&lt;br /&gt;&lt;br /&gt;Under the directory structure C:\JDev\jdevhome\jdev there are two folders:&lt;br /&gt;myclasses&lt;br /&gt;myprojects&lt;br /&gt;Ideally myclasses folder contain all the files of the application top related to that module, while in myprojects folder we should put only those packages and files are needed to be run, extended or customized. Also note, once a file in myprojects folder is compiled through jdev, a copy of its class file is automatically placed in myclasses.&lt;br /&gt;But, there are a lot of dependencies between VOs and Eos, so, what we did in our implementation was that we unzipped the application top both in myclasses as well as myprojects folder.&lt;br /&gt;&lt;br /&gt;In order to find which page to run, to start Oracle Applications from a specific responsibility, through local Jdev Apache server, login on Oracle Applications home page and click the responsibility specific to your module.&lt;br /&gt;Like in our case it was I- procurement. Click on about the page link on this page in order to find relevant information.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;NOTE:The about the page link is by default not available on every page. To make it available, two profile options need to set, to have the link ‘about the page’ and ‘Personalize this Page’ on each OA Page. In order to enable it, set these two profile options:&lt;br /&gt;&lt;br /&gt;Personalize Self-service Defn (FND_CUSTOM_OA_DEFINTION) - set to “YES”&lt;br /&gt;FND: Personalization Region Link Enabled - set to “YES” &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5077937355940306450" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="222" alt="" src="http://4.bp.blogspot.com/_pm9lRhnES5k/Rnh1HwSCHhI/AAAAAAAAAI4/yYQhwhehaKA/s320/ab.JPG" width="386" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;In the above screenshot you can see the directory structure and exact page (red oval space) that opens up while clicking the I-procurement responsibility. In our case it was&lt;br /&gt;oracle\apps\icx\icatalog\shopping\webui\ShoppingHomePG.xml&lt;br /&gt;Now, make the same directory structure under myprojects folder and copy, paste ShoppingHomePG.xml i.e.&lt;br /&gt;&lt;jdev_user_home&gt;\myprojects\oracle\apps\icx\icatalog\shopping\webui\ShoppingHomePG.xml&lt;br /&gt;&lt;br /&gt;Select File &gt; New... to open the New... dialog (shown in the following screenshot). This dialog is also called the New Object Gallery.&lt;br /&gt;Workspace Configured for Oracle Applications highlighted"&gt;&lt;br /&gt;Choose General &gt; Workspace Configured for Oracle Applications from the New... dialog, or highlight Workspaces in the Navigator and choose New OA Workspace... from the context menu. We'll be prompted to create an OA workspace. Verify that the default workspace directory name points to our own &lt;jdev_user_home&gt;\myprojects directory, as shown in the following diagram. Modify the workspace file name as well (any name is okay for a workspace, such as Iproc.jws). Check the Add a New OA Project check box. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5077941135511527074" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="206" alt="" src="http://4.bp.blogspot.com/_pm9lRhnES5k/Rnh4jwSCHqI/AAAAAAAAAKA/zFn_NJOrGM0/s320/xxxx.JPG" width="355" border="0" /&gt;&lt;br /&gt;After you click OK, you will see the Oracle Applications Project Wizard.&lt;br /&gt;In Step 1 of the wizard, verify that the default project directory name points to your own JDEV_USER_HOME\myprojects directory, as shown in the following diagram. Modify the project file name as well (any name is okay for a project, such as OAPjoject2.jpr). Set the default package name to&lt;br /&gt;oracle.apps. &lt;your&gt;Like in our case it was oracle.apps.icx&lt;br /&gt;In Step 2 of the wizard we have to set the database connection and runtime connection. In Step3, Browse the correct dbc file here. Fill the runtime username and password .Fill the application short name specific to your module, like in our case it was “ICX” for iprocurement. (If you are unaware of application short name you can find it out from fnd_application_vl).To fill Responsibility key of the related responsibility (for iprocurement it is SELF_SERVICE_PURCHASING_5), you can login in oracle applications and then&lt;br /&gt;System AdministratoràSecurity: ResponsibilityàDefine&lt;br /&gt;Here query for the Responsibility name to get Responsibility key. &lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;img id="BLOGGER_PHOTO_ID_5077940937943031346" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="249" alt="" src="http://2.bp.blogspot.com/_pm9lRhnES5k/Rnh4YQSCHjI/AAAAAAAAAJI/Yid2fntIZB4/s320/aswf.JPG" width="382" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;12. In order to add homepage of the responsibility(module), on which we are working to the current project, click the red circled button as shown in screenshot below:&lt;br /&gt;&lt;br /&gt;We will browse the page which we found in step 4 in myprojects folder i.e.&lt;br /&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5077940942237998690" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="203" alt="" src="http://3.bp.blogspot.com/_pm9lRhnES5k/Rnh4YgSCHmI/AAAAAAAAAJg/a1uCPcewU4c/s320/mmmm.JPG" width="367" border="0" /&gt;&lt;br /&gt;&lt;jdev_user_home&gt;\myprojects\oracle\apps\icx\icatalog\shopping\webui\ShoppingHomePG.xml&lt;br /&gt;13. Right click ShoppingHomePG.xml and select Run ShoppingHomePG.xml&lt;br /&gt;14. We will be able to see the homepage of the specific responsibility.&lt;br /&gt;This completes all steps needed to develop suitable environment for extensions in particular page under specific responsibility in Oracle Applications 11i.&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467621"&gt;4. How to confirm whether actually go for extension or not?&lt;/a&gt;&lt;br /&gt;In order to decide whether to actually go about extending a webpage or not, we take an example, which we implemented in I-Procurement. The requirement was that in a standard requisition details page, it looks like the screenshot below&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt; &lt;img id="BLOGGER_PHOTO_ID_5077941131216559762" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="233" alt="" src="http://3.bp.blogspot.com/_pm9lRhnES5k/Rnh4jgSCHpI/AAAAAAAAAJ4/ZB0oUJMVwQM/s320/vbvb.JPG" width="387" border="0" /&gt;&lt;br /&gt;Item number was not available. We had a requirement where we have to introduce an extra column in the table: LinesTableRN named as Item number, which will reveal item number of the item. We added an extra column through personalization, to reveal to item number , but to check whether item number is available in standard view objects of the page ,we have to check its availability in the about this page of the page.&lt;br /&gt;Click “about this page” link, to find out information about various View Objects, application modules and controller objects. We also get information about directory structure and the page from this link. So, we get following information:&lt;br /&gt;&lt;br /&gt;Page : /oracle/apps/icx/por/reqmgmt/webui/ReqDetailsPG&lt;br /&gt;Application Module : ReqMgmtAM&lt;br /&gt;Available View Objects : (All view objects that are available in ReqMgmtAM can be used)&lt;br /&gt;Controller object : ReqDetailsCO&lt;br /&gt;&lt;br /&gt;In order to analyze whether we need to actually extension or we can solve just by going through personalization, we analyzed all the view objects definitions by clicking each view object through about this page link and search whether item number is available in any view object or not .We found that non of the available view objects had item number, so, we are now confirmed of the approach, extension&lt;br /&gt;We introduced an extra column in the table: LinesTableRN named as Item number, which will reveal item number of the item. We added an extra column through personalization and now we will have to extend any View Object available on the page(we choose ReqDetailsVO) to add an extra an extra transient column called item number and get it populated by some business logic.&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467622"&gt;5. BC4J Extensions&lt;/a&gt;&lt;br /&gt;The best way to start the extensions is to mount the whole package in Jdeveloper. To do it we should browse through the server folder of the package. Like in our case we browsed&lt;br /&gt;&lt;br /&gt;/oracle/apps/icx/por/reqmgmt/server&lt;br /&gt;&lt;br /&gt;This folder contains a file called server.xml&lt;br /&gt;&lt;br /&gt;Sometimes, it happens that some server.xml files are missing in the package which stops us from mounting the package in jdeveloper. In such case raise an SR with Oracle to provide patch for all server.xml files of the module or package your working. We raised it for Iprocurement module, as some server.xml files were missing. As soon as you apply this patch all the server.xml are available.&lt;br /&gt;&lt;br /&gt;Now, in order to complete our extensions follow these steps:&lt;br /&gt;&lt;a name="_Toc142467623"&gt;&lt;/a&gt;&lt;a name="_Toc142464025"&gt;&lt;/a&gt;&lt;a name="_Toc142453599"&gt;&lt;/a&gt;&lt;a name="_Toc142401137"&gt;&lt;/a&gt;&lt;a name="_Toc142400853"&gt;1. Create Your New BC4J Package&lt;/a&gt;.&lt;br /&gt;&lt;a name="_Toc142467624"&gt;&lt;/a&gt;&lt;a name="_Toc142464026"&gt;&lt;/a&gt;&lt;a name="_Toc142453600"&gt;&lt;/a&gt;&lt;a name="_Toc142401138"&gt;&lt;/a&gt;&lt;a name="_Toc142400854"&gt;In your OAProject2.jpr project, create a new, empty BC4J package named &lt;name&gt;.oracle.apps.icx.por.reqmgmt.server. i.e.&lt;/a&gt;&lt;br /&gt;ftu.oracle.apps.icx.por.reqmgmt.server&lt;br /&gt;&lt;a name="_Toc142467625"&gt;&lt;/a&gt;&lt;a name="_Toc142464027"&gt;&lt;/a&gt;&lt;a name="_Toc142453601"&gt;&lt;/a&gt;&lt;a name="_Toc142401139"&gt;&lt;/a&gt;&lt;a name="_Toc142400855"&gt;2. Create Your New View Object (VO) and transient attribute&lt;/a&gt;&lt;br /&gt;Create a new VO, named &lt;name&gt;ReqDetailsVO, that extends ftu.oracle.apps.icx.por.reqmgmt.server. ReqDetailsVO i.e.&lt;br /&gt;FtuReqDetailsVO&lt;br /&gt;Create the VO in the ftu.oracle.apps.icx.por.reqmgmt.server&lt;br /&gt;Package. Add transient attribute Item Number to your extended VO.&lt;br /&gt;Substitute new VO FtuReqDetailsVO for the existing VO ReqDetailsVO.For details of how to substitute one VO for another ,look at the steps listed in the&lt;br /&gt;OAF Implementation Guide.&lt;br /&gt;Similarly extend the controller class ReqDetailsCO to FtuReqDetailsCO and a new method in process request () like "ftuItemNumberDisplay". Invoke this method through application module.&lt;br /&gt;Extend the application module ReqMgmtAM TO FtuReqMgmtAM, so that we extend the application module and write our custom logic inside the method "ftuItemNumberDisplay" in FtuReqMgmtAM, in order to retrieve value of Item Number&lt;br /&gt;Run ShoppingHomePG and navigate to the present page in order to see the result of our personalization and extension. We see the following result &lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;img id="BLOGGER_PHOTO_ID_5077941131216559746" style="DISPLAY: block; MARGIN: 0px auto 10px; CURSOR: hand; TEXT-ALIGN: center" height="216" alt="" src="http://3.bp.blogspot.com/_pm9lRhnES5k/Rnh4jgSCHoI/AAAAAAAAAJw/7zkBIKqPHxw/s320/tttttt.JPG" width="352" border="0" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a name="_Toc142467626"&gt;6. Deploying your extensions on the application server&lt;/a&gt;&lt;br /&gt;In order to deploy your extensions follow these steps:&lt;br /&gt;1. Compile your Java files in JDeveloper and zip up your Java classes to the&lt;br /&gt;&lt;$JAVA_TOP&gt;/&lt;named&gt;/ oracle/apps/&lt;path&gt;&lt;br /&gt;Hence in our case we, put the all the class files from C:\JDev\jdevhome\jdev\myprojects\ftu\oracle\apps\icx\por\reqmgmt\server&lt;br /&gt;To &lt;$JAVA_TOP&gt; /ftu/oracle/apps/icx/por/reqmgmt/server in the application unix server.&lt;br /&gt;Run the jpx import utility to import substitutions specified in the .jpx definition file to the MDS repository of application server. Hence, in our case we have OAProject2.jpx file which is used for extracting substitutions on application server. For details of how to jpx import utility, look at the steps listed in the OAF Implementation Guide.&lt;br /&gt;Note: Each JDeveloper project has one .jpx file. If you have more than one JDeveloper project where you have created substitutions, you can import the substitutions specified in the respective .jpx file from each project, one after another. If you deploy substitutions for the same component more than once, the latest substitution will take precedence, replacing the existing substitution for that component.&lt;br /&gt;3. Bounce the web server&lt;br /&gt;4. Review your deployed extensions&lt;br /&gt;At this point the deployment of your extension is complete, and you should be able to login to your application to verify that your changes have successfully taken effect.&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4890411074348189661-7049814031775225901?l=mukx.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mukx.blogspot.com/feeds/7049814031775225901/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4890411074348189661&amp;postID=7049814031775225901' title='44 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7049814031775225901'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4890411074348189661/posts/default/7049814031775225901'/><link rel='alternate' type='text/html' href='http://mukx.blogspot.com/2007/06/extensions-in-oa-framework-by-mukul.html' title='Extensions in OA framework'/><author><name>Mukul</name><uri>http://www.blogger.com/profile/05550600691296960397</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://1.bp.blogspot.com/-AQunc4UxY2E/Tpp71i--OwI/AAAAAAAAAuI/vG9Q6zEsMpk/s220/276206_100000536320519_2312023_n.jpg'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_pm9lRhnES5k/RmDu5m3osQI/AAAAAAAAAAM/iBH03xcuFX4/s72-c/aa.JPG' height='72' width='72'/><thr:total>44</thr:total></entry></feed>
