<?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-4496361440376457974</id><updated>2012-01-25T00:07:02.322-08:00</updated><category term='Pivot'/><category term='PPR'/><category term='MySQL'/><category term='ADF Mobile'/><category term='ADF Model'/><category term='addPartialTarget'/><category term='Java'/><category term='ADF BC'/><category term='af:query'/><category term='ADF'/><category term='partialTriggers'/><category term='JDeveloper'/><category term='EJB'/><category term='Model Parameters'/><category term='af:outputFormatted'/><category term='NDOption'/><category term='ADF Controller'/><category term='choicelist'/><category term='JSF'/><category term='af:outputText'/><category term='ADF Faces'/><category term='SkipValidation'/><category term='query panel'/><category term='ELResolver'/><category term='LOV'/><category term='Target Unreachable'/><title type='text'>Decompiling ADF Binaries</title><subtitle type='html'>Oracle ADF is a powerful application framework for building next generation enterprise applications. This blog discusses some interesting use case scenarios and solutions using ADF and the underlying Java EE technologies.
&lt;br&gt;&lt;br&gt;The views expressed on this blog are my own and do not necessarily reflect the views of my employer.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default?start-index=101&amp;max-results=100'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>179</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3141608897947090031</id><published>2012-01-18T22:55:00.000-08:00</published><updated>2012-01-19T07:47:23.127-08:00</updated><title type='text'>In-Memory Filtering Without Affecting  Default Row Set</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Noticed the following requirement (multiple times) while working with ADF developers - Find out rows in the default row set that meets specific conditions  - In other words, perform in-memory filtering without affecting the primary row set.&lt;br /&gt;By default, when you apply in-memory filtering&amp;nbsp; using ViewCriteria or RowMatch, they are applied on default row set.The following code snippet may help you to perform in memory filtering without affecting your default row set-&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; CountriesViewImpl countriesViewImpl = (CountriesViewImpl)getCountriesView1();  &lt;br /&gt; countriesViewImpl.executeQuery();  &lt;br /&gt; //Define VC for in-memroy filtering  &lt;br /&gt; ViewCriteria vc = countriesViewImpl.createViewCriteria();  &lt;br /&gt; vc.setCriteriaMode(ViewCriteria.CRITERIA_MODE_CACHE);  &lt;br /&gt; ViewCriteriaRow vcr1 = vc.createViewCriteriaRow();  &lt;br /&gt; vcr1.setAttribute("CountryName", "LIKE A%");  &lt;br /&gt; vc.add(vcr1);  &lt;br /&gt; //Override 'protected' findByViewCriteriaForViewRowSet in CountriesViewImpl  &lt;br /&gt; //and mark it as 'public' so that client can call this API  &lt;br /&gt; RowIterator rowIter =  &lt;br /&gt;      countriesViewImpl.findByViewCriteriaForViewRowSet(getCountriesView1().getDefaultRowSet(), vc, 50,  &lt;br /&gt;                                                                   ViewObject.QUERY_MODE_SCAN_VIEW_ROWS, null, null);  &lt;br /&gt; while(rowIter.hasNext()){  &lt;br /&gt;   Row row=rowIter.next();  &lt;br /&gt;      //Work with filterered rows  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3141608897947090031?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3141608897947090031/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3141608897947090031' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3141608897947090031'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3141608897947090031'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2012/01/in-memory-filtering-wihtout-affecting.html' title='In-Memory Filtering Without Affecting  Default Row Set'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-50453070566296270</id><published>2012-01-12T21:04:00.000-08:00</published><updated>2012-01-13T00:43:11.628-08:00</updated><title type='text'>Displaying Transaction Log When User Commits a Transaction</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I'm&amp;nbsp;attaching&amp;nbsp;a simple example that illustrates a possible solution to display number of rows(new,&amp;nbsp;modified, &amp;nbsp;deleted) posted to database when user commits transaction.&lt;br /&gt;&lt;br /&gt;This example overrides EntityImpl::doDML(int operation, TransactionEvent e) method to track the status of entities and save the log in&amp;nbsp;UserData hash table object from the DBTransaction. The custom AppModuleImpl::commitTransactionWithStatusLog() does the commit and returns the transaction log as Map to the client which is&amp;nbsp;displayed&amp;nbsp;on the UI in the 'statusbar' facet for the table(wrapped by af:panelCollection). If you are interested, take a look at the custom variable binding in the page&amp;nbsp;definition&amp;nbsp;file in the attached sample. This basically does the wiring job &amp;nbsp;for the returned Map by commitTransactionWithStatusLog() method. May be useful for you later :)&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/StatusSample.zip"&gt;download the sample workspace from here&lt;/a&gt;. [Runs with Oracle JDeveloper 11.1.2.1.0 (11g R2PS1) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run test.jsf&lt;br /&gt;2. Modify rows on the table and click on 'Commit Transaction With Status Log'. Application displays transaction&amp;nbsp;status&amp;nbsp;(rows modified, deleted, inserted) in the status bar.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-50453070566296270?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/50453070566296270/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=50453070566296270' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/50453070566296270'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/50453070566296270'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2012/01/displaying-transaction-log-when-user.html' title='Displaying Transaction Log When User Commits a Transaction'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-2969631509635130542</id><published>2012-01-09T08:22:00.000-08:00</published><updated>2012-01-09T21:25:37.628-08:00</updated><title type='text'>Consuming ADF BC model project components from another project !</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This year, let me start my posts with a simple topic.There are multiple ways to expose a project for use by other projects. One obvious approach is generate an ADF library artefact and consume it from other projects. This is documented in Fusion Middleware Fusion Developer's Guide -&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/reusing_components.htm#ADFFD1855"&gt;Packaging a Reusable ADF Component into an ADF Library&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/reusing_components.htm#ADFFD1863"&gt;Adding ADF Library Components into Projects&lt;/a&gt;&amp;nbsp;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&amp;nbsp;The above things are well and good. However if you you want to consume a ADF BC model project within same workspace, there is an easy way.&lt;br /&gt;&lt;br /&gt;To consume business components defined in a model project from another model project within the same work space,&lt;br /&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Right click the model project which consumes business components from other model projects in the same workspace and select Project Properties.In the Project Properties dialogue window,  select the Dependencies tab and add the 'supplier' Project by either selecting Build Output option or Jar archive option .&lt;/li&gt;&lt;li&gt;The above steps is enough to consume Java classes from the dependent model project. To consume business components follow Step 3.&amp;nbsp;&lt;/li&gt;&lt;li&gt;Once you define the dependencies for the consumer project, in the Project Properties window, select &lt;b&gt;Imports &lt;/b&gt;option displayed below the &lt;b&gt;ADF Business Component&lt;/b&gt; node. Click &lt;b&gt;Import &lt;/b&gt;button, select the desired &lt;b&gt;jpx &lt;/b&gt;file (jpx for the project whose business&amp;nbsp;components needs to be imported to the&amp;nbsp;consumer project)&amp;nbsp;using&amp;nbsp;file browser and then select the  components that needs to be imported to the consumer project as shown in the following diagram.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-w0q7LBu3wVc/TwsSdmyZ4CI/AAAAAAAADR0/Tc2wo49uTZY/s1600/Untitled.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="227" src="http://2.bp.blogspot.com/-w0q7LBu3wVc/TwsSdmyZ4CI/AAAAAAAADR0/Tc2wo49uTZY/s320/Untitled.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;You are done with the import task. Now IDE will start exposing business&amp;nbsp;components&amp;nbsp;in the&amp;nbsp;consumer&amp;nbsp;project.&lt;br /&gt;&lt;br /&gt;Please note that, ADF development team is working on the 'dependency management'&amp;nbsp;feature&amp;nbsp;to make it more user friendly so that specifying&amp;nbsp;dependency&amp;nbsp;may be enough to consume business components from dependent project. Stay tuned, will keep you posted !&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-2969631509635130542?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/2969631509635130542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=2969631509635130542' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2969631509635130542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2969631509635130542'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2012/01/consuming-adf-bc-model-project.html' title='Consuming ADF BC model project components from another project !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-w0q7LBu3wVc/TwsSdmyZ4CI/AAAAAAAADR0/Tc2wo49uTZY/s72-c/Untitled.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-9196414611853857992</id><published>2011-12-29T21:53:00.000-08:00</published><updated>2011-12-29T21:53:12.239-08:00</updated><title type='text'>Happy and prosperous new year 2012</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;"&gt;New year is just 2 days away. It's time for us to plan new things, and carry all the learning from past to face new challenges of tomorrow. I wish you and your family a happy, joyous and prosperous new year 2012 !&lt;/span&gt;&lt;span style="font-family: &amp;quot;Arial&amp;quot;,&amp;quot;sans-serif&amp;quot;; font-size: 10pt;"&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-9196414611853857992?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/9196414611853857992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=9196414611853857992' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9196414611853857992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9196414611853857992'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/12/happy-and-prosperous-new-year-2012.html' title='Happy and prosperous new year 2012'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3598128208535619683</id><published>2011-12-18T07:31:00.000-08:00</published><updated>2011-12-18T20:47:05.399-08:00</updated><title type='text'>Some Tips on Application Module Usage</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;&lt;br /&gt;Copying some points related to application module configuration on top of what you see in the following chapter - &lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/bcampool.htm#sm0299"&gt;44 Tuning Application Module Pools and Connection Pools&lt;/a&gt;&lt;br /&gt; &lt;br /&gt;1. When a web client access a page a new AM instances will be created till the pool size crosses recycleThreshold.&lt;br /&gt;&lt;br /&gt;2.Call to Configuration.createRootApplicationModule(qualifiedAMDefName, configName); will use instance from the pool if poolsize &amp;gt; recycleThreshold and unreferenced (free) AM instances are available. &amp;nbsp;Later when client calls Configuration.releaseRootApplicationModule(applicationModule, true); will remove the instance- doesn't&amp;nbsp;matter how the instance is acquired&amp;nbsp;.&lt;br /&gt;&lt;br /&gt;3.Though the call Configuration.releaseRootApplicationModule(applicationModule, false/* remove flag */) , there is now way for a framework to identify the previously used AM instances if the client again calls Configuration.createRootApplicationModule(qualifiedAMDefName, configName) to create a new instance within the same request. However , with releaseRootApplicationModule(..., false) you do get the benefit of potentially reusing that AM (after it was reset) vs. creating a new AM. &amp;nbsp;Configuration.releaseRootApplicationModule(..., true), removes the AM from the pool. &amp;nbsp;Configuration.releaseRootApplicationModule(..., false) resets the AM and keeps it in the pool for future use.&lt;br /&gt;&lt;br /&gt;4. Framework uses LRU algorithm for selecting an AM instance from the pool for recycling/passivating its state &amp;nbsp;when new client request for AM.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3598128208535619683?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3598128208535619683/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3598128208535619683' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3598128208535619683'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3598128208535619683'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/12/some-tips-on-application-module-usage.html' title='Some Tips on Application Module Usage'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1871394752185330877</id><published>2011-12-05T05:59:00.001-08:00</published><updated>2011-12-05T16:44:11.403-08:00</updated><title type='text'>Calling Application Module Methods from EJB and MDB</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Sometime back I blogged about using JMS with ADF BC&amp;nbsp;&lt;a href="http://jobinesh.blogspot.com/2011/04/using-jms-with-adf-business-components.html"&gt;http://jobinesh.blogspot.com/2011/04/using-jms-with-adf-business-components.html&lt;/a&gt;&amp;nbsp;. I'm revisiting this topic with another example&amp;nbsp;illustrating&amp;nbsp;the usage of application&amp;nbsp;module&amp;nbsp;methods from EJB and MDB. The sample uses XA Data source which will help you to force both AM and EJB to share same db transaction. Note that, &amp;nbsp;I'm calling ApplicationModule::postChangesToDB() to post changes to database when AM method is used inside EJB method, leaving the 'commit' call to the underlying container.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/ADFJavaEEAppSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.Refer the&lt;a href="http://jobinesh.blogspot.com/2011/04/using-jms-with-adf-business-components.html"&gt;&amp;nbsp;previous pos&lt;/a&gt;t for setting up the MDB used in the sample + Configure XA Datasource with JNDI name jdbc/HRDS&lt;br /&gt;&lt;div&gt;[Runs with Oracle JDeveloper 11g R2 PS1 + HR Schema]&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1871394752185330877?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1871394752185330877/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1871394752185330877' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1871394752185330877'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1871394752185330877'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/12/calling-application-module-methods-from.html' title='Calling Application Module Methods from EJB and MDB'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-2812537716519512851</id><published>2011-11-14T20:32:00.001-08:00</published><updated>2011-11-14T20:33:27.006-08:00</updated><title type='text'>JDeveloper and ADF Satisfaction Survey - Need Your Input</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Please check this out -&amp;nbsp; &lt;a href="http://blogs.oracle.com/jdeveloperpm/entry/jdeveloper_and_adf_satisfaction_survey"&gt;JDeveloper and ADF Satisfaction Survey - Need Your Input &lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-2812537716519512851?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/2812537716519512851/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=2812537716519512851' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2812537716519512851'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2812537716519512851'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/11/jdeveloper-and-adf-satisfaction-survey.html' title='JDeveloper and ADF Satisfaction Survey - Need Your Input'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6869592085332979393</id><published>2011-10-25T00:50:00.000-07:00</published><updated>2011-10-25T00:51:38.807-07:00</updated><title type='text'>Reading adf-config.xml entires...</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you want to read the adf-config.xml entries from Java code, try getting ADFConfig object from  ADFContext and read the map of entries by passing specific name spaces. An example is copied below-&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &lt;br /&gt; ADFContext aDFContext = ADFContext.getCurrent();  &lt;br /&gt; ADFConfig adfConfig= aDFContext.getADFConfig();  &lt;br /&gt; Map map= adfConfig.getConfigObject("http://xmlns.oracle.com/adfm/config");  &lt;br /&gt; Long rowLimit=(Long)map.get("jbo.row.limit");  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6869592085332979393?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6869592085332979393/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6869592085332979393' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6869592085332979393'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6869592085332979393'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/10/reading-adf-configxml-entires.html' title='Reading adf-config.xml entires...'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3829609802588467858</id><published>2011-10-13T07:14:00.000-07:00</published><updated>2011-10-13T07:14:57.184-07:00</updated><title type='text'>An example for af:treeTable with af:inputComboboxListOfValues</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Copying simple example for af:treeTable whose child column displays  af:inputComboboxListOfValues component &lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &lt;br /&gt;&amp;lt;af:treeTable value="#{bindings.DepartmentsView2.treeModel}" var="node"  &lt;br /&gt;                 selectionListener="#{bindings.DepartmentsView2.treeModel.makeCurrent}" rowSelection="single"  &lt;br /&gt;                 id="tt1"&amp;gt;  &lt;br /&gt;      &amp;lt;f:facet name="nodeStamp"&amp;gt;  &lt;br /&gt;           &amp;lt;af:column id="c1"&amp;gt;  &lt;br /&gt;                &amp;lt;af:outputText value="#{node}" id="ot1"/&amp;gt;  &lt;br /&gt;           &amp;lt;/af:column&amp;gt;  &lt;br /&gt;      &amp;lt;/f:facet&amp;gt;  &lt;br /&gt;      &amp;lt;f:facet name="pathStamp"&amp;gt;  &lt;br /&gt;           &amp;lt;af:outputText value="#{node}" id="ot2"/&amp;gt;  &lt;br /&gt;      &amp;lt;/f:facet&amp;gt;  &lt;br /&gt;      &amp;lt;af:column headerText="Manager ID" id="c10"&amp;gt;  &lt;br /&gt;           &amp;lt;af:inputComboboxListOfValues &lt;b&gt;rendered="#{not empty node.EmployeeId}"&lt;/b&gt; id="managerIdId"&lt;br /&gt;                                               popupTitle="Search and Select #{node.bindings.ManagerId.label}"  &lt;br /&gt;                                               value="#{node.bindings.ManagerId.inputValue}"  &lt;br /&gt;                                               model="#{node.bindings.ManagerId.listOfValuesModel}"  &lt;br /&gt;                                               partialTriggers="it9" label="LOV"&amp;gt;  &lt;br /&gt;                &amp;lt;f:validator binding="#{node.bindings.ManagerId.validator}"/&amp;gt;  &lt;br /&gt;                &amp;lt;af:convertNumber groupingUsed="false" pattern="#{node.bindings.ManagerId.format}"/&amp;gt;  &lt;br /&gt;           &amp;lt;/af:inputComboboxListOfValues&amp;gt;  &lt;br /&gt;      &amp;lt;/af:column&amp;gt;  &lt;br /&gt;      &amp;lt;af:column headerText="Dept ID" id="c11"&amp;gt;  &lt;br /&gt;           &amp;lt;af:inputText value="#{node.bindings.DepartmentId.inputValue}" id="it9" autoSubmit="true"  &lt;br /&gt;                           label="DeptId"&amp;gt;  &lt;br /&gt;                &amp;lt;f:validator binding="#{node.bindings.DepartmentId.validator}"/&amp;gt;  &lt;br /&gt;                &amp;lt;af:convertNumber groupingUsed="false" pattern="#{node.bindings.DepartmentId.format}"/&amp;gt;  &lt;br /&gt;           &amp;lt;/af:inputText&amp;gt;  &lt;br /&gt;      &amp;lt;/af:column&amp;gt;  &lt;br /&gt; &amp;lt;/af:treeTable&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3829609802588467858?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3829609802588467858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3829609802588467858' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3829609802588467858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3829609802588467858'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/10/example-for-aftreetable-with.html' title='An example for af:treeTable with af:inputComboboxListOfValues'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4462088339708619934</id><published>2011-10-12T04:48:00.000-07:00</published><updated>2011-10-12T04:48:41.529-07:00</updated><title type='text'>Your Chance to Change the ADF Future !</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;An excellent initiative. Refer Grant's blog post -&lt;b&gt; &lt;a href="http://blogs.oracle.com/grantronald/entry/your_chance_to_change_the"&gt;Your Chance to Change the ADF Future&lt;/a&gt;&lt;/b&gt;&amp;nbsp; for more details.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4462088339708619934?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4462088339708619934/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4462088339708619934' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4462088339708619934'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4462088339708619934'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/10/your-chance-to-change-adf-future.html' title='Your Chance to Change the ADF Future !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7413002174179002583</id><published>2011-10-09T22:47:00.000-07:00</published><updated>2011-10-09T22:50:53.884-07:00</updated><title type='text'>Validating The Entity Collection When You Commit the Transaction</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In this post I'm sharing an approach to trigger the validation once for the entire entity collection when you commit the transaction.Steps :&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Define a method validator for the entity object. In the Add Validation Rule dialog, select the Validation Execution tab, and choose Defer the execution to Transaction Level&amp;nbsp;&lt;/li&gt;&lt;li&gt; Implement the validation method in your entity implementation class. An example is shown below:&lt;/li&gt;&lt;/ul&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed #999999; color: black; font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;    /**&lt;br /&gt;     * Validation method for Departments.&lt;br /&gt;     */&lt;br /&gt;    public boolean validateDepartments(ArrayList ctxList) {&lt;br /&gt;&lt;br /&gt;        Iterator iter = ctxList.iterator();&lt;br /&gt;        while (iter.hasNext()) {&lt;br /&gt;            JboValidatorContext entValContext = (JboValidatorContext)iter.next();&lt;br /&gt;            DepartmentsImpl deptEO = (DepartmentsImpl)entValContext.getSource();&lt;br /&gt;            if (deptEO.getDepartmentName() == null) {&lt;br /&gt;                // if Dept is null, throw error- this is just an example to illustrate the usage of this method&lt;br /&gt;                return false;&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        return true;&lt;br /&gt;    }&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Ope the page which uses the above entity, keep  SkipValidation="skipDataControls" in the page definition file&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You &lt;a href="http://adf-samples.googlecode.com/files/TxnlLevelValidateSample.zip"&gt;can download the sample workspace from here&lt;/a&gt;.[Runs with Oracle JDeveloper 11.1.2.1.0 (11g R2PS1) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run test.jsf&lt;br /&gt;2. Nullify Department name field in multiple rows and click Commit. Validation gets triggered only once for the entire collection when you press commit.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7413002174179002583?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7413002174179002583/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7413002174179002583' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7413002174179002583'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7413002174179002583'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/10/validating-entity-collection-when-you.html' title='Validating The Entity Collection When You Commit the Transaction'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3464604021685999909</id><published>2011-09-24T07:19:00.000-07:00</published><updated>2011-09-24T22:36:11.535-07:00</updated><title type='text'>What you may need to know about DBTransaction::postChanges()</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In some specific use case scenarios both entity objects and stored procedures may need to co exist in your business logic implementation. This may arise if you are migrating(replacing) existing applications with ADF based application, and your customer wants to reuse some pieces from the legacy application.&amp;nbsp;When you start identifying reusable&amp;nbsp;pieces, in most of the cases, all eyes may be on stored procedures - we may need to accept the realities ;).&amp;nbsp;As the data update logic is scattered across entity objects and stored procedure you may end up in calling &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/DBTransactionImpl.html#postChanges()"&gt;DBTransaction::postChanges()&lt;/a&gt; to post the entity changes to data base before invoking stored procedure. Usage of DBTransaction::postChanges() is permitted if you commit the transaction within the same request. However there are some points you may need to aware of to make your implementation more perfect.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;To understand the DBTransaction::postChanges(), let us take step back and analyze the transaction commit cycle first. Consider a typical use case , where you have modified entity data, and finally you call &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/DBTransactionImpl.html#commit()"&gt;DBTransaction::commit ()&lt;/a&gt; to commit the&amp;nbsp;transaction.&lt;br /&gt;The sequence of actions that happens behind the transaction commit cycle are as follows:&lt;br /&gt;The DBTransactionImpl  calls...&lt;br /&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;applicationModule::beforeCommit()&amp;nbsp;&lt;/li&gt;&lt;li&gt;validate for each entry in validation listener list ( this in turn validates each EO )&lt;/li&gt;&lt;li&gt;applicationModule::afterCommit()&amp;nbsp;&lt;/li&gt;&lt;li&gt;postChanges() on each entry in transaction post listener list&amp;nbsp;&lt;/li&gt;&lt;li&gt;beforeCommit  for each entry in  transaction listener list&amp;nbsp;&lt;/li&gt;&lt;li&gt;commit transaction&amp;nbsp;&lt;/li&gt;&lt;li&gt;afterCommit() for each entry in  transaction listener list - EO/VO cache is cleared based on the configurations.&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;DBTransactionImpl maintains 3 lists to carry out the commit cycle. 1.  validation listener list 2.  transaction post listener list  3.transaction listener list.  When you dirty an EO instance, it will get added to these three lists. If you call DBTransaction::postChanges(), step 4 alone gets executed from the above sequence and this operation clears transaction post listener list  alone.In nutshell  EOs will remain attached to the validate/transaction listener list till you call commit. This may have some side effect in certain scenarios.&lt;br /&gt;&amp;nbsp;In case if you need to invoke postChanges() multiple times, you can manually clear the above said lists as shown in the following code snippet&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;    // Get VewRowImpl someVewRowImpl from VO  &lt;br /&gt;    someVewRowImpl.setAttribute( "SomeAttrib","New Value");  &lt;br /&gt;    EntityImpl someEOImpl = someVewRowImpl.getEntity(0);  &lt;br /&gt;    DBTransaction txn = getDBTransaction();  &lt;br /&gt;    txn.validate();  &lt;br /&gt;    txn.postChanges();  &lt;br /&gt;    txn.removeTransactionPostListener(someEOImpl); &lt;br /&gt; &lt;br /&gt;    //The below two lines may cause your EO to skip &lt;br /&gt;    // beforeCommit() and afterCommit() call backs.&lt;br /&gt;    //Normally you can skip the below two lines, &lt;br /&gt;    // use it if you need to clear the EO cache once data is posted to DB&lt;br /&gt;    // This makes sense if you have millions of rows in an update and&lt;br /&gt;    // and you want to get rid of the cached rows without any delay&lt;br /&gt;    txn.removeTransactionListener(someEOImpl); &lt;br /&gt;    txn.clearEntityCache(null);  &amp;nbsp;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3464604021685999909?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3464604021685999909/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3464604021685999909' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3464604021685999909'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3464604021685999909'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/what-you-may-need-to-know-about.html' title='What you may need to know about DBTransaction::postChanges()'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>5</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3011826595750616271</id><published>2011-09-23T09:01:00.001-07:00</published><updated>2011-09-23T09:01:24.721-07:00</updated><title type='text'>Opening with Oracle ADF Team India</title><content type='html'>Check out &lt;a href="https://irecruitment.oracle.com/OA_HTML/OA.jsp?OAFunc=IRC_VIS_VAC_DISPLAY&amp;OAMC=R&amp;p_svid=1600560&amp;p_spid=1652883"&gt;Job: IRC1600560 in irecruitment.oracle.com &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3011826595750616271?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3011826595750616271/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3011826595750616271' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3011826595750616271'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3011826595750616271'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/opening-with-oracle-adf-team-india.html' title='Opening with Oracle ADF Team India'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5539826578169482364</id><published>2011-09-14T21:42:00.000-07:00</published><updated>2011-09-14T21:44:10.806-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Controller'/><title type='text'>Forcing Task Flow instances with Shared Data Control to use different view object instances</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you have have a task flow designed to use shared data control, and still don't want different instances of task flows to use same view object instances, then this post is for you.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Use case:&lt;/b&gt; Multiple instances of task flow should share same transaction context, however each UI should work independently when they are embedded in a parent page. As of now, there is no direct support for this. In this post I'm sharing a work around solution for this kind of scenario.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution:&lt;/b&gt; As I said earlier, this is just a work around solution, and intended to give you some idea on the implementation. Feel free to modify the code in the attached sample to meet your use cases. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1&lt;/b&gt;. Edit the iterator used for for those pages fragments which needs to work independently, and alter binding for the view object instance used for this iterator to use an EL. EL takes the view object instance name from a PageFlow scoped variable.  &lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;iterator &lt;b&gt;Binds="#{pageFlowScope.VOInstName}" &lt;/b&gt;RangeSize="25" DataControl="AppModuleDataControl" id="DepartmentsView1Iterator"/&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step 2.&lt;/b&gt; The PageFlow scoped variable that stores view object instance name used in the EL(step1 ) is populated from task flow initializer with some unique names. Task flow has a default method activity defined which will create corresponding view object instance in the Application Module before showing the page.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You &lt;b&gt;&lt;a href="http://adf-samples.googlecode.com/files/TaskflowWithTrickyDCScope.zip"&gt;can download the sample workspace from here&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run main.jsf. &lt;br /&gt;This page contains multiple instances of dept-task-flow-definition. However the page fragment used in each instances of task flow works independently using different view object instances eve though the dept-task-flow-definition has shared Data Control scope. This is done using the above idea. Take a look at TaskFlowDCHelper class to learn more about the implementation. Method TaskFlowDCHelper::initDataSource() generates the view object instance name for each instance and the same is set as initializer for dept-task-flow-definition. Method TaskFlowDCHelper::cleanupDataSource() is set as finalizer for task flow.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Di-IB1BhDec/TnDMwhXyAWI/AAAAAAAAC8s/y_ryyiUTZa0/s1600/taskflow.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="316" src="http://3.bp.blogspot.com/-Di-IB1BhDec/TnDMwhXyAWI/AAAAAAAAC8s/y_ryyiUTZa0/s320/taskflow.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5539826578169482364?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5539826578169482364/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5539826578169482364' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5539826578169482364'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5539826578169482364'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/forcing-task-flow-instances-with-shared.html' title='Forcing Task Flow instances with Shared Data Control to use different view object instances'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Di-IB1BhDec/TnDMwhXyAWI/AAAAAAAAC8s/y_ryyiUTZa0/s72-c/taskflow.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-791212125132147570</id><published>2011-09-14T02:59:00.000-07:00</published><updated>2011-09-14T04:41:05.162-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Transient attributes as Primary Key for a View Object, a bad idea?</title><content type='html'>Answer is YES for certain use cases where&lt;br /&gt;1. Recalculation of transient attributes are expensive and&lt;br /&gt;2. If the run time needs to touch PK attribute multiple times while serving requests from a client. An example for this scenario may be expanding multiple level of tree node. Please note that in this case the value of transient attributes are getting recalculated each time. In such scenarios, better go for other option like SQL derived attributes, if feasible.&lt;br /&gt;&lt;br /&gt;Thanks to Blaise Ribet who shared this point!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-791212125132147570?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/791212125132147570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=791212125132147570' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/791212125132147570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/791212125132147570'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/transient-attributes-as-primary-key-for.html' title='Transient attributes as Primary Key for a View Object, a bad idea?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-2238668357333167017</id><published>2011-09-06T00:16:00.000-07:00</published><updated>2012-01-12T21:18:49.887-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Programmatically switching LOV queries at run time</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In today's post, I'm Sharing a simple application which make use of &lt;a href="http://jobinesh.blogspot.com/2011/05/preparing-viewobjects-query-for.html"&gt;&lt;b&gt;ViewObjectImpl::prepareRowSetForQuery(ViewRowSetImpl vrs)&lt;/b&gt;&lt;/a&gt; on LOV source view object to alter the query at run time. LOV switcher is the ideal solution to switch LOVs at runtime. However there are odd scenarios where you may have N number of data sources for LOV which is known only at run time. This approach may work for you in such cases. [ The concept used in this post is inspired by a solution provided by Steve Muench in an internal discussion thread ]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;b&gt; &lt;a href="http://adf-samples.googlecode.com/files/DynamicLOVSwitchingModified.zip"&gt;download the sample workspace from here&lt;/a&gt;&lt;/b&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2)  + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run test.jspx&lt;br /&gt;2. Data source for LOV defined on ManagerId changes based on the values keyed in for DepartmentId field. If you leave Department empty, data is queried from EMPLOYEES table. If DepartmentId present for the row data for LOV is queried from DEPARTMENTS table for DepartmentId. The query switching is done programmatically from the over ridden prepareRowSetForQuery(...) method. Note that ViewObject definition doesn't change in the implementation, query alone changes.&lt;br /&gt;&lt;br /&gt;Please see ManagerViewObjImpl::prepareRowSetForQuery(ViewRowSetImpl vrs) to learn more about the query switching details.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-2238668357333167017?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/2238668357333167017/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=2238668357333167017' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2238668357333167017'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2238668357333167017'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/programmatically-switching-lov-queries.html' title='Programmatically switching LOV queries at run time'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8751985719354989033</id><published>2011-09-01T21:30:00.000-07:00</published><updated>2011-09-01T21:31:25.362-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>Hot Deployment - What Works, What Doesn't, What's Promising</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hot Deployment was one of the coolest feature of 11.1.2.0.0 release. Look like there are lot of confusion centered around on this topic. This post is meant for clarifying the offerings on Hot Deployment available with JDeveloper 11.1.2.0.0 release&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hot Deployment - What Works and What's Promising?&lt;/b&gt;&lt;br /&gt;Please see &lt;b&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/web_testdebug.htm#ADFFD23078"&gt;36.4 Reloading Oracle ADF Metadata in Integrated WebLogic Server&lt;/a&gt;&lt;/b&gt; in Fusion Developers Guide. Below is the excerpt for your quick reference ....&lt;br /&gt;&lt;br /&gt;&lt;blockquote class=""&gt;JDeveloper support for hot reloading of Oracle ADF metadata is an alternative to quitting the running application, editing your project's XML definition files, redeploying, and rerunning the application in Integrated WebLogic Server to view the latest changes.&lt;br /&gt;Changes that you make to the Fusion web application projects will not be picked up automatically by an application that you have deployed to Integrated WebLogic Server. You can, however, reload metadata from the data model project and user interface project any time you want to synchronize the running application with changes you have made to your application's XML definition files.&lt;br /&gt;To reload metadata so your changes are reflected in the deployed Fusion web application, you must recompile the project and refresh the web browser.&lt;br /&gt;Metadata that JDeveloper will hot reload in Integrated WebLogic Server, include:&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;In the data model project, changes to the definition files of business components.&lt;/li&gt;&lt;li&gt;In the user interface project, changes to the binding definitions in the page definition files and changes to task flows in the task flow definition files.&lt;/li&gt;&lt;/ul&gt;This support makes it possible to make incremental changes and test them.&lt;/blockquote&gt;&lt;br /&gt;&lt;b&gt;What doesn't work and why?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, simply changing the meta xml files or class files will not have any effect on runtime unless you recompile the project and refresh the web browser. This is because the DefinitionManager responsible for detecting meta xml file changes will not check the source folder for changes,rather it will scan output path for modified items. Apparently recompiling the project copy the meta files and class files to the output folder and all works after this step.&lt;br /&gt;&lt;br /&gt;Please note that, your web page will continue detecting the changes dynamically(without recompiling the project) as it was doing in prior releases.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8751985719354989033?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8751985719354989033/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8751985719354989033' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8751985719354989033'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8751985719354989033'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/09/hot-deployment-what-works-what-doesnt.html' title='Hot Deployment - What Works, What Doesn&apos;t, What&apos;s Promising'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-394556972077763076</id><published>2011-08-25T04:40:00.000-07:00</published><updated>2011-08-25T04:40:47.232-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>Compiling large projects from JDeveloper</title><content type='html'>If you are running in to out of memory error while compiling huge projects from JDeveloper, this tips is for you.&lt;br /&gt;&lt;br /&gt;JDeveloper will let you to compile the project outside of JDeveloper process where the compiler can enjoy more heap size(which doesn't need to be shared with JDeveloper). To do this select the Project, right click-&amp;gt; Project Properties and select Out of Process option. Optionally you can modify the default heap size as well.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Out-of-process compilations are useful for very large projects; an in-process compilation could run out of memory because it shares the memory space with the whole JDeveloper IDE.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Y2WwX4dsKWQ/TlYzBlq9NSI/AAAAAAAAC5k/Cgo6g3IRHjI/s1600/jdeve.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="278" width="400" src="http://4.bp.blogspot.com/-Y2WwX4dsKWQ/TlYzBlq9NSI/AAAAAAAAC5k/Cgo6g3IRHjI/s400/jdeve.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-394556972077763076?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/394556972077763076/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=394556972077763076' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/394556972077763076'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/394556972077763076'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/08/compiling-large-projects-from.html' title='Compiling large projects from JDeveloper'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Y2WwX4dsKWQ/TlYzBlq9NSI/AAAAAAAAC5k/Cgo6g3IRHjI/s72-c/jdeve.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5297873181511989208</id><published>2011-08-24T00:18:00.000-07:00</published><updated>2011-08-24T00:55:12.985-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>What you may need to know about data types for history columns which stores date and time?</title><content type='html'>When you choose history columns data types to store 'Date', please follow the following points:&lt;br /&gt;&lt;br /&gt;1. Always prefer &lt;b&gt;java.sql.Timestamp&lt;/b&gt; (or similar) over java.sql.Date for history column attribute type in an entity:&lt;br /&gt;&lt;br /&gt;Well,apart from the common benefits of using Timestamp over Date, there is one more point. The java.sql.Date will truncate the value(removing time comp) when the data is posted to data base. At this stage the database table is having truncated value and entity object has non truncated date. If the user again modifies the same row on the same date, the row consistence check may fail while posting data to database and you may get the below error&lt;br /&gt;&lt;br /&gt;&lt;i&gt;oracle.jbo.RowInconsistentException: JBO-25014: Another user has changed the row with primary key...&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;2. Make sure corresponding history column in database table is of type &lt;b&gt;TIMESTAMP&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;DATE contains the datetime fields YEAR, MONTH, DAY, HOUR, MINUTE, and SECOND. TIMESTAMP stores date and time as small as the nanosecond and  has the capability  to track the updates happens on the same records within same second (by single/multiple users).&lt;br /&gt;&lt;br /&gt;To learn more about history columns, please refer the following topic in Fusion Developers Guide&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcentities.htm#CIHCFGFC"&gt;&lt;b&gt;How to Track Created and Modified Dates Using the History Column&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5297873181511989208?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5297873181511989208/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5297873181511989208' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5297873181511989208'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5297873181511989208'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/08/what-you-may-need-to-know-about-data.html' title='What you may need to know about data types for history columns which stores date and time?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4775180895485840273</id><published>2011-08-21T22:54:00.000-07:00</published><updated>2011-08-21T22:54:07.851-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Long living Dynamic Business Components</title><content type='html'>Recently I came across an interesting post from  Juan Oropeza (Oracle) in an internal wiki, the code was illustrating dynamic ViewObject creation which lives beyond user sessions. Thanks to &lt;a href="http://blogs.oracle.com/smuenchadf/"&gt;Steve Muench&lt;/a&gt; who did help me to understand this thing better. Today's post is on this topic.&lt;br /&gt;&lt;br /&gt;What is so great about this concept? Well, there are few good stuff for you. Read on...&lt;br /&gt;&lt;br /&gt;In one of my previous post, I blogged about building dynamic UI -&lt;a href="http://jobinesh.blogspot.com/2010/06/model-driven-approach-for-building.html"&gt;&lt;b&gt;Model driven approach for building Dynamic UI&lt;/b&gt;&lt;/a&gt;. There the life of a dynamically created view object or entity object were limited to a user session in which they were created. What if you need the dynamically created ADF business components to be available across all user, beyond a specific user session. A real life use case may be adding couple of more attributes or validations on an existing View Object definition at run time which needs be reflected across all users. Well this is quite possible by getting the personalization definition of the ViewObject - &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/server/PDefViewObject.html"&gt;PDefViewObject&lt;/a&gt; and performing the alteration on it. Later, When an meta data for view object or entity definition is loaded, it checks for corresponding PDef object and, if present, superimpose the PDef on existing meta data. The end-user sees a definition that is the union of the base definition plus the additional personalizations. The below shown code snippet may help you to understand  the API to be used for altering view object which needs to live beyond the user session. Please note that   pDefVO.saveXMLContents() makes use of MDS to store the altered definition. To make this thing to work, you may need to have right entries added in your adf-config.xml.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; private boolean addLocAttributeToDeptView() {  &lt;br /&gt;      ViewDefImpl viewDef = ViewDefImpl.findDefObject("sessiondef.dynamic.DynamicDeptViewDef");  &lt;br /&gt;      PDefViewObject pDefVO = (PDefViewObject)viewDef.getPersDef();  &lt;br /&gt;      if (pDefVO == null) {  &lt;br /&gt;           pDefVO = new PDefViewObject();  &lt;br /&gt;           pDefVO.setFullName(viewDef.getFullName());  &lt;br /&gt;      }  &lt;br /&gt;      if (pDefVO.getAttributeIndexOf(ATTRIB_LOC_ID) != -1) {  &lt;br /&gt;           return false;  &lt;br /&gt;      }  &lt;br /&gt;      pDefVO.setEditable(true);  &lt;br /&gt;      pDefVO.addEntityAttribute(ATTRIB_LOC_ID, "DynamicDeptUsage", ATTRIB_LOC_ID, true);  &lt;br /&gt;      pDefVO.applyPersonalization(findViewObject(DYNAMIC_DETP_VO_INSTANCE));  &lt;br /&gt;      pDefVO.writeXMLContents();  &lt;br /&gt;      pDefVO.saveXMLContents();  &lt;br /&gt;      return true;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/PersonalisedBusinessComponents.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example uses personalizedbc-sample-task-flow-definition to create a dynamic entity object and view Object. The second step in the task flow alter the dynamic view object to add location id right before displaying the dynamically created VO  to end user. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-UOl8UsbB1Sg/TlHpqbHAk7I/AAAAAAAAC0E/z4J8owjg_2I/s1600/taskflowpdef.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="125" width="400" src="http://1.bp.blogspot.com/-UOl8UsbB1Sg/TlHpqbHAk7I/AAAAAAAAC0E/z4J8owjg_2I/s400/taskflowpdef.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The adf-config.xml used for this example has been configured to use file based MDS store to keep the dynamic business component definitions.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;persistence-config&amp;gt;  &lt;br /&gt;      &amp;lt;metadata-namespaces&amp;gt;  &lt;br /&gt;           &amp;lt;namespace path="/sessiondef" metadata-store-usage="mdsRepos"/&amp;gt;  &lt;br /&gt;           &amp;lt;namespace path="/persdef" metadata-store-usage="mdsRepos"/&amp;gt;  &lt;br /&gt;           &amp;lt;namespace path="/xliffBundles" metadata-store-usage="mdsRepos"/&amp;gt;  &lt;br /&gt;      &amp;lt;/metadata-namespaces&amp;gt;  &lt;br /&gt;      &amp;lt;metadata-store-usages&amp;gt;  &lt;br /&gt;           &amp;lt;metadata-store-usage id="mdsRepos" deploy-target="true" default-cust-store="true"/&amp;gt;  &lt;br /&gt;           &amp;lt;!-- &amp;lt;property name="metadata-path" value="/tmp"/&amp;gt; --&amp;gt;  &lt;br /&gt;      &amp;lt;/metadata-store-usages&amp;gt;  &lt;br /&gt; &amp;lt;/persistence-config&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run main.jspx&lt;br /&gt;2. This sample is security enabled. Key in user name/password as developer1/developer1, when asked for. &lt;br /&gt;3. The above mentioned task flow generates DynamicDeptEntityDef and DynamicDeptViewDef at runtime and saves the definition to MDS store. The DynamicDeptVO1 is exposed to client for use.&lt;br /&gt;4. Run the main.jsf once again and this time enter username/password as developer2/developer2. You may notice that previously created VO definition is available to the second user as well.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4775180895485840273?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4775180895485840273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4775180895485840273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4775180895485840273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4775180895485840273'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/08/long-living-dynamic-business-components.html' title='Long living Dynamic Business Components'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-UOl8UsbB1Sg/TlHpqbHAk7I/AAAAAAAAC0E/z4J8owjg_2I/s72-c/taskflowpdef.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4394251340594934630</id><published>2011-08-17T00:27:00.000-07:00</published><updated>2011-08-17T00:28:09.940-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>What you may need to know about useBindVarsForViewCriteriaLiterals in adf-config.xml?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The 11.1.2 release has introduced a new flag useBindVarsForViewCriteriaLiterals in your application's  adf-config.xml. &lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="US-ASCII" ?&amp;gt;  &lt;br /&gt; &amp;lt;adf-config .... &amp;gt;  &lt;br /&gt;   &amp;lt;adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"&amp;gt;  &lt;br /&gt;   &amp;lt;defaults &lt;b&gt;useBindVarsForViewCriteriaLiterals="true"&lt;/b&gt;/&amp;gt;  &lt;br /&gt;   ...  &lt;br /&gt;  &amp;lt;/adf-adfm-config&amp;gt;  &lt;br /&gt;   ...  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Idea is to force the run time to generate temporary bind variables instead of directly using literal values while generating WHERE clause for the ViewCriteria. The above said configuration is done at application level which will set &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/ViewCriteria.html#setUseBindVarsForLiterals(boolean)"&gt;ViewCriteria::setUseBindVarsForLiterals(true)&lt;/a&gt; for all VC instances.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;This will help to improve performance of query execution by caching SQLs&lt;/li&gt;&lt;li&gt;Reduce/avoid the chance for SQL injection&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4394251340594934630?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4394251340594934630/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4394251340594934630' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4394251340594934630'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4394251340594934630'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/08/what-you-may-need-to-know-about.html' title='What you may need to know about useBindVarsForViewCriteriaLiterals in adf-config.xml?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3284411926946003556</id><published>2011-07-29T05:40:00.000-07:00</published><updated>2011-07-29T05:40:02.150-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>Java SE 7 is now Generally Available!</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Check it out...&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/downloads/index.html"&gt;&lt;b&gt;Download Java SE 7 from OTN&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/java/javase/documentation/index.html"&gt;&lt;b&gt;Java SE 7 Documentation&lt;/b&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3284411926946003556?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3284411926946003556/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3284411926946003556' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3284411926946003556'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3284411926946003556'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/java-se-7-is-now-generally-available.html' title='Java SE 7 is now Generally Available!'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8674176745554746677</id><published>2011-07-28T23:44:00.000-07:00</published><updated>2011-07-29T21:37:51.951-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Clearing the stale messages from the previous request on client side validation error</title><content type='html'>While going through a specific use case, I came to know that ADF Faces run time does not auto clear the messages added to the page from the previous request. This indeed is the expected behavior as of now.  I'm sure many of you know this already, however thought of posting this for the benefit of developers who has not worked on such scenarios before, like me;).&lt;br /&gt;&lt;br /&gt;The side effect of this implementation is that, once you displayed any message to the end user by adding a FeacesMessage to a FacesConetxt from an event handler method and if the next immediadte action from the end user result in anay client side validation error, you may get the previous message and the newly generated validation error in the message window as shown in the following screen shot.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XZZnPq2_D3Q/TjJNGmnEPaI/AAAAAAAACzo/HM-jX91VA3s/s1600/error.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="353" width="394" src="http://3.bp.blogspot.com/-XZZnPq2_D3Q/TjJNGmnEPaI/AAAAAAAACzo/HM-jX91VA3s/s400/error.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Let me discuss a work around solution for such use cases. Its simple, add a  af:clientListener to the UI component to clear the messages by calling ADF Fcaes JavaScript API &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17489/oracle/adf/view/js/base/AdfPage.html#clearMessages_String_"&gt;AdfPage.PAGE.clearMessages(componentId);&lt;/a&gt;. &lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:commandButton text="Save with Clearing Prev Message"   &lt;br /&gt;      id="cb2" actionListener="#{TestBean.saveAction}"  &lt;br /&gt;   partialSubmit="true"&amp;gt;  &lt;br /&gt;      &amp;lt;af:clientListener method="clearGlobalMessage" type="click"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:commandButton&amp;gt;  &lt;br /&gt; &amp;lt;/af:form&amp;gt;  &lt;br /&gt; &amp;lt;af:resource type="javascript"&amp;gt;  &lt;br /&gt;  function clearGlobalMessage() {  &lt;br /&gt;       AdfPage.PAGE.clearMessages(null);  &lt;br /&gt;  }  &lt;br /&gt; &amp;lt;/af:resource&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I'm attaching a very simple example illustrating the above solution. You can &lt;a href="http://adf-samples.googlecode.com/files/ClearAllMessages.zip"&gt;&lt;b&gt;download&lt;/b&gt; the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Built using Oracle JDeveloper 11.1.2.0.0]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run test.jspx, key in some values in the input field and click save button. You may see information message. If you click save button again, validation error message alone appears.The previous INFO message is cleared using  javascript method clearGlobalMessage()&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Please note that, the above case will be addressed in future releases in a much better way. In fact there is an enhancement request for the same, be happy&lt;/i&gt; :)&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8674176745554746677?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8674176745554746677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8674176745554746677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8674176745554746677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8674176745554746677'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/clearing-stale-messages-from-previous.html' title='Clearing the stale messages from the previous request on client side validation error'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-XZZnPq2_D3Q/TjJNGmnEPaI/AAAAAAAACzo/HM-jX91VA3s/s72-c/error.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3380166554813155189</id><published>2011-07-24T22:47:00.002-07:00</published><updated>2011-07-24T22:54:18.907-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Tips on using oracle.jbo.domain.Array as NamedWhereClauseParam value</title><content type='html'>Sometime back I've blogged on &lt;a href="http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html"&gt;&lt;b&gt;Using oracle.jbo.domain.Array with ViewCriteria&lt;/b&gt;&lt;/a&gt;. Let me revisit the same topic with slightly different usage. There are many use cases where oracle.jbo.domain.Array is used as a NamedWhereClauseParam value, &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#setNamedWhereClauseParam(java.lang.String, java.lang.Object)"&gt;ViewObjectImpl::setNamedWhereClauseParam(name,value)&lt;/a&gt;. If you have such use cases and at run time you hit the following exception, then this blog post is for you ;)&lt;br /&gt;&lt;br /&gt;oracle.jbo.JboException: Cannot insert/update Array without context information at oracle.jbo.domain.Array.prepareForDML(Array.java:773) at oracle.jbo.server.ViewRowSetImpl.prepareLobObjectForBind(ViewRowSetImpl.java:8154) at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:5004) at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:4979) at &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you define bind variable at design time, you may need to key in ColumnType(db object to hold Array that you are passing) as well along with other attributes. Please see my previous &lt;a href="http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html"&gt;post&lt;/a&gt; if you are not aware of this part. All works well in this case. When you use &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#defineNamedWhereClauseParam(java.lang.String, java.lang.Object, int[])"&gt;ViewObjectImpl::defineNamedWhereClauseParam(...)&lt;/a&gt; to define bind variable for Array at run time, the definition is missing this entry and you may hit the above said error. The solution is to set the required context while creating oracle.jbo.domain.Array as shown in the following code snippet.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;String[] deptArray = { "Administration","Purchasing" };&lt;br /&gt;Array arr = new Array(deptArray);&lt;br /&gt;HashMap context = new HashMap();&lt;br /&gt;context.put(DomainContext.ELEMENT_SQL_NAME, "CHARTABLETYPE");&lt;br /&gt;context.put(DomainContext.ELEMENT_TYPE, String.class);&lt;br /&gt;arr.setContext(null, null, context);&lt;/blockquote&gt;&lt;br /&gt;I'm copying the relevant code below for your reference.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; public void findDepartmentsForArrayParam() {  &lt;br /&gt;  ViewObjectImpl deptVOImpl = getDepartmentsView1();  &lt;br /&gt;  deptVOImpl.defineNamedWhereClauseParam("ArrayOfDeptNames", null,  &lt;br /&gt;                                                null);  &lt;br /&gt;  deptVOImpl.setWhereClause("Departments.DEPARTMENT_NAME   &lt;br /&gt;      IN (SELECT * FROM TABLE(CAST(:ArrayOfDeptNames AS CHARTABLETYPE)))");  &lt;br /&gt;  deptVOImpl.setNamedWhereClauseParam("ArrayOfDeptNames",  &lt;br /&gt;                                              getValueAsArray());  &lt;br /&gt;  deptVOImpl.executeQuery();  &lt;br /&gt; }  &lt;br /&gt; public Array getValueAsArray() {  &lt;br /&gt;  Array arr = null;  &lt;br /&gt;  try {  &lt;br /&gt;      String[] deptArray = { "Administration","Purchasing" };  &lt;br /&gt;      arr = new Array(deptArray);  &lt;br /&gt;      HashMap context = new HashMap();  &lt;br /&gt;      context.put(DomainContext.ELEMENT_SQL_NAME, "CHARTABLETYPE");  &lt;br /&gt;      //CHARTABLETYPE is DB object&lt;br /&gt;      //CREATE OR REPLACE TYPE  "CHARTABLETYPE"  as table of varchar2(4000);&lt;br /&gt;      context.put(DomainContext.ELEMENT_TYPE, String.class);  &lt;br /&gt;      arr.setContext(null, null, context);  &lt;br /&gt;  } catch (Exception ex) {  &lt;br /&gt;      ex.printStackTrace();  &lt;br /&gt;  }  &lt;br /&gt;  return arr;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3380166554813155189?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3380166554813155189/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3380166554813155189' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3380166554813155189'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3380166554813155189'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/tips-on-using-oraclejbodomainarray-as_24.html' title='Tips on using oracle.jbo.domain.Array as NamedWhereClauseParam value'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-9001528206427676273</id><published>2011-07-24T22:47:00.000-07:00</published><updated>2011-07-24T22:47:50.970-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Tips on using oracle.jbo.domain.Array as a NamedWhereClauseParam value</title><content type='html'>Sometime back I've blogged on &lt;a href="http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html"&gt;&lt;b&gt;Using oracle.jbo.domain.Array with ViewCriteria&lt;/b&gt;&lt;/a&gt;. Let me revisit the same topic with slightly different usage. There are many use cases where oracle.jbo.domain.Array is used as a NamedWhereClauseParam value, &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#setNamedWhereClauseParam(java.lang.String, java.lang.Object)"&gt;ViewObjectImpl::setNamedWhereClauseParam(name,value)&lt;/a&gt;. If you have such use cases and at run time you hit the following exception, then this blog post is for you ;)&lt;br /&gt;&lt;br /&gt;oracle.jbo.JboException: Cannot insert/update Array without context information at oracle.jbo.domain.Array.prepareForDML(Array.java:773) at oracle.jbo.server.ViewRowSetImpl.prepareLobObjectForBind(ViewRowSetImpl.java:8154) at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:5004) at oracle.jbo.server.ViewRowSetImpl.getParametersAsStorageTypes(ViewRowSetImpl.java:4979) at &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you define bind variable at design time, you may need to key in ColumnType(db object to hold Array that you are passing) as well along with other attributes. Please see my previous &lt;a href="http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html"&gt;post&lt;/a&gt; if you are not aware of this part. All works well in this case. When you use &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#defineNamedWhereClauseParam(java.lang.String, java.lang.Object, int[])"&gt;ViewObjectImpl::defineNamedWhereClauseParam(...)&lt;/a&gt; to define bind variable for Array at run time, the definition is missing this entry and you may hit the above said error. The solution is to set the required context while creating oracle.jbo.domain.Array as shown in the following code snippet.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;String[] deptArray = { "Administration","Purchasing" };&lt;br /&gt;Array arr = new Array(deptArray);&lt;br /&gt;HashMap context = new HashMap();&lt;br /&gt;context.put(DomainContext.ELEMENT_SQL_NAME, "CHARTABLETYPE");&lt;br /&gt;context.put(DomainContext.ELEMENT_TYPE, String.class);&lt;br /&gt;arr.setContext(null, null, context);&lt;/blockquote&gt;&lt;br /&gt;I'm copying the relevant code below for your reference.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; public void findDepartmentsForArrayParam() {  &lt;br /&gt;  ViewObjectImpl deptVOImpl = getDepartmentsView1();  &lt;br /&gt;  deptVOImpl.defineNamedWhereClauseParam("ArrayOfDeptNames", null,  &lt;br /&gt;                                                null);  &lt;br /&gt;  deptVOImpl.setWhereClause("Departments.DEPARTMENT_NAME   &lt;br /&gt;      IN (SELECT * FROM TABLE(CAST(:ArrayOfDeptNames AS CHARTABLETYPE)))");  &lt;br /&gt;  deptVOImpl.setNamedWhereClauseParam("ArrayOfDeptNames",  &lt;br /&gt;                                              getValueAsArray());  &lt;br /&gt;  deptVOImpl.executeQuery();  &lt;br /&gt; }  &lt;br /&gt; public Array getValueAsArray() {  &lt;br /&gt;  Array arr = null;  &lt;br /&gt;  try {  &lt;br /&gt;      String[] deptArray = { "Administration","Purchasing" };  &lt;br /&gt;      arr = new Array(deptArray);  &lt;br /&gt;      HashMap context = new HashMap();  &lt;br /&gt;      context.put(DomainContext.ELEMENT_SQL_NAME, "CHARTABLETYPE");  &lt;br /&gt;      //CHARTABLETYPE is DB object&lt;br /&gt;      //CREATE OR REPLACE TYPE  "CHARTABLETYPE"  as table of varchar2(4000);&lt;br /&gt;      context.put(DomainContext.ELEMENT_TYPE, String.class);  &lt;br /&gt;      arr.setContext(null, null, context);  &lt;br /&gt;  } catch (Exception ex) {  &lt;br /&gt;      ex.printStackTrace();  &lt;br /&gt;  }  &lt;br /&gt;  return arr;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-9001528206427676273?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/9001528206427676273/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=9001528206427676273' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9001528206427676273'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9001528206427676273'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/tips-on-using-oraclejbodomainarray-as.html' title='Tips on using oracle.jbo.domain.Array as a NamedWhereClauseParam value'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6130508653781428650</id><published>2011-07-20T03:20:00.000-07:00</published><updated>2011-07-20T03:20:26.473-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Tips on using af:media to display OrdImage</title><content type='html'>When you use af:media to display &lt;a href="http://download.oracle.com/docs/cd/B13789_01/appdev.101/b10829/mm_imgref001.htm"&gt;OrdImage&lt;/a&gt; type though ADF binding, you are expected to help the binding layer by mentioning the special treatment requirement for the source attribute. Failing to do may result in the following error ;)&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;javax.el.PropertyNotFoundException: The class 'oracle.ord.im.OrdImageDomain' does not have the property 'media'&lt;/blockquote&gt;&lt;br /&gt;Solution is simple, open the page definition and key in CustomInputHandler="OrdDomainValueHandler" for the attribute which is bound to OrdDomain type. The OrdDomainValueHandler class serves as the custom handler for intermedia objects. Note that af:media will use the OrdDomainValueHandler to extract values for specific attributes( source, innerHeight, innerWidth etc. ) which can't be read directly from the associated ViewObject.&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; JSF tag:   &lt;br /&gt;  &amp;lt;af:media source="#{bindings.Image.inputValue.source}"   &lt;br /&gt;      contentType="#{bindings.Image.inputValue.media.mimeType}" id="ot1"/&amp;gt;  &lt;br /&gt; Page definition entry:  &lt;br /&gt; &amp;lt;attributeValues IterBinding="ImageView1Iterator"   &lt;br /&gt;      id="Image" &lt;b&gt;CustomInputHandler&lt;/b&gt;="OrdDomainValueHandler"&amp;gt;  &lt;br /&gt;  &amp;lt;AttrNames&amp;gt;  &lt;br /&gt;      &amp;lt;Item Value="Image"/&amp;gt;  &lt;br /&gt;  &amp;lt;/AttrNames&amp;gt;  &lt;br /&gt; &amp;lt;/attributeValues&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6130508653781428650?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6130508653781428650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6130508653781428650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6130508653781428650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6130508653781428650'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/tips-on-using-afmedia-to-display.html' title='Tips on using af:media to display OrdImage'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1765389008455167698</id><published>2011-07-15T02:45:00.000-07:00</published><updated>2011-07-15T02:45:55.773-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>UI Categories...What is that?</title><content type='html'>Well...If you worked on JDeveloper 11.1.2.0.0 release, you might have noticed UI Categories option in View Object editor. This is a useful to group/order the view object attributes, and will be used by the components like af:query, dynamic:form etc in future releases. Please be patient and getting ready for some new things arriving soon!&lt;br /&gt;You can learn more from fusion developers guide - &lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcquerying.htm#ADFFD22952"&gt; 5.13.3 How to Define UI Category Hints&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1765389008455167698?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1765389008455167698/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1765389008455167698' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1765389008455167698'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1765389008455167698'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/ui-categorieswhat-is-that.html' title='UI Categories...What is that?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8329087537300609382</id><published>2011-07-15T01:43:00.000-07:00</published><updated>2011-07-15T01:43:58.050-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Tips on using showPrintablePageBehavior with af:table</title><content type='html'>You can use &lt;b&gt;&lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showPrintablePageBehavior.html"&gt;&amp;lt;af:showPrintablePageBehavior&amp;gt;&lt;/a&gt;&lt;/b&gt;  tag with command components to display printable view of the pages. The usage is detailed in &lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16181/ad_output.htm#ADFUI10097"&gt;Web UI Developers Guide - &lt;b&gt;34 Using Different Output Modes&lt;/b&gt;&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;Please note the printable page produced by af:showPrintablePageBehavior is really meant for printing ;) - this page is very light weight and might be missing java script support. You may need to give special attention to this point if you want to build a printable view of a af:table with stretchable behavior( table with columnStretching="multiple"). ADF Faces run time stretches the table columns using client side java script. Apparently the printable view of such tables might not be aligned properly as the java script magic is missing. A possible solution is to conditionally set width for the columns based on the &lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16181/ad_output.htm#ADFUI11507"&gt;&lt;b&gt;OutputMode&lt;/b&gt;&lt;/a&gt;(email,printable etc.). The same logic can be used for hiding specific components from the printable view.&lt;br /&gt;&lt;br /&gt;The below given code snippet may help you to understand this better. In the following example column width is set as 50% in normal mode, which is required to enable the stretchable behavior for table. In email/printable mode width is set in fixed pixels - 300&lt;br /&gt;&lt;br /&gt;&amp;lt;af:column sortProperty="#{bindings.DepartmentsView1.hints.DepartmentName.name}"  &lt;br /&gt;             headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}" id="c2"  &lt;br /&gt;             &lt;b&gt;width="#{adfFacesContext.outputMode eq 'email' or adfFacesContext.outputMode eq 'printable' ? '300' : '50%'}"&amp;gt;  &lt;/b&gt;&lt;br /&gt;      &amp;lt;af:outputText value="#{row.DepartmentName}" id="ot2"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:column&amp;gt;  &lt;br /&gt;&lt;br /&gt;Your 'printable' table source may look like as given below, &lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;  &amp;lt;af:table ...  &lt;br /&gt;       rowSelection="single" id="t1" columnStretching="multiple"&amp;gt;  &lt;br /&gt;      &amp;lt;af:column sortProperty="#{bindings.DepartmentsView1.hints.DepartmentName.name}"  &lt;br /&gt;             headerText="#{bindings.DepartmentsView1.hints.DepartmentName.label}" id="c2"  &lt;br /&gt;            &lt;b&gt; width&lt;/b&gt;="#{adfFacesContext.outputMode eq 'email' or adfFacesContext.outputMode eq 'printable' ? 300 : '50%'}"&amp;gt;&lt;br /&gt;      &amp;lt;af:outputText value="#{row.DepartmentName}" id="ot2"/&amp;gt;  &lt;br /&gt;      &amp;lt;/af:column&amp;gt;  &lt;br /&gt;      &amp;lt;af:column sortProperty="#{bindings.DepartmentsView1.hints.ManagerId.name}"  &lt;br /&gt;             headerText="#{bindings.DepartmentsView1.hints.ManagerId.label}" id="c3"  &lt;br /&gt;           &lt;b&gt;  width&lt;/b&gt;="#{adfFacesContext.outputMode eq 'email' or adfFacesContext.outputMode eq 'printable' ? '100' : '25%'}"&amp;gt; &lt;br /&gt;      &amp;lt;af:outputText value="#{row.ManagerId}" id="ot3"&amp;gt;  &lt;br /&gt;           &amp;lt;af:convertNumber groupingUsed="false"  &lt;br /&gt;                                pattern="#{bindings.DepartmentsView1.hints.ManagerId.format}"/&amp;gt;  &lt;br /&gt;      &amp;lt;/af:outputText&amp;gt;  &lt;br /&gt;      &amp;lt;/af:column&amp;gt;  &lt;br /&gt;      &amp;lt;af:column sortProperty="#{bindings.DepartmentsView1.hints.LocationId.name}"  &lt;br /&gt;             headerText="#{bindings.DepartmentsView1.hints.LocationId.label}" id="c4"  &lt;br /&gt;                &lt;b&gt;width&lt;/b&gt;="#{adfFacesContext.outputMode eq 'email' or adfFacesContext.outputMode eq 'printable' ? '100' : '25%'}"&amp;gt;  &lt;br /&gt;      &amp;lt;af:outputText value="#{row.LocationId}" id="ot4"&amp;gt;  &lt;br /&gt;           &amp;lt;af:convertNumber groupingUsed="false"  &lt;br /&gt;                                pattern="#{bindings.DepartmentsView1.hints.LocationId.format}"/&amp;gt;  &lt;br /&gt;      &amp;lt;/af:outputText&amp;gt;  &lt;br /&gt;      &amp;lt;/af:column&amp;gt;  &lt;br /&gt; &amp;lt;/af:table&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8329087537300609382?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8329087537300609382/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8329087537300609382' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8329087537300609382'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8329087537300609382'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/tips-on-using-showprintablepagebehavior.html' title='Tips on using showPrintablePageBehavior with af:table'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6416789116759305019</id><published>2011-07-08T22:47:00.000-07:00</published><updated>2011-07-08T23:04:26.229-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Java'/><title type='text'>JDK 7 Features</title><content type='html'>Check it out - &lt;a href="http://openjdk.java.net/projects/jdk7/features/"&gt;JDK 7 Features&lt;/a&gt;&lt;br /&gt;I should say (along with many others) API Doc looks much better now ;) - &lt;a href="http://download.java.net/jdk7/docs/api/"&gt;http://download.java.net/jdk7/docs/api/&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6416789116759305019?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6416789116759305019/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6416789116759305019' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6416789116759305019'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6416789116759305019'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/jdk-7-features.html' title='JDK 7 Features'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5940545209775521477</id><published>2011-07-08T00:44:00.000-07:00</published><updated>2011-07-08T19:16:03.448-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Changing the default display of af:quickQuery using criteriaItems facet</title><content type='html'>Is there a way to change the default display of search items used in an af:quickQuery component?&lt;br /&gt;&lt;br /&gt;Well answer is Yes. If you want to change the default display of  &amp;lt;af:quickQuery&amp;gt; component you can do that by adding your own component set inside criteriaItems facet. Please check out the tag doc for &lt;b&gt;&lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_quickQuery.html"&gt;&amp;lt;af:quickQuery&amp;gt;&lt;/a&gt; &lt;/b&gt; to learn more.&lt;br /&gt;&lt;br /&gt;The below shown example may alter the quickQuery component display showing af:outputLabel for the search criteria item instead of the default drop down list. This specific example is useful when you have only one field in the the view object (a rare scenario though). Thanks to Sriram Raghavan(Oracle - ADF team) who shared this tip in an internal discussion forum :)&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;  &amp;lt;af:quickQuery label="Search" searchDesc="Search" id="qryId1"  &lt;br /&gt;                  value="#{bindings.ImplicitViewCriteriaQuery.quickQueryDescriptor}"  &lt;br /&gt;                  model="#{bindings.ImplicitViewCriteriaQuery.queryModel}"  &lt;br /&gt;                  queryListener="#{bindings.ImplicitViewCriteriaQuery.processQuery}"&amp;gt;  &lt;br /&gt;      &amp;lt;f:facet name="end"&amp;gt;  &lt;br /&gt;           &amp;lt;af:commandLink text="Advanced" rendered="true" id="cl1"/&amp;gt;  &lt;br /&gt;      &amp;lt;/f:facet&amp;gt;  &lt;br /&gt;     &lt;b&gt; &amp;lt;f:facet name="criteriaItems"&amp;gt;  &lt;br /&gt;           &amp;lt;af:outputLabel   &lt;br /&gt;           value="#{bindings.ImplicitViewCriteriaQuery.quickQueryDescriptor.currentCriterion.attribute.label}"  &lt;br /&gt;           shortDesc="#{bindings.ImplicitViewCriteriaQuery.quickQueryDescriptor.currentCriterion.attribute.description}"/&amp;gt;  &lt;br /&gt;      &amp;lt;/f:facet&amp;gt;  &lt;/b&gt;&lt;br /&gt; &amp;lt;/af:quickQuery&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can see the difference in display in the following picture. The first quickQuery displays  search criteria item(s) using a drop down( which is default), whereas the second one displays the search criteria item on a label.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-S8LT-A2mho4/ThaQuXCTHKI/AAAAAAAACzQ/6Av0WEnK3ho/s1600/untitled.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="147" width="400" src="http://1.bp.blogspot.com/-S8LT-A2mho4/ThaQuXCTHKI/AAAAAAAACzQ/6Av0WEnK3ho/s400/untitled.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5940545209775521477?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5940545209775521477/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5940545209775521477' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5940545209775521477'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5940545209775521477'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/changing-default-display-of.html' title='Changing the default display of af:quickQuery using criteriaItems facet'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-S8LT-A2mho4/ThaQuXCTHKI/AAAAAAAACzQ/6Av0WEnK3ho/s72-c/untitled.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6453440949926880756</id><published>2011-07-07T01:48:00.000-07:00</published><updated>2011-07-07T07:02:19.718-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Controller'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>What you may need to know about the conditional activation of the task flow embedded in an &lt;af:popup&gt; ?</title><content type='html'>You can configure the activation of task flow using 'active' property of the taskFlow binding. The details are available in the fusion developers guide - &lt;b&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/taskflows_regions.htm#ADFFD22586"&gt;21.6 Configuring Activation of an ADF Region&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I would like to share a couple of points I learned on this topic while working with developers. Its interesting and may save your time as well ;)&lt;br /&gt;&lt;br /&gt;While configuring the activation of task flow, you may need to key in value for activation and active flags. Apart from these two, there is one more attribute RefreshCondition which decides the 'life' of task flow.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-WO4RhpyiXe0/ThVQhlCuIII/AAAAAAAACzA/M9EpiYhy3KM/s1600/taskflow1.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="180" width="400" src="http://4.bp.blogspot.com/-WO4RhpyiXe0/ThVQhlCuIII/AAAAAAAACzA/M9EpiYhy3KM/s400/taskflow1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Common mistakes in using RefreshCondition and active properties&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RefreshCondition="#{some.EL.expression}":&lt;/b&gt; The ADF region is refreshed when RefreshCondition evaluates true. Please note that you may not really need to use this for lazy initialization of task flow, use active and activation flags instead. In case, if you are using this, please note the RefreshCondition should only evaluate to true when you want the &lt;br /&gt;task flow to start/restart. You may need to make your EL to return false once task flow is active. Failing to do so will cause task flow to reset/restart for each post back. A typical usage of this flag may be, restart the task flow  while the region is active. Here you need to ensure the RefreshCondition evaluates to true when you want the task flow to restart and false at all other times. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;activation:&lt;/b&gt; Though you can specify values like conditional/deferred/active for this flag, in this post I discuss conditional activation. Setting activation=conditional, activates the ADF region if the EL expression set as a value for the task flow binding 'active' property(discussed below) returns true.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;active="#{some.EL.expression}":&lt;/b&gt; This is the area where you may need to be careful. If the activation is set as conditional, the the EL for active property must evaluate to true for each postback for the region to remain active. This implies that the scope where you keep the active flag should be long enough to survive multiple requests from the client while working on task flow. &lt;br /&gt;Let me explain this with a simple example. Assume that you built a task flow and wanted to display in an af:popup. Apparently you might not want to activate the task flow till user opts to view the pop up dialog. You may end up in using active flag to control the activation of task flow. Consider an EL as shown below for the active flag.&lt;br /&gt;&lt;br /&gt;active="#{empty requestScope.activeFlag ? false : requestScope.activeFlag}"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What is wrong with this?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, its syntactically valid, however may not help you to achieve the desired functionality. Because whatever you store in requestScope is valid for that specific request. Consider your task flow popup dialog is displayed with the above 'active' settings. All went well so far. Then user does some action which may trigger some server interaction. While posting back to server, run time will evaluate active EL before processing task flow. Whatever you set to the requestScope in the previous request may not be available for the new request and EL will be evaluated to false, and your task flow dialog may appear as frozen. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;What is the solution?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You may need to keep the activation flag in higher scopes - pageFlowScope or sessionScope. Better one may be &lt;b&gt;pageFlowScope&lt;/b&gt;. (Please note that dialog window may not be able to access view scope of the parent view, so we don't use view scope in this specific context) &lt;br /&gt;&lt;br /&gt;active="#{empty pageFlowScope.activeFlag ? false : pageFlowScope.activeFlag}"&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/TaskflowDialog.zip"&gt;download the example workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example uses employee-task-flow which is displayed inside popup dialog. The activation of the task flow is controlled using active="#{empty pageFlowScope.activeFlag ? false : pageFlowScope.activeFlag}" for &amp;lt;taskFlow&amp;gt; binding. The activeFlag is set true from the popupFetchListener method defined in the MainBean class.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-C6CPQ-A7GOk/ThVuIBKV9nI/AAAAAAAACzI/nhu4BahCYa8/s1600/taskflow2.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="242" width="400" src="http://1.bp.blogspot.com/-C6CPQ-A7GOk/ThVuIBKV9nI/AAAAAAAACzI/nhu4BahCYa8/s400/taskflow2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6453440949926880756?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6453440949926880756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6453440949926880756' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6453440949926880756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6453440949926880756'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/what-you-may-need-to-know-about.html' title='What you may need to know about the conditional activation of the task flow embedded in an &amp;lt;af:popup&amp;gt; ?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-WO4RhpyiXe0/ThVQhlCuIII/AAAAAAAACzA/M9EpiYhy3KM/s72-c/taskflow1.PNG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1854775745182534784</id><published>2011-07-01T01:50:00.000-07:00</published><updated>2011-07-03T08:50:23.242-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Overriding &lt;af:query&gt; display at run time</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Sometime back I posted&amp;nbsp;similar&amp;nbsp;post on the above topic - &lt;a href="http://jobinesh.blogspot.com/2011/01/customizing-component-display-by.html"&gt;C&lt;b&gt;ustomizing the af:query&lt;af:query&gt;&amp;nbsp;component display by overriding CriteriaItemAttributeHints&lt;/af:query&gt;&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Its time for me to revisit the same topic with slightly different use case :)&lt;br /&gt;The use case requirement was to override the &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/ViewCriteria.html"&gt;ViewCrtieria&lt;/a&gt; hints of a base view object from a child view object. Well, its easy. You can hook your code by overriding  &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#getCriteriaItemAttributeHints(oracle.jbo.ViewCriteriaItem)"&gt;&lt;b&gt;ViewObjectImpl::getCriteriaItemAttributeHints(ViewCriteriaItem vci)&lt;/b&gt;&lt;/a&gt;, and optionally return your own &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/AttributeHints.html"&gt;AttributeHints&lt;/a&gt; implementation. In the following code sample, I'm&amp;nbsp;demonstrating&amp;nbsp;this by changing some properties of a ViewCriteriaItem for specific items.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; /**  &lt;br /&gt;  * By default return null. Subclasses may override to return  &lt;br /&gt;  * custom AttributeHints implementation for the given criteria item.  &lt;br /&gt;  */  &lt;br /&gt; @Override  &lt;br /&gt; public AttributeHints getCriteriaItemAttributeHints(ViewCriteriaItem vci) {  &lt;br /&gt;   if (vci != null &amp;amp;&amp;amp; vci.getViewCriteria().getName().equals("EmployeesViewCriteria")) {  &lt;br /&gt;     if (vci.getAttributeDef().getName().equals("FirstName")) {  &lt;br /&gt;       vci.setRequired(ViewCriteriaItem.VCITEM_OPTIONAL);  &lt;br /&gt;     } else if (vci.getAttributeDef().getName().equals("DepartmentId")) {  &lt;br /&gt;       vci.setProperty(ViewCriteriaItem.RENDERED_MODE, ViewCriteriaItem.CRITERIA_RENDERED_MODE_NEVER);  &lt;br /&gt;     }  &lt;br /&gt;   }  &lt;br /&gt;   return super.getCriteriaItemAttributeHints(vci);  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Before winding up&amp;nbsp;today's&amp;nbsp;post, let me teach you one more useful tip on the same context. An&amp;nbsp;interesting&amp;nbsp;enhancement available with 11.1.2.0.0  release is the ability specify 'Display Width'&amp;nbsp;for each view criteria item while defining a view criteria. This property decides the width of the UI control (displayed inside the query&amp;nbsp;component)&amp;nbsp;at run time. Please note that in previous releases the af:query component was using display width from the view object's attribute definition (by default) to render controls.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-v3I9T4K9RWE/Tg2AsQwwg3I/AAAAAAAACys/or4CgxuQ5B8/s1600/VCEditor.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://1.bp.blogspot.com/-v3I9T4K9RWE/Tg2AsQwwg3I/AAAAAAAACys/or4CgxuQ5B8/s400/VCEditor.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/VCOverrideSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This sample uses 2 view object&lt;br /&gt;1. A base view object - EmployeesView&lt;br /&gt;2. A child view object extended from EmployeesView -  EmpDeptView. Child view object inherits 'EmployeesViewCriteria' defined on base  view object. &lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span"&gt;The EmpDeptViewImpl overrides certain properties of 'EmployeesViewCriteria' from the base view object by using getCriteriaItemAttributeHints(...)&amp;nbsp;method. Take a look at the below shown scree shot to understand this example better. The screen shot displays two query components one from EmployeesView  and the other from EmpDeptView. Though both query components are derived from same ViewCriteria defined on the base view object (EmployeesView), the second  component displays slightly modified version by hiding the DepartmentId field and marking the FirstName as 'optional'. This is achieved by the altering&amp;nbsp;ViewCriteriaItem&amp;nbsp;instance&amp;nbsp;in the&amp;nbsp;&lt;/span&gt;getCriteriaItemAttributeHints(...) method.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-XvLEQ-t_-nM/Tg2DYv4n_yI/AAAAAAAACy0/poF8SFuTCv0/s1600/VCEditor1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="210" src="http://1.bp.blogspot.com/-XvLEQ-t_-nM/Tg2DYv4n_yI/AAAAAAAACy0/poF8SFuTCv0/s400/VCEditor1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1854775745182534784?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1854775745182534784/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1854775745182534784' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1854775745182534784'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1854775745182534784'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/07/overriding-display-at-run-time.html' title='Overriding &amp;lt;af:query&amp;gt; display at run time'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-v3I9T4K9RWE/Tg2AsQwwg3I/AAAAAAAACys/or4CgxuQ5B8/s72-c/VCEditor.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7573149552219189059</id><published>2011-06-27T01:35:00.000-07:00</published><updated>2011-06-27T01:35:02.747-07:00</updated><title type='text'>Srini Raman's Blog on JDeveloper and ADF</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Keep an eye on this new blog -&amp;nbsp;&lt;a href="http://sriniraman.blogspot.com/"&gt;http://sriniraman.blogspot.com/&lt;/a&gt;&lt;br /&gt;Srini works as &amp;nbsp;Senior Development Manager for JDeveloper IDE team and I'm sure hes planning a lot of new stuffs for you in coming days....Stay tuned !&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7573149552219189059?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7573149552219189059/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7573149552219189059' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7573149552219189059'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7573149552219189059'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/srini-ramans-blog-on-jdeveloper-and-adf.html' title='Srini Raman&apos;s Blog on JDeveloper and ADF'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8624041004503677290</id><published>2011-06-25T09:40:00.000-07:00</published><updated>2011-06-25T19:34:01.997-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Safely storing UIComponent reference in a managed bean</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Always it's recommended not to bind the UIComponent with managed bean with higher scopes(view, session, pageFlow, application etc.). There are multiple reasons to justify this suggestion.&lt;br /&gt;1. JSF components are not Serializable, so your managed bean may fail to serialize in high availability mode.&lt;br /&gt;2. Leaving stale references of the component if the bean survives the life of the view/page etc.&lt;br /&gt;&lt;br /&gt;If you really want to store a component reference in managed whose scope is higher than request, then there is utility class for your help - ComponentReference . You can take a look at &lt;a href="http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/ComponentReference.html"&gt;&lt;b&gt;org.apache.myfaces.trinidad.util.ComponentReference&lt;/b&gt;&lt;t&gt;&lt;/t&gt;&lt;/a&gt; API to learn more. I should admit that I was not aware of this one till I learned about this from an application developer ;)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ComponentReference&amp;nbsp;Usage:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;private ComponentReference someUICompReference;&lt;br /&gt;&lt;br /&gt;public UIComponent getSomeUIComponent(){&lt;br /&gt;&amp;nbsp; &amp;nbsp;return someUICompReference == null ?&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; null : someUICompReference.getComponent();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setSomeUIComponent(UIComponent component)&amp;nbsp;{&lt;br /&gt;&amp;nbsp; &amp;nbsp; someUICompReference =&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; ComponentReference.newUIComponentReference(component);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/util/ComponentReference.html"&gt;ComponentReference API&lt;/a&gt;&lt;/b&gt; Doc says::&lt;br /&gt;&lt;ul&gt;&lt;li&gt;This class is not thread-safe, since it depends on UIComponent APIs.&lt;/li&gt;&lt;li&gt;The passed in UIComponent is required to have an ID&lt;/li&gt;&lt;li&gt;The reference will break if the UIComponent is moved between NamingContainers or if any of the ancestor NamingContainers have their IDs changed.&lt;/li&gt;&lt;li&gt;The refrence is persistable. However UIComponents are not Serializable and therefore can not be used at any scope longer than request.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8624041004503677290?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8624041004503677290/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8624041004503677290' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8624041004503677290'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8624041004503677290'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/safely-storing-uicomponent-component.html' title='Safely storing UIComponent reference in a managed bean'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8286138098822203097</id><published>2011-06-25T02:29:00.000-07:00</published><updated>2011-08-02T07:00:37.218-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Building programmatically managed business components - Part 1</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I've noticed quite a lot of queries in the public forum on building programmatic entity object and view objects . Let me share an example on this subject which may help you in implementing such use cases quickly. You can see a sample from Steve as well on this topic - &lt;a href="http://blogs.oracle.com/smuenchadf/resource/examples#132"&gt;1&lt;b&gt;32.Programmatic View Objects Showing Master/Detail Data&lt;/b&gt;&lt;/a&gt;. Even my example also follows the same approach, of course with some minor tweaks hare and there :-)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Why do you need programmatic entity and view Objects?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Consider a scenario where you may need to retrieve data from a custom data source (say using third party API for example) and may need to perform some data update later on. While realizing such use cases, you my still want to leverage the declarative development support provided by the JDeveloper for building list of values, entity caching and validation, declarative transaction support etc. Though ADF got binding support for Java services, its not as rich as ADF BC implementation. One possible option is to customize the business components (view object and entity object) to interact with third party data source by overriding its default life cycle methods. Before get in to the implementation, let me take a step back take you through life cycle of entity and view objects.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How does your view object work?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you run a page with a table, during the 'render response' phase of the view, table may tries to get data&amp;nbsp; by evaluating the EL associated with value attribute. At this stage the binding layer will identify the underlying view object for the iterator which is bound to the table, and may retrieve the data by executing the view object. The view object execution takes the following steps&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1:&lt;/b&gt; The view object executes the query by calling executeQueryForCollection(...) and the associate the result with QueryCollection object.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#executeQueryForCollection%28java.lang.Object,%20java.lang.Object[],%20int%29"&gt;ViewObjectImpl::executeQueryForCollection(java.lang.Object qc,&lt;br /&gt;java.lang.Object[] params,&lt;br /&gt;int noUserParams)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt; Once the query is executed, view object starts the iteration over the result set(collection) obtained at 'Step 1' by calling hasNextForCollection(...) for each element in the collection&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#hasNextForCollection%28java.lang.Object%29"&gt;ViewObjectImpl::hasNextForCollection(java.lang.Object qc)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt; If step2 (hasNextForCollection) return true, then call createRowFromResultSet(...) to convert the record in to ADF aware form. If the view object is based on  entity object, then corresponding entity instance(s) is getting created at this stage. In this case the ViewRowImpl will act as a wrapper over the underlying entity instance. It means that if you do update/delete on ViewRowImpl, that may finally reach underlying entity instance and entity may get added to the transaction listener's dirty list.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#createRowFromResultSet%28java.lang.Object,%20java.sql.ResultSet%29"&gt;ViewObjectImpl::createRowFromResultSet(java.lang.Object iqc,&lt;br /&gt;java.sql.ResultSet resultSet)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 4:&lt;/b&gt; Repeat Step 2 and 3 for all elements in the result set(till hasNextForCollection returns false). At the end of iteration run time marks 'fetch complete' by calling setFetchCompleteForCollection(...)&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#setFetchCompleteForCollection%28java.lang.Object,%20boolean%29"&gt;ViewObjectImpl::setFetchCompleteForCollection(java.lang.Object qc,&lt;br /&gt;boolean val)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Who is interested in &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/ViewObjectImpl.html#getQueryHitCount%28oracle.jbo.server.ViewRowSetImpl,%20oracle.jbo.Row[]%29"&gt;ViewObjectImpl::getQueryHitCount(...)&lt;/a&gt;?&lt;br /&gt;&lt;br /&gt;Well, some UI components like table, tree etc. which needs paginated data fetch + scrollable behavior may require this information. These folks will call count query first and then may go for view object execution.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note:&lt;/b&gt; If you are building programmatic view object, without any entity back up, its really required to implement &lt;a href="http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#retrieveByKey_oracle_jbo_server_ViewRowSetImpl__oracle_jbo_Key__int_"&gt;&lt;b&gt;ViewObjectImpl::retrieveByKey(ViewRowSetImpl rs,Key key,int maxNumOfRows)&lt;/b&gt;&lt;/a&gt; to return row for the key from  your custom data source. why? Well, when run time fails to find the row in the cache by calling  findByKey(), as a next step it will try to invoke retrieveByKey() to retrieve the value by passing Key.  Please see &lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/bcadvvo.htm#ADFFD22978"&gt;42.1.8 Handling View Object Queries with Primary Keys Defined by Transient Attributes&lt;/a&gt; to learn more.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What does happen when you update some data and call commit ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you update some row from an entity based view object, actual update happens against the corresponding entity instance(see Step 3 in the above section). Later when you commit transaction, entity &amp;nbsp;posts&amp;nbsp;changes&amp;nbsp;to database and commit&amp;nbsp;transaction. Let us take look at the steps of the transaction commit cycle for an entity object.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 1&lt;/b&gt;: While you call commit, transaction manager starts the post cycle for the dirty entities. The first step is to validate the business data by calling validateEntity().&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#validateEntity%28%29"&gt;EntityImpl::validateEntity()&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 2:&lt;/b&gt; Then transaction manager calls postChanges() on each dirty row(entity instance). The post changes takes multiple sub tasks to finish the job as copied below.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#validateEntity%28%29"&gt;EntityImpl::postChanges(...)&lt;/a&gt;&amp;nbsp;:&amp;nbsp;Initiates a post operation for this Entity Object.&lt;br /&gt;&amp;nbsp; &amp;nbsp; a) &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#lock%28%29"&gt;EntityImpl::lock()&lt;/a&gt;&amp;nbsp;:&amp;nbsp;Locks the row.&lt;br /&gt;&amp;nbsp; &amp;nbsp; b) &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#prepareForDML%28int,%20oracle.jbo.server.TransactionEvent%29"&gt;EntityImpl::prepareForDML(...)&lt;/a&gt;&amp;nbsp;: A pre-notification for preparing rows for posting to DB.&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; If you need to update some dependency columns or custom history columns then this is&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; the&amp;nbsp;place to add that logic.&lt;br /&gt;&amp;nbsp; &amp;nbsp; c) &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#doDML%28int,%20oracle.jbo.server.TransactionEvent%29"&gt;EntityImpl::doDML(...)&lt;/a&gt;&amp;nbsp;:&amp;nbsp;Performs INSERT/UPDATE/DELETE processing for the row.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step 3:&lt;/b&gt;&amp;nbsp;Once the data is posted, next step is committing the transaction. The following methods gets executed before and after of transaction commit.&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; a)&amp;nbsp;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#beforeCommit%28oracle.jbo.server.TransactionEvent%29"&gt;EntityImpl::beforeCommit(...)&lt;/a&gt;&amp;nbsp;: Reports that a commit operation has initiated&lt;br /&gt;&amp;nbsp; &amp;nbsp; b)&amp;nbsp;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17483/oracle/jbo/server/EntityImpl.html#afterCommit%28oracle.jbo.server.TransactionEvent%29"&gt;EntityImpl::afterCommit(...)&lt;/a&gt; :&amp;nbsp;Reports that a&amp;nbsp;successful&amp;nbsp;commit operation has&amp;nbsp;occurred&lt;br /&gt;&lt;br /&gt;Well, enough theory, time for action ! Let us go ahead and build programmatic entities and view objects. Though this is simple, you may need to pay attention to a couple of &amp;nbsp;'silly' points to make it&amp;nbsp;working.&lt;br /&gt;&lt;a href="http://jobinesh.blogspot.com/2011/06/building-programmatically-managed.html"&gt;&lt;b&gt;Read more...&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8286138098822203097?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8286138098822203097/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8286138098822203097' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8286138098822203097'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8286138098822203097'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/building-programmatically-managed_25.html' title='Building programmatically managed business components - Part 1'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4230623704409105539</id><published>2011-06-25T02:28:00.000-07:00</published><updated>2011-06-27T00:39:29.834-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Building programmatically managed business components - Part 2</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Putting in to action&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;We have seen the basic theory behind the execution of &amp;nbsp;entity and view objects in the &lt;b&gt;&lt;a href="http://jobinesh.blogspot.com/2011/06/building-programmatically-managed_25.html"&gt;first part&lt;/a&gt;&lt;/b&gt; of this article.&amp;nbsp;In the second part , let us put the theory in to action.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;b&gt;&lt;a href="http://adf-samples.googlecode.com/files/ProgrammaticallyManagedBCSampleSource.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;/b&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;Please note this example does not use any API&amp;nbsp;specific&amp;nbsp;to 11.1.2.0 release, so you may be able to reuse the source classes in previous versions also.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example uses two model objects - Department and Employee. The 'Department' is based on DEPARTMENTS table and it follows usual entity and view object generation steps, whereas Employee is based on custom data source and the steps for generating programmatically managed Employee model object is given below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Building base classes for your programmatic entity and view&amp;nbsp;objects&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;While building a programmatic view or entity objects you may need to hook your code to perform CRUD (Create Read Update Delete)&amp;nbsp;operations&amp;nbsp;against the custom data source (as per your use case) by&amp;nbsp;overriding&amp;nbsp;the life cycle methods(by default CRUD is done against database). This example uses generic base classes for doing this job and they are copied below for your reference.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/--OQLKWz-ZlU/TgVVtAwxOGI/AAAAAAAACxs/95i7XRCe4Aw/s1600/ClassDesign.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="183" src="http://4.bp.blogspot.com/--OQLKWz-ZlU/TgVVtAwxOGI/AAAAAAAACxs/95i7XRCe4Aw/s320/ClassDesign.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;ProgrammaticallyManagedEntityObjectImpl : Abstract entity object which overrides EntityImpl::doDML(...) and related methods.&lt;br /&gt;ProgrammaticallyManagedViewObjectImpl : Abstract view object which overrides ViewObjectImpl::executeQueryForCollection(...) and related methods.&lt;br /&gt;GenericQueryModel : A generic query model class which holds the filtering criteria &amp;nbsp;for third party services.&lt;br /&gt;GenericRowCollection : A generic data&amp;nbsp;structure&amp;nbsp;to hold the result from the query(data retrieval) execution.&lt;br /&gt;GenericRowData : A generic&amp;nbsp;data&amp;nbsp;structure&amp;nbsp;representing&amp;nbsp;a row in the result set.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Building programmatic entity object&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step 1: Right click the model &amp;nbsp;project, select New-&amp;gt;ADF Business Components-&amp;gt; Entity Objects. You can key in the entity name and leave the default values for the other fields as is, click Next.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-tEYGMjuf4kY/TgVfmwjjISI/AAAAAAAACx0/lNkTs2DWu7o/s1600/EO1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/-tEYGMjuf4kY/TgVfmwjjISI/AAAAAAAACx0/lNkTs2DWu7o/s400/EO1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Step 2: Add attributes and finish the wizard&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-o47EKWJ3rhw/TgVgI7RwKAI/AAAAAAAACx8/d4qD-CI-Vqc/s1600/EO2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="232" src="http://3.bp.blogspot.com/-o47EKWJ3rhw/TgVgI7RwKAI/AAAAAAAACx8/d4qD-CI-Vqc/s400/EO2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Step 3: Select the generated entity object in the editor, go to Java tab and click on edit Java Options. Change the base class for the Entity Object as fmwk.extension.entity.ProgrammaticallyManagedEntityObjectImpl(what we generated initially)&lt;br /&gt;You may need to override  ProgrammaticallyManagedEntityObjectImpl::getService() to return  GenericDataPersistanceService  implementation. Please see Step 4 for the service implementation.&lt;br /&gt;&lt;br /&gt;Step 4: Build the business service implementing fmwk.extension.view.GenericDataPersistanceService for updating the data. Please take a look at  model.emp.service.MyEmpDataServiceImplementation to get a feel of the implementation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Building programmatic view object&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Step 1: Select the programmatic entity object, right click and then select New Default View Object option from the context menu.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PvurcXEzGZU/TgVgvIurk7I/AAAAAAAACyE/c5a2W8sW-VQ/s1600/EO3.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-PvurcXEzGZU/TgVgvIurk7I/AAAAAAAACyE/c5a2W8sW-VQ/s400/EO3.PNG" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Step 2: Switch to the source mode of the generated view object and set the &lt;b&gt;CustomQuery="true"&lt;/b&gt; as shown in the following image. This is very important step as this flag influences the run time to avoid the query execution against data base(which is the default execution path)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-f6FOsaWS2uc/TgVhWmh6VrI/AAAAAAAACyM/z4HRi_OVrA0/s1600/EO4.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://4.bp.blogspot.com/-f6FOsaWS2uc/TgVhWmh6VrI/AAAAAAAACyM/z4HRi_OVrA0/s400/EO4.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Ste 3: Select the generated view object in the editor, go to Java tab and click on edit Java Options. Change the base class for the View Object as fmwk.extension.entity.ProgrammaticallyManagedViewObjectImpl(what we generated initially)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-pWvmJ3WOQCU/TgVhlSdgJgI/AAAAAAAACyU/diuICNsHy-0/s1600/EO5.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="358" src="http://1.bp.blogspot.com/-pWvmJ3WOQCU/TgVhlSdgJgI/AAAAAAAACyU/diuICNsHy-0/s400/EO5.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You may need to override  ProgrammaticallyManagedViewObjectImpl::getService() to return  GenericDataReadServiceInterface implementation. Please see Step 4 for the service implementation.&lt;br /&gt;&lt;br /&gt;Step 4: Build the business service to read data by implementing fmwk.extension.view.GenericDataReadService.&amp;nbsp; Please take a look at  model.emp.service.MyEmpDataServiceImplementation to get a feel of the implementation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Can I reuse this sample source?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, the classes what you see in package fmwk.extension.xxx are generic in nature and reusable. If you have similar&amp;nbsp;use cases, then you may need to implement an adapter for your 'data source' calls as shown in model.emp.service.MyEmpDataServiceImplementation. The core&amp;nbsp;run time&amp;nbsp;classes what you see under&amp;nbsp;fmwk.extension.xxx can be reused either as is or with some modifications.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example is based on Department-Employee model. As I said earlier the Department is based on data base table and Employee is programmatically manged. This sample contains three pages illustrating search, update and master-child coordination on programmatic view object.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;search.jsf - Search page  for programmatic view object.&lt;/li&gt;&lt;li&gt;masterChild - Master child coordination(Department-Employee) through view link.&lt;/li&gt;&lt;li&gt;edit.jsf - Edit page for programmatic entity object.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4230623704409105539?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4230623704409105539/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4230623704409105539' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4230623704409105539'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4230623704409105539'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/building-programmatically-managed.html' title='Building programmatically managed business components - Part 2'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/--OQLKWz-ZlU/TgVVtAwxOGI/AAAAAAAACxs/95i7XRCe4Aw/s72-c/ClassDesign.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8315852088164256082</id><published>2011-06-19T23:04:00.000-07:00</published><updated>2011-06-20T03:12:05.596-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>What you may need to know about Target Data Source entry for your tree binding definition?</title><content type='html'>There are use cases where you may need to refresh different parts of the page when user navigates between table or tree components which uses tree binding. In most of the cases the UI bindings(Target Data Source or TargetIterator) which needs to refreshed may share same Key attributes as your tree or tree table bindings. In such cases you can leverage the declarative support from ADF model to refresh the target iterator through 'Target Data Source' property associated with the tree binding. This topic is documented in Fusion Developers Guide, please see &lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/web_masterdetail.htm#ADFFD19626"&gt;&lt;b&gt;29.5.4 How to Use the TargetIterator Property&lt;/b&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: If you have 'TargetIterator' set for tree binding, ADF binding layer will never try to execute the target iterator using the 'Key' attribute(s) of the selected row of the source iterator. Instead the binding layer may simply call setCurrentRowWithKey on the target iterator using the key from the currently selected tree node. It means that, to make this property(Target Data Source entry) working,  your target iterator should contain all the elements(of course target can be a super set as well) from source iterator.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8315852088164256082?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8315852088164256082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8315852088164256082' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8315852088164256082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8315852088164256082'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/what-you-may-need-to-know-about-target.html' title='What you may need to know about Target Data Source entry for your tree binding definition?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-2690175227359084854</id><published>2011-06-17T00:55:00.000-07:00</published><updated>2011-06-17T00:57:56.811-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>ADF Client Performance Optimization Tips from Matt Cooper</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Interesting post on ADF Client Performance Optimization from Matt.&lt;br /&gt;Check it out - &lt;a href="http://formattc.wordpress.com/2011/06/14/adf-client-performance-optimization-tips/"&gt;http://formattc.wordpress.com/2011/06/14/adf-client-performance-optimization-tips/&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-2690175227359084854?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/2690175227359084854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=2690175227359084854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2690175227359084854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2690175227359084854'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/adf-client-performance-optimization.html' title='ADF Client Performance Optimization Tips from Matt Cooper'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-481543947453257947</id><published>2011-06-16T07:21:00.000-07:00</published><updated>2011-06-16T07:37:11.483-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Declarative transaction support for your JPA data model</title><content type='html'>While playing around with new featured of 11.1.2.0.0 release, noticed an interesting one on data control side - declarative support for building Transactional Data Control for the business services built using JPAs. It looks cool ! There are a couple of points you may need to be aware of when you try this one.&lt;br /&gt;&lt;br /&gt;1. Your should not keep 'Auto Commit' option 'true' for Java Service Facade if you need to defer the transaction commit. If this flag is ON, transaction will get committed as part of each service invocation from client.&lt;br /&gt;&lt;br /&gt;2. ADF binding layer will never request the &lt;a href="http://download.oracle.com/javaee/5/api/javax/persistence/EntityManager.html"&gt;EntityManager&lt;/a&gt; to manage your entities  at run time. So its your responsibility to associate your detached entities with PersistenceContext by calling EntityManager::persist(...) or EntityManager.merge(...) through generated wrapper method from the service facade.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Generating Transactional Data Control for your Java Service Facade&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;If you are new to EJB and never used ADF binding support to build UI for JPA entities, then please see this post first - &lt;a href="http://jobinesh.blogspot.com/2009/11/creating-data-capture-form-using-ejb.html"&gt;&lt;b&gt;Creating a Data Capture Form using EJB + JPA and ADF Binding&lt;/b&gt;&lt;/a&gt;. In this post I'm not covering the preliminary steps for generating JPA. Once you generate the JPA model, next step is to build service layer. This can be achieved by either using Java Services Facade or Session Bean. In this post I'm focusing on Java Service Facade. Please note if you build service facade built using stateful session bean also got similar support what we discuss here.  &lt;br /&gt;&lt;br /&gt;In 11.1.2.0.0 release, the wizard for building Java Service Facade is more intelligent than before ;) The detailed steps for building Transactional Data Control for your Java Service Facade is given below.&lt;br /&gt;&lt;br /&gt;1. Right click the model project, from the context menu select -&amp;gt; New -&amp;gt; EJB.  Then from the Items list select Java Service Facade. The IDE will display a Java Service Facade creation wizard for you. In the first step, you may need to select 'Application Managed' Transactional Option. You can keep the default options as is for the rest and finish the wizard.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-r30EY5meoqg/TfngKPfffnI/AAAAAAAACxY/xdpzEeQz7z4/s1600/editor1.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="302" width="400" src="http://3.bp.blogspot.com/-r30EY5meoqg/TfngKPfffnI/AAAAAAAACxY/xdpzEeQz7z4/s400/editor1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2. Now select the generated JavaServiceFacade class, right click and select Create Data Control option. You may get a window as shown below. Select all three options.&lt;br /&gt;and click OK. This action will modify your class to implement the selected interfaces and generate necessary code to support the contracts set by the interfaces. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-YAGEM6FdXh0/TfnqgS27TLI/AAAAAAAACxg/MITRbJ96G0s/s1600/editor2.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="275" width="326" src="http://4.bp.blogspot.com/-YAGEM6FdXh0/TfnqgS27TLI/AAAAAAAACxg/MITRbJ96G0s/s400/editor2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;API doc says,&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B31017_01/web.1013/b28969/oracle/binding/TransactionalDataControl.html"&gt;&lt;b&gt;TransactionalDataControl&lt;/b&gt;&lt;/a&gt; : This interface is to be implementated by DataControls that supports transaction.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E15051_01/apirefs.1111/e10653/oracle/binding/UpdateableDataControl.html"&gt;&lt;b&gt;UpdateableDataControl&lt;/b&gt;&lt;/a&gt; : This interface is to be implemented by DataControls that support an updateable or mutable business service.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/binding/ManagedDataControl.html"&gt;&lt;b&gt;ManagedDataControl&lt;/b&gt;&lt;/a&gt;: This interface is implemented by data controls that needs to have each request demarcated by beginRequest/endRequest pair, so that request level initialization and cleanup processing is possible&lt;br /&gt;&lt;br /&gt;You may notice that the data control pallet in your JDeveloper displays Commit and Rollback operations for your transactional data control. Your data control is really smart now. If you have any bounded task flow using this data control, then you can rely on declarative transaction  mechanism available with the task flows to commit your business data.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-dpd4HSQ6cZ8/TfnvzNs8CBI/AAAAAAAACxo/ACWlkk4bYn4/s1600/editor3.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="199" width="400" src="http://4.bp.blogspot.com/-dpd4HSQ6cZ8/TfnvzNs8CBI/AAAAAAAACxo/ACWlkk4bYn4/s400/editor3.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/TransactionalDCSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example is built using JPA entities and the Java Service Facade implementing oracle.binding.TransactionalDataControl. The Departments entity holds a status flag(Enum) to keep track of the modification status. The view controller project contains a dept-task-flow comprising a view activity - dept.jsf . The dept view uses the JavaServiceFacade as data provider. The task flow's transaction is controlled declaratively. Please note that merging modified entities with &lt;a href="http://download.oracle.com/javaee/5/api/javax/persistence/PersistenceContext.html"&gt;PersistenceContext&lt;/a&gt; is done programmatically from the view.DeptBean::doSave() method.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run main.jsf and click on 'Show Departments', this action will take you to dept-task-flow.&lt;br /&gt;Edit few records and click on Save. The save action is mapped to task flow return. This action  commits the &lt;a href="http://download.oracle.com/javaee/5/api/javax/persistence/EntityTransaction.html"&gt;EntityTransaction&lt;/a&gt; by leveraging declarative transaction management support provided by the bounded task flow.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-481543947453257947?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/481543947453257947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=481543947453257947' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/481543947453257947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/481543947453257947'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/declarative-transaction-support-for.html' title='Declarative transaction support for your JPA data model'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-r30EY5meoqg/TfngKPfffnI/AAAAAAAACxY/xdpzEeQz7z4/s72-c/editor1.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8932743433079258618</id><published>2011-06-11T09:50:00.000-07:00</published><updated>2011-06-11T09:52:55.885-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Globally setting the change event policy for all data bindings</title><content type='html'>The  11.1.2.0.0 release of ADF has added a new configuration entry in adf-config.xml file to globally set the  default change event policy for the all iterators in the application. Of course,  developers can override the default setting at each binding level.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-I_TtSbFdr5o/TfObyU6dB9I/AAAAAAAACtU/NYbHkjRQYa4/s1600/adfconfig.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="172" width="400" src="http://4.bp.blogspot.com/-I_TtSbFdr5o/TfObyU6dB9I/AAAAAAAACtU/NYbHkjRQYa4/s400/adfconfig.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;adf-config xmlns="http://xmlns.oracle.com/adf/config"   &lt;br /&gt; ...  &lt;br /&gt;  &amp;lt;adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"&amp;gt;  &lt;br /&gt;   &amp;lt;defaults &lt;b&gt;changeEventPolicy&lt;/b&gt;="ppr" useBindVarsForViewCriteriaLiterals="true"/&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8932743433079258618?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8932743433079258618/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8932743433079258618' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8932743433079258618'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8932743433079258618'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/globally-setting-change-event-policy.html' title='Globally setting the change event policy for all data bindings'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-I_TtSbFdr5o/TfObyU6dB9I/AAAAAAAACtU/NYbHkjRQYa4/s72-c/adfconfig.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4363260919445693965</id><published>2011-06-08T23:25:00.000-07:00</published><updated>2011-06-08T23:25:42.583-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Controller'/><title type='text'>Creating Task Flow bindings on the fly</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A very common demand from the community was support for adding regions at run time. The good news is that 11.1.2 release has support for adding regions dynamically which is now well supported by a task flow binding layer as well. Wow...excited? Please see&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/taskflows_regions.htm#CHDBDDFE"&gt;21.10 Configuring a Page To Render an Unknown Number of Regions&lt;/a&gt; in developers fusion developers guide to learn more about this topic. Let me give you a quick overview on the implementation. Its very easy.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. Build the logic to return TaskFlowBindingAttributes  list for dynamic task flows &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;First step is to build a managed bean to hold your business logic for building list of &lt;a href="http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17480/oracle/adf/controller/binding/TaskFlowBindingAttributes.html"&gt;oracle.adf.controller.binding.TaskFlowBindingAttributes&lt;/a&gt; as shown in the following code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; private List&amp;lt;TaskFlowBindingAttributes&amp;gt; taskFlowBindings = new ArrayList&amp;lt;TaskFlowBindingAttributes&amp;gt;();  &lt;br /&gt;   &lt;br /&gt; public void buidTaskflowBindings(){  &lt;br /&gt;   &lt;br /&gt;  TaskFlowBindingAttributes tfBindAttr1 = new TaskFlowBindingAttributes();  &lt;br /&gt;  tfBindAttr1.setId("region1");  &lt;br /&gt;  tfBindAttr1.setTaskFlowId(new TaskFlowId("/WEB-INF/dept-task-flow-definition.xml", "dept-task-flow-definition"));  &lt;br /&gt;  taskFlowBindings.add(tfBindAttr1);  &lt;br /&gt;    &lt;br /&gt;  TaskFlowBindingAttributes tfBindAttr2 = new TaskFlowBindingAttributes();  &lt;br /&gt;  tfBindAttr2.setId("region2");  &lt;br /&gt;  tfBindAttr2.setTaskFlowId(new TaskFlowId("/WEB-INF/emp-task-flow-definition.xml", "emp-task-flow-definition"));  &lt;br /&gt;  tfBindAttr2.setParametersMap("#{pageFlowScope.MyBean.parameterMap}");  &lt;br /&gt;  taskFlowBindings.add(tfBindAttr2);  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt; public List&amp;lt;TaskFlowBindingAttributes&amp;gt; getTaskFlowBindings() {  &lt;br /&gt;  return taskFlowBindings;  &lt;br /&gt; }  &lt;br /&gt;   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2. Generate the executable entry for multi task flow in the page definition file&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Switch to the binding tab of your page, click on the '+' icon under the &lt;b&gt;Executables&lt;/b&gt; section to generate the binding for multiTaskFlow. Please see the following image. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-jaxK8Wt1nrw/TfBWm5r2-bI/AAAAAAAACtM/QcpVudBNZFE/s1600/multitaskflow.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-jaxK8Wt1nrw/TfBWm5r2-bI/AAAAAAAACtM/QcpVudBNZFE/s400/multitaskflow.PNG" width="394" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You may need to key in a unique identifier for the &amp;lt;multiTaskFlow&amp;gt; entry, and a value for taskFlowList as well. The taskFlowList will take an EL expression that returns the list of TaskFlowBindingAttributes at run time. In our case the method getTaskFlowBindings() returns the list(please refer this method in above code snippet). &lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Note: The multi task flow binding (multiTaskFlow) in the page definition identifies a list of bounded task flows used in the ADF region.&lt;/blockquote&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;  &amp;lt;multiTaskFlow id="multiRegion1"   &lt;br /&gt;  taskFlowList="#{pageFlowScope.MyBean.taskFlowBindings}"  &lt;br /&gt;  xmlns="http://xmlns.oracle.com/adf/controller/binding" activation="deferred"/&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. Build the UI to host regions at run time&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The last step is building the UI to host regions at run time. This example uses af:forEach for adding regions at run time as shown in the following page snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;af:forEach var="tf" items="#{bindings.multiRegion1.taskFlowBindingList}"&amp;gt;  &lt;br /&gt;  &amp;lt;af:region value="#{tf.regionModel}" id="reg#{tf.name}"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:forEach&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/web.1112/e16182/taskflows_regions.htm#ADFFD23075"&gt;&lt;b&gt;Notes&lt;/b&gt;(from Fusion Developers Guide):&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Limit the number of ADF regions that you create in a page to 10.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Each task flow binding inherits attributes defined for the multi task flow binding unless you override this behavior using the methods exposed by TaskFlowBindingAttributes.&lt;/li&gt;&lt;/ul&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;Each task flow binding inherits parameters defined in the multi task flow binding in addition to those defined using the parametersMap property.&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/MultiRegionSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run the main.jsf page and click on the 'Display More Taskflows' button.&lt;br /&gt;You may notice that two task flows are getting added on the screen when you click on the button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4363260919445693965?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4363260919445693965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4363260919445693965' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4363260919445693965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4363260919445693965'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/creating-task-flow-bindings-on-fly.html' title='Creating Task Flow bindings on the fly'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-jaxK8Wt1nrw/TfBWm5r2-bI/AAAAAAAACtM/QcpVudBNZFE/s72-c/multitaskflow.PNG' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6791629157206671994</id><published>2011-06-07T21:24:00.000-07:00</published><updated>2011-06-07T21:25:19.336-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>The Release 2 (11.1.2) of Oracle JDeveloper and Application Development Framework Now Available</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The 11.1.2 release of JDeveloper and ADF is available now. This is a very promising release and I'm sure you will really love using this smart tool.&lt;br /&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html"&gt;Download&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/jdev-11gr2-nf-404365.html"&gt;New Features&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://download.oracle.com/docs/cd/E16162_01/index.htm"&gt;Documentation&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://download.oracle.com/docs/cd/E18941_01/tutorials/toc.htm"&gt;Tutorials&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6791629157206671994?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6791629157206671994/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6791629157206671994' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6791629157206671994'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6791629157206671994'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/releases2-of-oracle-jdeveloper-and.html' title='The Release 2 (11.1.2) of Oracle JDeveloper and Application Development Framework Now Available'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1410208731234672841</id><published>2011-06-03T23:43:00.000-07:00</published><updated>2011-06-10T08:39:00.988-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Call custom JavaScript method during component initialization</title><content type='html'>If you need to invoke custom Java Script method during some specific UI(ADF Faces) component initialization, then this post is for you. Idea is to use &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/apidocs/oracle/adf/view/rich/event/ClientListenerSet.html#addBehavior(javax.el.ValueExpression)"&gt;ClientListenerSet::addBehavior(javax.el.ValueExpression)&lt;/a&gt; to associate a deferred value expression (referring a JavaScript method) with the UI component, which will be evaluated later when DOM is rendered on the page. Thanks to Gary Van Matre who shared this idea in an internal discussion forum&lt;br /&gt;&lt;br /&gt;public void setSomeInputField(RichInputText inpField) {&lt;br /&gt;this.inputField = inpField;&lt;br /&gt;ClientListenerSet clientListenerSet = inputField.getClientListeners();&lt;br /&gt;if (clientListenerSet == null) {&lt;br /&gt;clientListenerSet = new ClientListenerSet();&lt;br /&gt;clientListenerSet.addBehavior("new CustomCompBehavior()");&lt;br /&gt;inputField.setClientListeners(clientListenerSet);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You &lt;a href="http://adf-samples.googlecode.com/files/ComponentInitializationUsingJS.zip"&gt;can download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS4(11.1.1.5.0)]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1410208731234672841?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1410208731234672841/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1410208731234672841' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1410208731234672841'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1410208731234672841'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/call-custom-javascript-method-during.html' title='Call custom JavaScript method during component initialization'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6258716983483925322</id><published>2011-06-03T21:19:00.000-07:00</published><updated>2011-06-03T22:01:06.433-07:00</updated><title type='text'>Oracle OpenWorld 2011 Suggest-a-Session</title><content type='html'>&lt;blockquote&gt;If you missed the general public call for papers, don’t worry! You have another opportunity to get included in this year’s event. &lt;br /&gt;You can either suggest a session or vote for one - &lt;a href="https://mix.oracle.com/events/oow11/proposals?stream=Oracle+Develop&amp;track=Rich+Enterprise+Application+Development"&gt;&lt;b&gt;Rich Enterprise Application Development&lt;/b&gt;&lt;/a&gt;...&lt;br /&gt;&lt;br /&gt;&lt;a href="https://mix.oracle.com/home"&gt;Read More....&lt;/a&gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6258716983483925322?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6258716983483925322/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6258716983483925322' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6258716983483925322'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6258716983483925322'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/oracle-openworld-2011-suggest-session.html' title='Oracle OpenWorld 2011 Suggest-a-Session'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8543823376408733645</id><published>2011-06-03T05:05:00.000-07:00</published><updated>2011-06-03T05:05:54.951-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Why does programmatic refresh fail for child table when the parent table has immediate=true?</title><content type='html'>Story so far...&lt;br /&gt;There is a master table with immediate=true and a custom selectionListener. An editable(clickToEdit) child table needs to be refreshed programmatically from master table's custom selectionListener. &lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;  &amp;lt;af:table id="masterTabl" immediate="true"   &lt;br /&gt;    selectionListener="#{MyBean.customSelectionHandlerForParentTable}" ...  &lt;br /&gt;  &amp;lt;af:table id="childTabl" partialTriggers="::masterTabl"   &lt;br /&gt;    editingMode="clickToEdit" ...  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;  public void customSelectionHandlerForParentTable(SelectionEvent selectionEvent) {  &lt;br /&gt;   RichTable childTable = getChildTable();  &lt;br /&gt;   refreshChildTableCollectionModel()  &lt;br /&gt;   RequestContext.getCurrentInstance().addPartialTarget(childTable);  &lt;br /&gt;  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Now the fun starts...Though everything looks perfect, child table fails to reflect the refreshed CollectioModel (which is updated  from the SelectionEvent of master table). Child table just repaints the previously submitted values from UI as is, not the updated model :(&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What goes wrong here?&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;Well, a variant of this specific case has been discussed in one of my previous post -&lt;a href="http://jobinesh.blogspot.com/2009/10/reset-content-of-web-page.html"&gt;Reset the content of a web page&lt;/a&gt;. Let me explain few basic concepts from the perspective of the above use case.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What does happen when you set immediate="true" on a component?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you keep immediate="true" for a UI component, the normal JSF life cycle for that component gets short circuited as explained in the following section. btw, please see this topic '&lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bnaqq.html"&gt;Life Cycle of a JSF Page&lt;/a&gt;' if you are not familiar with JSF life cycle concept as such.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;#149; What happens when you set immediate="true" set on an ActionSource(e.g. af:commandButton) component?&lt;br /&gt;&lt;br /&gt;The ActionEvent for this component is normally delivered in  'Invoke Application Phase'. When immediate is set true the ActionEvent delivery is moved up to the 'Apply Request Values Phase'.  An ActionEvent always results in 'renderResponse' being called implicitly in the default ActionListener  whether or not an "action" is attached.&lt;br /&gt;&lt;br /&gt;&amp;#149; What happens when you set immediate="true" on an EditableValueHolder(e.g. af:inputText) component?&lt;br /&gt;&lt;br /&gt;The validation and valueChangeEvent for this component usually take place in the 'Process Validations Phase'. When immediate is true the component's value will be converted and validated in the 'Apply Request Values Phase', and ValueChangeEvents will be delivered in that phase as well. Please note that framework is not going to skip any lifecycle phase even if you keep immediate=true. You may need to call FacesContext::renderResponse() if you really want to by pass the rest of the phases from the listener.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How does 'component renderer' treat submitted value of the component?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Each UI component has local cache value. When you submit a form, submitted value gets assigned to this localValue at the end of 'Process Validations Phase', and thereafter submitted value is set as null. During the 'Render Response', first consult the local value property of this component. If non-null return it. If null, see if we have a ValueExpression for the value property. UIInput::resetValue() reset the submitted value that would force the rendering logic to take the value from the model/binding layer.&lt;br /&gt;&lt;br /&gt;Enough theory, let me answer the question now :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In the above use case when you select a parent row, the submitted content contains other editable fields from the form as well(including the child table's editable fields too). As you have immediate="true" set for parent table, SelectionEvent gets fired as part of Apply Request Values Phase. If you 'blindly' refresh the CollectionModel for the child table at this stage, it does not really help you because the 'submitted form' holds set of editable components and they are lined up to go through normal JSF life cycle phases. JSF runtime will use values of these submitted fields for model update later point, which may even override the the model changes done by you in the early phase of life cycle. Apparently, solution for the above use case is to clear the submitted values from the components which needs to be refreshed with updated model. For input UI components (such as af:inputText), you can call &lt;a href="http://download.oracle.com/javaee/5/api/javax/faces/component/UIInput.html#resetValue()"&gt;&lt;b&gt;UIInput::resetValue()&lt;/b&gt;&lt;/a&gt; on each component to clear the submitted value. For stamped components like af:table, you are supposed to call &lt;a href="http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/component/UIXCollection.html#resetStampState()"&gt;&lt;b&gt;resetStampState()&lt;/b&gt;&lt;/a&gt;. Now your custom selection listener for parent table may look like as shown in the following code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;  public void customSelectionHandlerForParentTable(SelectionEvent selectionEvent) {  &lt;br /&gt;   RichTable childTable = getChildTable();  &lt;br /&gt;   &lt;b&gt;childTable.resetStampState();&lt;/b&gt;  &lt;br /&gt;   refreshChildTableCollectionModel()  &lt;br /&gt;   RequestContext.getCurrentInstance().addPartialTarget(childTable);  &lt;br /&gt;  }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8543823376408733645?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8543823376408733645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8543823376408733645' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8543823376408733645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8543823376408733645'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/06/why-does-programmatic-refresh-fail-for.html' title='Why does programmatic refresh fail for child table when the parent table has immediate=true?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3776630965847288941</id><published>2011-05-31T21:40:00.000-07:00</published><updated>2011-05-31T21:40:21.703-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Checking for dirty data</title><content type='html'>Sometimes you may need to check for the modified state of the business data. If your data update is always triggered through ADF binding layer(where the UI component is bound with data using EL #{bindings.xxx.inputValue}), then its an easy job as all the data access is routed through a common entry point. You can safely use &lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/adf/model/binding/DCDataControl.html#isTransactionModified__"&gt;DCDataControl::isTransactionModified()&lt;/a&gt; - This returns true if you have modified any of the attribute values exposed by the DataControl. You can use this API even if you use EJB and JavaBean Data Control as well.&lt;br /&gt;&lt;br /&gt;DCBindingContainer dcBindingContainer=(DCBindingContainer)&lt;br /&gt;                      BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt;if(dcBindingContainer.getDataControl().isTransactionModified()){&lt;br /&gt;//Code goes here...&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;Please note that for those Data Controls which does not have direct implementation for the 'transaction commit'(e.g:  EJB or JavaBean Data Control ), its your duty to clear the modified flag once you persist the changes by calling the below given API.&lt;br /&gt;&lt;br /&gt;dcBindingContainer.getDataControl().commitTransaction();&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3776630965847288941?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3776630965847288941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3776630965847288941' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3776630965847288941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3776630965847288941'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/checking-for-dirty-data.html' title='Checking for dirty data'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-133320723156625140</id><published>2011-05-24T09:32:00.000-07:00</published><updated>2011-05-24T09:32:15.320-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Setting the bind variable value for the destination View Object in the View Link</title><content type='html'>I'm sharing an interesting use case that has come up recently from an internal team. The developer was looking for some hooks to set bind variable value used in the destination View Object participating in a View Link. &lt;a href="http://blogs.oracle.com/smuenchadf"&gt;Steve Muench&lt;/a&gt; has shared a useful tip to solve this case, let me share the same here for your reference, thanks Steve :)&lt;br /&gt;&lt;br /&gt;The use case requirement is to set bind variable value conditionally for the child view object. Interestingly, the bind variable value is supposed to set programmatically only when the child view object is executed as part of master child coordination(through view link), in all other cases it's left to the caller. &lt;br /&gt;&lt;br /&gt;The solution is very straight forward. The 11.1.1.5.0 release has  new method added &lt;a href="http://jobinesh.blogspot.com/2011/05/preparing-viewobjects-query-for.html"&gt;ViewObjectImpl::prepareRowSetForQuery(ViewRowSetImpl vrs)&lt;/a&gt; to intercept the VO query preparation phase. You may need to override this method, and add check for parent rows(to see whether VO instance is participating in master child coordination) and set the bind variable accordingly.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; @Override  &lt;br /&gt; public void prepareRowSetForQuery(ViewRowSetImpl vrs) {  &lt;br /&gt;  RowSetIterator[] parentRows = vrs.getMasterRowSetIterators();  &lt;br /&gt;  /**  &lt;br /&gt;  * Check for parent Rows. If its not null, then query execution is   &lt;br /&gt;  * triggered through ViewLink, get the required attributes from   &lt;br /&gt;  * parent row( as per the use case ), and set the bind variable value  &lt;br /&gt;  */  &lt;br /&gt;  if (parentRows != null &amp;amp;&amp;amp; parentRows.length &amp;gt; 0 &amp;amp;&amp;amp;  &lt;br /&gt;      parentRows[0].getCurrentRow() != null) {  &lt;br /&gt;      Number locId =  &lt;br /&gt;           (Number)parentRows[0].getCurrentRow().getAttribute("LocationId");  &lt;br /&gt;      //This is just a demo, to hide the employees whose salry is less   &lt;br /&gt;      //than 3000$ from Location = 1500  &lt;br /&gt;      if (locId != null &amp;amp;&amp;amp; locId.intValue() == 1500) {  &lt;br /&gt;           vrs.ensureVariableManager().setVariableValue("bindVarSalary",  &lt;br /&gt;                                                                   3000);  &lt;br /&gt;      }  &lt;br /&gt;  }  &lt;br /&gt;  super.prepareRowSetForQuery(vrs);  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/ViewLinkWithDynmaicValue.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.1.5.0 (11g R1 PS4) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example displays two employee tables, the one which follows master child relation with department table displays only those employee records having salary &gt; 3000. This filtering is done by following the approach detailed above.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-c8F6fREOi8s/TdufyZ3ed2I/AAAAAAAACqo/yG9n0mfYmjQ/s1600/masterchild.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="275" width="400" src="http://1.bp.blogspot.com/-c8F6fREOi8s/TdufyZ3ed2I/AAAAAAAACqo/yG9n0mfYmjQ/s400/masterchild.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-133320723156625140?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/133320723156625140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=133320723156625140' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/133320723156625140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/133320723156625140'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/setting-bind-variable-value-for.html' title='Setting the bind variable value for the destination View Object in the View Link'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-c8F6fREOi8s/TdufyZ3ed2I/AAAAAAAACqo/yG9n0mfYmjQ/s72-c/masterchild.PNG' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5322853964566291007</id><published>2011-05-19T07:06:00.000-07:00</published><updated>2011-05-19T07:06:46.601-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Why do you see a duplicate af:commandToolbarButton after partial page refresh?</title><content type='html'>This is a very widely observed issue if you have partialTriggers set for child components of  &amp;lt;af:toolbar&amp;gt;.&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:toolbar&amp;gt;  &lt;br /&gt; &amp;lt;af:commandToolbarButton ... partialTriggers="someComp"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:toolbar&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;What goes wrong here?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, please see the tag documentation for &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_toolbar.html"&gt;&amp;lt;af:toolbar&amp;gt&lt;/a&gt; . I'm copying the relevant content for your reference.&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;Updating through PartialTriggers&lt;br /&gt;&lt;br /&gt;Note that if a toolbar child component is going to be updated through partial page rendering, you need to update the toolbar as well. You do this by adding the child components id to the toolbar's partialTriggers attribute. This way the toolbar can appropriately manage its children in respect to sizing and placement in overflow. Also note that many input components also update themselves through partial page rendering. If you include an input component (or quickQuery) on a toolbar, you should include that child's id in the toolbar's partialTriggers attribute so that the toolbar also updates when the input component is replaced. Because this partialTrigger will cause overflow to close during the toolbar ppr, toolbar child components that update themselves via ppr outside of a submit (like InputComboboxLOV) will work better when not in overflow.&lt;/blockquote&gt;&lt;br /&gt;In a nutshell, if you change the above tag snippet to refresh the af:toolbar (instead of child elements) as shown below, issue will be solved and you can see the partial page refresh works for &amp;lt;af:commandToolbarButton&amp;gt; without any side effects.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:toolbar partialTriggers="someComp"&amp;gt;  &lt;br /&gt; &amp;lt;af:commandToolbarButton ... /&amp;gt;  &lt;br /&gt; &amp;lt;/af:toolbar&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5322853964566291007?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5322853964566291007/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5322853964566291007' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5322853964566291007'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5322853964566291007'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/why-do-you-see-duplicate.html' title='Why do you see a duplicate af:commandToolbarButton after partial page refresh?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-149263217659109425</id><published>2011-05-18T05:12:00.000-07:00</published><updated>2011-05-18T05:12:38.623-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Soft deletion of rows</title><content type='html'>In this post I'm sharing a simple example illustrating the 'soft deletion' of rows and undoing the delete later if the user opts for. The business use case requirement is that, whenever end user delete rows, system should not delete these rows from the underlying data base table, rather should mark(update) them as deleted. Later user can undo the deletion to restore the deleted rows(this operation should not rollback the transaction)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Iddu6zWz2XM/TdOryozHXqI/AAAAAAAACpM/PeB5cUEVTfM/s1600/scrn.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="259" width="400" src="http://3.bp.blogspot.com/-Iddu6zWz2XM/TdOryozHXqI/AAAAAAAACpM/PeB5cUEVTfM/s400/scrn.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/SoftDeleteSample.zip"&gt; download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS4 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The 'Soft Delete' action has two steps, &lt;br /&gt;1.The action first refreshes the row with database by calling  row.refresh(&lt;a href="http://download.oracle.com/otn_hosted_doc/jdeveloper/1012/bc4jjavadoc/rt/oracle/jbo/Row.html#REFRESH_WITH_DB_FORGET_CHANGES"&gt;Row.REFRESH_WITH_DB_FORGET_CHANGES&lt;/a&gt;) to discard the modifications that user might have done on the row before opting for delete(if any) &lt;br /&gt;2. Next step is to remove the row from the iterator(effectively from entity object). Deleted row keys are stored in an ArrayList for performing 'undo' operation if needed. &lt;br /&gt;&lt;br /&gt;Later when user commits transaction, entity instance will check for operation flag and will change it to UPDATE if the value is DELETE, and would flag an attribute as well to enable soft delete at database table level. In the above sample commits action updates DepartmentName attribute by prefixing '[DELETE]' token . The view object query has necessary where clause added to remove the soft deleted rows from the result list. &lt;br /&gt;&lt;br /&gt;The roll back action of deleted rows refreshes the deleted entity rows with data base to restore them back to the original state.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-149263217659109425?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/149263217659109425/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=149263217659109425' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/149263217659109425'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/149263217659109425'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/soft-deletion-of-rows.html' title='Soft deletion of rows'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Iddu6zWz2XM/TdOryozHXqI/AAAAAAAACpM/PeB5cUEVTfM/s72-c/scrn.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4480115898977639952</id><published>2011-05-16T01:02:00.000-07:00</published><updated>2011-05-16T01:13:00.648-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>ADF BC run time now calls refreshCollection(...) on your shared ViewObject !</title><content type='html'>There is an interesting enhancement available on &lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#executeQuery__"&gt;ViewObjectImpl::executeQuery()&lt;/a&gt; with  11.1.1.5.0 release. Now the executeQuery() will check for the View Object's parent Application Module  configuration to see if its defined as '&lt;a href="http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/bclookups.htm#ADFFD1591"&gt;shared AM&lt;/a&gt;' and may call &lt;a href="http://download.oracle.com/docs/cd/E21764_01/web.1111/b31974/appendix_mostcommon.htm#ADFFD1481"&gt;refreshCollection(...)&lt;/a&gt; for shared View Objects. So you don't need to worry on calling the confusing &lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#refreshCollection_oracle_jbo_Row____boolean__boolean_"&gt;refreshCollection(...)&lt;/a&gt; to access cached query collection without reexecuting the query. You are allowed to call ViewObjectImpl::executeQuery() always in a seamless way :)&lt;br /&gt;&lt;br /&gt;If you really need to forcefully execute query on shared View Object, then please use &lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#forceExecuteQueryOfSharedVO__"&gt;ViewObjectImpl::forceExecuteQueryOfSharedVO()&lt;/a&gt; - API available since 11.1.1.5.0&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4480115898977639952?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4480115898977639952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4480115898977639952' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4480115898977639952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4480115898977639952'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/adf-bc-run-time-now-calls.html' title='ADF BC run time now calls refreshCollection(...) on your shared ViewObject !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1109109287241611162</id><published>2011-05-14T10:08:00.000-07:00</published><updated>2011-05-14T19:28:05.005-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Preparing ViewObject's query for execution</title><content type='html'>If you need to assign bind variable values or modify where clause conditionally just before the the query execution, then 11.1.1.5.0(PS4) release has a new method added &lt;a href="http://download.oracle.com/docs/cd/E21764_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#prepareRowSetForQuery_oracle_jbo_server_ViewRowSetImpl_"&gt;ViewObjectImpl::prepareRowSetForQuery(ViewRowSetImpl vrs)&lt;/a&gt;. This method engages well with ViewObjectImpl::getQueryHitCount()and ViewObjectImpl::getEstimatedRowCount() as well. I mean the prepareRowSetForQuery(...) will get invoked before calling the the above methods by the runtime. This is useful if you need to set bind variable values before the query execution for List Of Values or ViewAccssors used for displaying Tree components. &lt;br /&gt;&lt;br /&gt;You can use this method safely(zero side effect) to add your logic for tweaking default query by setting bind variable values or additional where clause at run time.&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;public class DepartmentsViewObjectImpl extends ViewObjectImpl{&lt;br /&gt;...&lt;br /&gt;@Override&lt;br /&gt;public void prepareRowSetForQuery(ViewRowSetImpl vrs) {&lt;br /&gt;vrs.ensureVariableManager().setVariableValue("bindVarDeptId", deptIdRuntimeValue);&lt;br /&gt;super.prepareRowSetForQuery(vrs);&lt;br /&gt;}&lt;br /&gt;...&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1109109287241611162?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1109109287241611162/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1109109287241611162' title='8 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1109109287241611162'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1109109287241611162'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/preparing-viewobjects-query-for.html' title='Preparing ViewObject&apos;s query for execution'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>8</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3313050690068488806</id><published>2011-05-06T11:04:00.000-07:00</published><updated>2011-05-06T11:04:20.040-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 4 is now available on OTN</title><content type='html'>Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 4 (11.1.1.5.0)(Build 6013) is available on OTN. &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/downloads/index.html"&gt;Check it out&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3313050690068488806?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3313050690068488806/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3313050690068488806' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3313050690068488806'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3313050690068488806'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/oracle-jdeveloper-and-oracle-adf-11g.html' title='Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 4 is now available on OTN'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8435819528292986167</id><published>2011-05-04T06:14:00.000-07:00</published><updated>2011-05-04T22:09:38.266-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Turning off the stretchable behavior of  &lt;af:inputComboboxListOfValues&gt;</title><content type='html'>The &amp;lt;af:inputComboboxListOfValues&amp;gt; has been enhanced recently(11.1.1.4.0) to stretch the contents of the drop down list to reflect the display width of the attribute that you set on a view object. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-WKrq2C72SAU/TcFNL_NqrqI/AAAAAAAACjk/wJZo7LxaMNc/s1600/search.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="180" width="400" src="http://1.bp.blogspot.com/-WKrq2C72SAU/TcFNL_NqrqI/AAAAAAAACjk/wJZo7LxaMNc/s400/search.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This feature is controlled by a boolean ADF skin property, -tr-stretch-dropdown-table. &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31973/af_skin.htm#ADFUI9968"&gt;Web UI Developers Guide&lt;/a&gt; says...&lt;br /&gt;&lt;i&gt;This property determines whether the table in the dropdown list stretches to show the content of the table columns or limits the width of the table to the width of the input field in the inputComboboxListOfValues component.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;You can turn off the stretchable behavior using the following selector in your css file. Customizing the skinning is already discussed in one of my previous post- &lt;a href="http://jobinesh.blogspot.com/2010/06/style-your-application-in-your-own-way.html"&gt;Style your application in your own way&lt;/a&gt;. More details on skinning can be found in the following link as well - &lt;a href="http://myfaces.apache.org/trinidad/devguide/skinning.html"&gt;Apache Trinidad Skinning&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;af|inputComboboxListOfValues{&lt;br /&gt;-tr-stretch-dropdown-table: false;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8435819528292986167?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8435819528292986167/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8435819528292986167' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8435819528292986167'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8435819528292986167'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/turning-off-stretchable-behavior-of.html' title='Turning off the stretchable behavior of  &amp;lt;af:inputComboboxListOfValues&amp;gt;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-WKrq2C72SAU/TcFNL_NqrqI/AAAAAAAACjk/wJZo7LxaMNc/s72-c/search.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1835926974983469142</id><published>2011-05-03T02:18:00.000-07:00</published><updated>2011-06-14T21:40:25.957-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Multiple root  Application Modules sharing the same transaction context !</title><content type='html'>I'm not sure how many of you noticed the following section in Fusion Developers Guide - &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bclookups.htm#ADFFD22201"&gt;10.2.6 What You May Need to Know About Shared Application Modules and Connection Pooling&lt;/a&gt;. This part talks about an AM configuration parameter '&lt;b&gt;jbo.shared.txn&lt;/b&gt;' which can be used for sharing entity cache and DB connection across multiple root application modules. You just need to key in same string value for 'jbo.shared.txn' using the properties page of the editor for the bc4j.xcfg file of the root application modules. &lt;br /&gt;&lt;br /&gt;Please note that this property is applicable for shared as well as non shared Application Modules(though originally designed for non-shared AM). Interestingly, this is used internally by the declarative taskflow transaction to allow the ADF BC Data Controls to share a DBTransaction. I'm copying the relevant content from developers guide below for a quick reference...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;When your application defines more than one shared application module, you can change the default to optimize database connection usage by defining a named transaction for each root application module to use. The transaction name is an arbitrary string that you set on the jbo.shared.txn property in the Properties page of the editor for the bc4j.xcfg file of the root application module. At runtime, the root application modules with the same jbo.shared.txn property setting (identified by the string you supply) will share the same database connection and etity cache&lt;/blockquote&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: Please note that in the above case the transaction would be shared (across user sessions) between all Application Modules having the same 'jbo.shared.txn' value.  In case of task flow, the data binding layer supplies the jbo.shared.txn value derived from user session to ensure unique value for each user session(transaction context). And this is of course driven by the transaction attribute you set for task flow at design time.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1835926974983469142?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1835926974983469142/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1835926974983469142' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1835926974983469142'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1835926974983469142'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/05/two-root-application-modules-sharing.html' title='Multiple root  Application Modules sharing the same transaction context !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7782088205444588074</id><published>2011-04-27T05:32:00.000-07:00</published><updated>2011-04-27T19:13:55.372-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Modifying the Application Module's JDBC DataSource at run time</title><content type='html'>In normal scenario, your Application Module(AM) may have a static JDBC data source configured and will be connected to the single data base in all conditions. However there are cases where the application may need to display data from different data bases based on user profile. In today's post, I talk about an example for the above use case. Well, this is not a new topic as such. In fact, this has been discussed previously many times.&lt;br /&gt;&lt;br /&gt;1. &lt;a href="http://blogs.oracle.com/smuenchadf/examples/#129"&gt;Dynamic JDBC Credentials example by Steve Muench&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/dynamicjdbchowto-101755.html"&gt;How To Support Dynamic JDBC Credentials&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I'm copying the same solution in a slightly modified form ;)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Programmatically setting DataSource for an Application Module&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A bit of theory before get in to the implementation. When a Fusion Web Page is getting rendered, UI controls may try to get data by evaluating the expression set for the value attribute. At this stage  binding layer comes in to action, and will identify the underlying data provider(your Application Module) for the the specific attribute. When the binding layer refers Application Module, run time would either an instance  or check out one from the AM pool. By default, AM instance is configured using the static meta data from bc4j.xcfg file, which is generated at design time. The design time configuration can be very well overridden by system parameters supplied at run time (java -Dproperty=value). &lt;br /&gt;&lt;br /&gt;In the above use case, the requirement is to override the default data source specified for an AM. Interestingly, ADF BC provides a mechanism to override the configuration properties dynamically using a custom &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/common/ampool/EnvInfoProvider.html"&gt;EnvInfoProvider&lt;/a&gt;. This part is well explained in Fusion Developer's Guide - &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcampool.htm#ADFFD1340"&gt;41.2.4 How to Programmatically Set Configuration Properties&lt;/a&gt;. &lt;br /&gt;&lt;br /&gt;In this example, I'm trying to make use of this custom EnvInfoProvider which may get engaged whenever run time needs configuration properties for an Application Module. You may also need to keep &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcampool.htm#ADFFD1348"&gt;jbo.ampool.dynamicjdbccredentials&lt;/a&gt;=true(default is true) to enable additional pooling lifecycle events to allow developer-written code to change the db credential. &lt;br /&gt;&lt;br /&gt;The custom EnvInfoProvider used in this example may look like as shown in the following picture. You can see that the DynamicEnvInfoProvider::getInfo(...) overrides the default configuration property for Configuration.JDBC_DS_NAME(JDBC DataSource) using value from a session variable. &lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; public class DynamicEnvInfoProvider implements EnvInfoProvider {  &lt;br /&gt;  public Object getInfo(String infoType, Object env) {  &lt;br /&gt;  if (EnvInfoProvider.INFO_TYPE_JDBC_PROPERTIES.equals(infoType)) {  &lt;br /&gt;      Map session = ADFContext.getCurrent().getSessionScope();  &lt;br /&gt;      Object dsName = session.get(Configuration.JDBC_DS_NAME);  &lt;br /&gt;      if (dsName != null) {  &lt;br /&gt;           if (((Hashtable)env).containsKey(Configuration.JDBC_DS_NAME)) {  &lt;br /&gt;                ((Hashtable)env).put(Configuration.JDBC_DS_NAME,  &lt;br /&gt;                                          (String)dsName);  &lt;br /&gt;           }  &lt;br /&gt;      }  &lt;br /&gt;  }  &lt;br /&gt;  return null;  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;When you enable dynamic credentials (jbo.ampool.dynamicjdbccredentials) the AM JDBC credentials will be updated whenever a new DataControl is constructed (new AM handle is created).  The credentials will NOT be updated at the begin of each request in a stateful session, even though the AM is released at the end of each request. &lt;/blockquote&gt;&lt;br /&gt;&lt;b&gt;Configuring a custom EnvInfoProvider for AM&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;There are two possible approaches for hooking your custom EnvInfoProvider with AM.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Approach 1&lt;/b&gt; - Using custom session cookie factory class &lt;br /&gt;&lt;br /&gt;a) Implement a custom session cookie factory class to set the custom EnvInfoProvider on the SessionCookie instance. Runtime will check for overridden EnvInfoProvider on the session cookie whenever JDBC data source needs to be created.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   @Override  &lt;br /&gt;   public SessionCookie createSessionCookie(String applicationId,  &lt;br /&gt;                        String sessionId,  &lt;br /&gt;                        ApplicationPool pool,  &lt;br /&gt;                        Properties properties) {  &lt;br /&gt;     SessionCookie cookie =  &lt;br /&gt;       super.createSessionCookie(applicationId, sessionId, pool,  &lt;br /&gt;                    properties);  &lt;br /&gt;     EnvInfoProvider provider = new DynamicEnvInfoProvider();  &lt;br /&gt;     cookie.setEnvInfoProvider(provider);  &lt;br /&gt;     return cookie;  &lt;br /&gt;   }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;b)Configure AM to use the custom session cookie factory class &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Q82Ip31-ICI/TbfxXV6JAZI/AAAAAAAACjE/P8lpIdUXQW4/s1600/AMeditor1.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="364" width="400" src="http://4.bp.blogspot.com/-Q82Ip31-ICI/TbfxXV6JAZI/AAAAAAAACjE/P8lpIdUXQW4/s400/AMeditor1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The following class diagram depicts the runtime engagement between the classes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-q3TGnrHS8HI/Tbf1_VfLVjI/AAAAAAAACjU/sSp_zX_8JBY/s1600/Class%2BDiagram.png" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="260" width="400" src="http://2.bp.blogspot.com/-q3TGnrHS8HI/Tbf1_VfLVjI/AAAAAAAACjU/sSp_zX_8JBY/s400/Class%2BDiagram.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Approach 2&lt;/b&gt; -  Using Application Module configuration parameter - jbo.envinfoprovider&lt;br /&gt;&lt;br /&gt;Configure 'jbo.envinfoprovider' to use custom EnvInfoProvider class using the AM configuration editor as shown in  the following screen shot. Well, this seems to be more straight forward and much simpler compared to Approach 1.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-PmqE6ihR8zE/Tbfx9cCGknI/AAAAAAAACjM/0iG99dy1Qko/s1600/AMeditor2.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="336" src="http://1.bp.blogspot.com/-PmqE6ihR8zE/Tbfx9cCGknI/AAAAAAAACjM/0iG99dy1Qko/s400/AMeditor2.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The above action may update the bc4j.xcfg file as shown below.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Please note that, you may face some weird error at design time if you try modifying this property using JDeveloper 11.1.1.4.0 release. In case if the editor errors out while manipulating this property, then please follow the Approach 1(though you may need to add a couple of 'infrastructural' classes)&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;?xml version = '1.0' encoding = 'UTF-8'?&amp;gt;  &lt;br /&gt; &amp;lt;BC4JConfig version="11.1" xmlns="http://xmlns.oracle.com/bc4j/configuration"&amp;gt;  &lt;br /&gt;   &amp;lt;AppModuleConfigBag ApplicationName="model.AppModule"&amp;gt;  &lt;br /&gt;    &amp;lt;AppModuleConfig DeployPlatform="LOCAL" RELEASE_MODE="Stateless"  jbo.project="model.Model" name="AppModuleLocal" ApplicationName="model.AppModule"&amp;gt;  &lt;br /&gt;      &amp;lt;AM-Pooling jbo.doconnectionpooling="true"  /&amp;gt;  &lt;br /&gt;      &amp;lt;Database jbo.locking.mode="optimistic"/&amp;gt;  &lt;br /&gt;      &amp;lt;Security AppModuleJndiName="model.AppModule"/&amp;gt;  &lt;br /&gt;      &amp;lt;Custom JDBCDataSource="java:comp/env/jdbc/HRDS" &lt;b&gt;jbo.envinfoprovider="binding.extension.DynamicEnvInfoProvider"&lt;/b&gt;/&amp;gt;  &lt;br /&gt;    &amp;lt;/AppModuleConfig&amp;gt;    &lt;br /&gt;   &amp;lt;/AppModuleConfigBag&amp;gt;  &lt;br /&gt; &amp;lt;/BC4JConfig&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/DynamicDatasourceSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The 'CoreBindingRuntime' project in the example workspace contains custom implementations for EnvInfoProvider and HttpSessionCookieFactory classes. Take a look at this project to see the implementations.&lt;br /&gt;&lt;br /&gt;1. To run this example you may need to configure a JDBC Data Source (pointing to HR schema) in your weblogic server. You can do this using weblogic admin console.&lt;br /&gt;&lt;br /&gt;2. Run the entry.jspx, key in the JNDI name of the JDBC data source(refer step 1) and click on command button&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-h_nH48tTPRc/TbgIpbukDuI/AAAAAAAACjc/xfMlP1bIM4o/s1600/screen1.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="109" width="400" src="http://4.bp.blogspot.com/-h_nH48tTPRc/TbgIpbukDuI/AAAAAAAACjc/xfMlP1bIM4o/s400/screen1.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3. You can see the data source what you keyed at step 2 is used by the next page to execute the view object.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7782088205444588074?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7782088205444588074/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7782088205444588074' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7782088205444588074'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7782088205444588074'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/modifying-application-modules-jdbc.html' title='Modifying the Application Module&apos;s JDBC DataSource at run time'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Q82Ip31-ICI/TbfxXV6JAZI/AAAAAAAACjE/P8lpIdUXQW4/s72-c/AMeditor1.PNG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4645427128915844980</id><published>2011-04-26T20:55:00.000-07:00</published><updated>2012-01-10T00:21:25.899-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Learning Oracle ADF</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Sharing some resources/links&lt;/span&gt;&lt;span style="font-size: small;"&gt; on Oracle ADF which may help you to understand the         technology better...&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; How Do I Start Learning Oracle ADF and JDeveloper 11g&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://blogs.oracle.com/shay/2010/02/how_do_i_start_learning_oracle_adf_and_jdeveloper.html" moz-do-not-send="true"&gt;http://blogs.oracle.com/shay/2010/02/how_do_i_start_learning_oracle_adf_and_jdeveloper.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt; JDeveloper ADF Oracle Technology         Network site&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html" moz-do-not-send="true"&gt;http://www.oracle.com/technetwork/developer-tools/jdev/overview/index.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;Tutorials/Documentation/Useful Links&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/documentation/index.html" moz-do-not-send="true"&gt;Documentation                   Library&lt;/a&gt; &lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/toc.htm" moz-do-not-send="true"&gt;Fusion                   Developer's Guide for Oracle Application Development             Framework&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/toc.htm" moz-do-not-send="true"&gt;Web                   User Interface Developer's Guide for Oracle Application             Development Framework&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/core.1111/e10108/adf.htm#CIHHGADG" moz-do-not-send="true"&gt;Performance               Tuning Guide&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="https://www.packtpub.com/article/fine-tune-view-layer-of-fusion-web-application" moz-do-not-send="true"&gt;Fine               Tune the View layer of your Fusion Web Application&lt;/a&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;             &lt;/span&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/core.1111/e10106/adf.htm#CIHDIGEB" moz-do-not-send="true"&gt;High               Availability Guide&lt;/a&gt;&lt;br /&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/e10140/toc.htm" moz-do-not-send="true"&gt;Mobile                Browser Client Developer's Guide&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/overview/index-100269.html" moz-do-not-send="true"&gt;Step                   by Step tutorials&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://www.oracle.com/technetwork/articles/adf/adf-essentials-098792.html" moz-do-not-send="true"&gt;http://www.oracle.com/technetwork/articles/adf/adf-essentials-098792.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/bestpractice-092568.html" moz-do-not-send="true"&gt;http://www.oracle.com/technetwork/developer-tools/adf/learnmore/bestpractice-092568.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://www.oracle.com/technetwork/developer-tools/jdev/documentation/index.html" moz-do-not-send="true"&gt;http://www.oracle.com/technetwork/developer-tools/jdev/documentation/index.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://jdevadf.oracle.com/adf-richclient-demo/docs/enhanced-tagdoc.html" moz-do-not-send="true"&gt;http://jdevadf.oracle.com/adf-richclient-demo/docs/enhanced-tagdoc.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://jdevadf.oracle.com/adf-richclient-demo/docs/release.html" moz-do-not-send="true"&gt;http://jdevadf.oracle.com/adf-richclient-demo/docs/release.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;Demo Application&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx" moz-do-not-send="true"&gt;http://jdevadf.oracle.com/adf-richclient-demo/faces/index.jspx&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://www.oracle.com/technology/products/jdev/samples/fod/index.html" moz-do-not-send="true"&gt;http://www.oracle.com/technology/products/jdev/samples/fod/index.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html" moz-do-not-send="true"&gt;http://www.oracle.com/technetwork/testcontent/adf-faces-rc-demo-083799.html&lt;/a&gt;             (you can download the example file from here and play with             the source code)&lt;br /&gt;&lt;/span&gt; &lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;&lt;br /&gt;Hands on Topics&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adfbc_new_features/adfbc.html" moz-do-not-send="true"&gt;http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adfbc_new_features/adfbc.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm" moz-do-not-send="true"&gt;http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/adf_richclient/adfrichclient.htm&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/boundedtaskflow/bounded_task_flow.html" moz-do-not-send="true"&gt;http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/boundedtaskflow/bounded_task_flow.html&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm" moz-do-not-send="true"&gt;http://st-curriculum.oracle.com/obe/jdev/obe11jdev/ps1/ria_application/developriaapplication_long.htm&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a href="http://apex.oracle.com/pls/apex/f?p=9830:32:0::NO" moz-do-not-send="true"&gt;http://apex.oracle.com/pls/apex/f?p=9830:32:0::NO&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;Best Practices Presentations&lt;/span&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://adf-samples.googlecode.com/files/bestpractices.zip"&gt;&lt;span style="font-size: small;"&gt;http://adf-samples.googlecode.com/files/bestpractices.zip&lt;/span&gt;&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="text-align: left;"&gt;&lt;span style="font-size: small;"&gt;Forum&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://forums.oracle.com/forums/forum.jspa?forumID=83" moz-do-not-send="true"&gt;http://forums.oracle.com/forums/forum.jspa?forumID=83&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div style="font-family: inherit;"&gt;&lt;span style="font-size: small;"&gt;         Blogs&lt;br /&gt;&lt;/span&gt;     &lt;/div&gt;&lt;ul style="font-family: inherit;"&gt;&lt;li&gt;&lt;span style="font-size: small;"&gt;&lt;a class="moz-txt-link-freetext" href="http://wiki.oracle.com/page/ADF+Blogs" moz-do-not-send="true"&gt;http://wiki.oracle.com/page/ADF+Blogs&lt;/a&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4645427128915844980?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4645427128915844980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4645427128915844980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4645427128915844980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4645427128915844980'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/learning-oracle-adf.html' title='Learning Oracle ADF'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3818341184008345056</id><published>2011-04-21T04:41:00.000-07:00</published><updated>2011-04-21T04:41:33.169-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Accessing destination View Object using View Link Accessor</title><content type='html'>When you need to programmatically access the 'child' view object from a 'master' view object by virtue of a view link accessor, you can use the the below API. &lt;br /&gt;&lt;br /&gt;ViewObject destVO = originVO.findAttributeDef("View Link Accessor Name").getAccessorVO(originVO);&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;&lt;br /&gt;      ViewObjectImpl deptVO = getDepartmentsView();&lt;br /&gt;      ViewObject empVO = deptVO.findAttributeDef("EmployeesView").getAccessorVO(deptVO );&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3818341184008345056?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3818341184008345056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3818341184008345056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3818341184008345056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3818341184008345056'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/accessing-destination-view-object-using.html' title='Accessing destination View Object using View Link Accessor'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3325483819372944230</id><published>2011-04-20T01:46:00.000-07:00</published><updated>2011-04-20T04:30:40.836-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Identifying the source of the request for an LOV</title><content type='html'>The LOV can be enabled for an attribute of a view object, and the same can be used inside a query panel or in a parameter form. &lt;br /&gt;How do you identify where the LOV is displayed currently, from a View Object?&lt;br /&gt;&lt;br /&gt;Well, you can use the following groovy expression 'adf.isCriteriaRow' to achieve the same, which may rerun true if the request is from a model driven af:query component. This is useful if you need to switch between LOV definitions based on where its displayed at run time (e.g: one LOV in search panel and a different one in parameter form for the same attribute). &lt;br /&gt;&lt;br /&gt;Please see the following  topic in Dev Guide to learn more - &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcquerying.htm#ADFFD19844"&gt;How to Specify Multiple LOVs for an LOV-Enabled View Object Attribute&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3325483819372944230?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3325483819372944230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3325483819372944230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3325483819372944230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3325483819372944230'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/identifying-request-for-lov-from-search.html' title='Identifying the source of the request for an LOV'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4697954224107167735</id><published>2011-04-16T22:47:00.000-07:00</published><updated>2011-04-17T00:58:44.376-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Programmatically  refreshing the child nodes of  an &lt;af:tree&gt;</title><content type='html'>There are use cases where you may need to refresh(re-execute the query) the child nodes of a &amp;lt;af:tree&amp;gt; or &amp;lt;af:treeTable&amp;gt; programmatically . In this post I'm discussing a simple implementation for the same.  &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query execution for retrieving child nodes&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;A bit of theory before getting in to the code sample. When you expand top level nodes for the first time, runtime will traverse through  the View Link Accessor for the parent Row and identifies the child RowSet/ViewObject and execute the same. The execution of child View Object result in child nodes. When you expand the parent once again, the parent row may find an existing &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/QueryCollection.html"&gt;QueryCollection&lt;/a&gt;(wrapper object over Rows) with the matching row filter, e.g. say DeptId=10.  This existing QC, which already has the filtered list of rows is re-used at this stage. In case you may need to refresh the child &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/RowSet.html"&gt;RowSet&lt;/a&gt; in all cases, you may need to brutally execute the corresponding RowSet. The below shown code snippet executes child Employees RowSet for a specific DepartmentId.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   public void refreshChildEmployees(Number deptId) {  &lt;br /&gt;     ViewObjectImpl vo = getDepartmentsView1();  &lt;br /&gt;     Row[] deptRow = vo.findByKey(new Key(new Object[] { deptId }), 1);  &lt;br /&gt;     String nodeDefname = deptRow[0].getStructureDef().getDefFullName();  &lt;br /&gt;     RowSet childRows = (RowSet)deptRow[0].getAttribute("EmployeesView");  &lt;br /&gt;     childRows.executeQuery();  &lt;br /&gt;   }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/TreeRefresh.zip"&gt;download the sample workspace from here.&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example displays tree table for Department-Employee hierarchy. A pop up is given for editing Employee data. You can edit the Employee details and click on the Update button to refresh the corresponding child nodes displayed on the parent page. In the edit pop up, there is a check box(labelled as HiddenFlag) to control the visibility of the corresponding row displayed in the tree table. If you select this check box, row is removed from the corresponding RowSet( which constitutes the child nodes of the tree table). &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-84GTFcyBMLg/Tap9tCNaGrI/AAAAAAAAChw/AiRRddUpH3o/s1600/tree.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="331" src="http://3.bp.blogspot.com/-84GTFcyBMLg/Tap9tCNaGrI/AAAAAAAAChw/AiRRddUpH3o/s400/tree.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The EmployeesViewImpl::rowQualifies(...) has been overridden to enable the in memeory filtering for the child nodes . Please see   this &lt;a href="http://jobinesh.blogspot.com/2011/03/overriding-rowqualifies-for-in-memory.html"&gt;post&lt;/a&gt; in case you are not familiar with this concept. the above given efreshChildEmployees(Number deptId) is wired to  the 'update' button which ensure the execution of EmployeesViewImpl::rowQualifies(...) by brutally executing the child RowSet.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4697954224107167735?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4697954224107167735/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4697954224107167735' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4697954224107167735'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4697954224107167735'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/programmatically-refreshing-child-nodes.html' title='Programmatically  refreshing the child nodes of  an &amp;lt;af:tree&amp;gt;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-84GTFcyBMLg/Tap9tCNaGrI/AAAAAAAAChw/AiRRddUpH3o/s72-c/tree.PNG' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3444440287233429024</id><published>2011-04-12T04:08:00.000-07:00</published><updated>2011-04-12T21:11:37.173-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Using JMS with ADF Business Components</title><content type='html'>There are use case scenarios where you may need to perform some service calls asynchronously, whose out put does not affect the success or failure of the entire business process. Some examples could be sending SMS notification on successful airline ticket booking or logging business data on data change etc. A possible solution for above case may be queuing the request/data for later process and configuring a listener on this Queue to process them asynchronously. In Java EE world, the &lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bncdr.html#bncdt"&gt;Java Messaging Service (JMS)&lt;/a&gt; provides basic infrastructure for queuing messages.  Interestingly, you can easily enable ADF Business Components to use JMS if your use case demands so. Sounds interesting? then read on... :)&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Use case&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In this example, I'm populating an 'audit' table whenever user commits the modified Department details. This audit table is updated asynchronously using a &lt;a href="http://download.oracle.com/javaee/5/tutorial/doc/bnbmd.html"&gt;Message Driven Bean&lt;/a&gt;. The high level flow is depicted in the following diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jjiGQ-uWJwo/TaQlPWjfKlI/AAAAAAAACeM/nGQV-soFlcs/s1600/queuearch.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="247" width="400" src="http://3.bp.blogspot.com/-jjiGQ-uWJwo/TaQlPWjfKlI/AAAAAAAACeM/nGQV-soFlcs/s400/queuearch.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/ADFJavaEEApp.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Prerequisite for running the application&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;I. Create the table DEPARTMENTS_AUDIT&lt;/b&gt; to hold audit data for the Departments entity. You can either use the below given DDL or the script available in the above work space - &amp;lt;ADFJavaEEApp&amp;gt;/EJBModel/audit_tablescript.sql&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; CREATE TABLE DEPARTMENTS_AUDIT   &lt;br /&gt; (  &lt;br /&gt;  DEPARTMENT_ID NUMBER(4, 0) NOT NULL   &lt;br /&gt; , DEPARTMENT_NAME VARCHAR2(30 BYTE)   &lt;br /&gt; , MANAGER_ID NUMBER(6, 0)   &lt;br /&gt; , LOCATION_ID NUMBER(4, 0)   &lt;br /&gt; , MODIFIED_TIME TIMESTAMP(6) NOT NULL   &lt;br /&gt; , CONSTRAINT DEPT_AUDIT_CONSTRAINT PRIMARY KEY   &lt;br /&gt;  (  &lt;br /&gt;   DEPARTMENT_ID   &lt;br /&gt;  , MODIFIED_TIME   &lt;br /&gt;  )  &lt;br /&gt;  ENABLE   &lt;br /&gt; )   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;II. Configure the Queue Connection Factory and the Queue&lt;/b&gt; using Weblogic Admin Console. To do this configuration, you may need to define JMS Server and JMS Modules first. Don't worry, its easy!&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wPQlCJIlfWw/TaQjHECBSEI/AAAAAAAACdk/n0msb3hh9TI/s1600/queue1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="197" src="http://4.bp.blogspot.com/-wPQlCJIlfWw/TaQjHECBSEI/AAAAAAAACdk/n0msb3hh9TI/s400/queue1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Please refer the the below two links if you need detailed explanation on this topic&lt;br /&gt;1. &lt;a href="http://www.oracle.com/webfolder/technetwork/tutorials/obe/fmw/wls/10g/r3/appdeploy/configure/jms/conf_jms_wls.htm"&gt;Configuring JMS Queues and Topics&lt;/a&gt;&lt;br /&gt;2. &lt;a href="http://biemond.blogspot.com/2008/10/jms-in-jdeveloper-11g-and-weblogic-103.html"&gt;JMS in JDeveloper 11g and WebLogic 10.3&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;High level steps for configuring Queue Connection Factory and Queue are given below.&lt;br /&gt;&lt;br /&gt;1. Define the JMS Server. While defining, please select 'DefaultServer' as Target in the second page of the wizard.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Q8cMoSgiXAE/TaQjYBoQW6I/AAAAAAAACds/UVIIX8UcBLg/s1600/queue2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://3.bp.blogspot.com/-Q8cMoSgiXAE/TaQjYBoQW6I/AAAAAAAACds/UVIIX8UcBLg/s400/queue2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2. Define the JMS Module. Please select 'DefaultServer' as Target in the second page of the wizard.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-4BtQfbYDaLc/TaQjnKWZAII/AAAAAAAACd0/rolspA2ue6w/s1600/queue3.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="132" width="400" src="http://4.bp.blogspot.com/-4BtQfbYDaLc/TaQjnKWZAII/AAAAAAAACd0/rolspA2ue6w/s400/queue3.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Nest step is to configure Queue Connection Factory and Queue for the JMS Module that we defined just now.&lt;br /&gt;&lt;br /&gt;3. Open JMS Module that you defined in the previous step and  Configure Queue Connection Factory. The JNDI name used in this examples is 'jms/QueueConnectionFactory'. So you may need to provide the same name here as well.&lt;br /&gt;&lt;br /&gt;4. Open JMS Module that you defined in the step 2 and configure Queue. The JNDI name used in this examples is ' jms/testQueue'. So you may need to provide the same name here as well.  While defining Queue, please select a subdeployment (if available) on the second page of the wizard. Please create new one, if nothing is listed in the drop down. If you are creating a subdeployment, then use the JMS server that you defined in Step1 as the target for deployment.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Y5vmSeZjRkE/TaQj58Z9g0I/AAAAAAAACd8/CodW-T9EQzc/s1600/queue4.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="197" width="400" src="http://3.bp.blogspot.com/-Y5vmSeZjRkE/TaQj58Z9g0I/AAAAAAAACd8/CodW-T9EQzc/s400/queue4.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The application has 3 model projects. &lt;br /&gt;&lt;br /&gt;1. EJBModel - This contains Message Driven Bean(MessageDrivenEJBBean) implementation.  The MessageDrivenEJBBean::onMessage(...) uses 'AuditAppModel' for updating DEPARTMENTS_AUDIT table.&lt;br /&gt;&lt;br /&gt;2. AuditModel - This is for populating audit table. This is used from the MessageDrivenEJBBean.&lt;br /&gt;&lt;br /&gt;3. Model - This contains Department EO and VO used by the UI.&lt;br /&gt;This example has overridden DepartmentsImpl::afterCommit() for sending the audit data(Original values of Department entity - values before user update) to the queue that we configured. The class model.queue.QueueHandler does the queuing of audit data. The MessageDrivenEJBBean listens on the same Queue, so whenever data is put on this queue, MessageDrivenEJBBean gets notification and it's onMessage methods invoked. The auditing logic resides in this method.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-V-nELUi64yA/TaQk2sYLiYI/AAAAAAAACeE/Tox2q_fWJ9M/s1600/quueProject.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="230" src="http://4.bp.blogspot.com/-V-nELUi64yA/TaQk2sYLiYI/AAAAAAAACeE/Tox2q_fWJ9M/s400/quueProject.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;How To run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run test.jspx&lt;br /&gt;2. Modify Departments attribute values and click on Commit.&lt;br /&gt;3. Query the values from DEPARTMENTS_AUDIT using SQL Worksheet. You may notice new entries holding the previous values of the modified Departments record in this table.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-DBl8RVuYvJk/TaQuW24MleI/AAAAAAAACeU/25W6sVtdrVk/s1600/test.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="116" width="400" src="http://2.bp.blogspot.com/-DBl8RVuYvJk/TaQuW24MleI/AAAAAAAACeU/25W6sVtdrVk/s400/test.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3444440287233429024?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3444440287233429024/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3444440287233429024' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3444440287233429024'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3444440287233429024'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/using-jms-with-adf-business-components.html' title='Using JMS with ADF Business Components'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-jjiGQ-uWJwo/TaQlPWjfKlI/AAAAAAAACeM/nGQV-soFlcs/s72-c/queuearch.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7384108377456883176</id><published>2011-04-11T04:52:00.000-07:00</published><updated>2011-04-11T04:52:55.280-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Stress Testing ADF Applications</title><content type='html'>In case you have not seen this white paper before - &lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/adfloadstresstesting-354067.pdf"&gt;Techniques for Testing Performance/Scalability and Stress-Testing ADF Applications&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7384108377456883176?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7384108377456883176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7384108377456883176' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7384108377456883176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7384108377456883176'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/stress-testing-adf-applications.html' title='Stress Testing ADF Applications'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6713537728379725453</id><published>2011-04-10T01:00:00.000-07:00</published><updated>2011-04-10T01:00:49.263-07:00</updated><title type='text'>JavaOne and Oracle Develop India 2011</title><content type='html'>Please check this out - &lt;a href="http://www.141sercon.com/javaoneoracledevelop2011/index.php"&gt;JavaOne and Oracle Develop India 2011&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6713537728379725453?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6713537728379725453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6713537728379725453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6713537728379725453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6713537728379725453'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/javaone-and-oracle-develop-india-2011.html' title='JavaOne and Oracle Develop India 2011'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1193185544150680111</id><published>2011-04-08T21:14:00.000-07:00</published><updated>2011-04-08T21:14:11.701-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Initializing your Fusion Web Application Parameters at startup</title><content type='html'>If you need to initialize specific business data during application start up,this post is for you.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can d&lt;a href="http://adf-samples.googlecode.com/files/ApplicationInitializationSample.zip"&gt;ownload the sample workspace from here.&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example make use of a custom &lt;a href="http://download.oracle.com/javaee/5/api/javax/servlet/ServletContextListener.html"&gt;javax.servlet.ServletContextListener&lt;/a&gt; for performing the application initialization during deployment. Please see 'view.ContextInitializer' class in the attached sample workspace, which act as the ServletContextListener in this example.  btw, check out this post  &lt;a href="http://www.java-tips.org/java-ee-tips/java-servlet/how-to-work-with-servletcontextlistener.html"&gt;How to work with ServletContextListener&lt;/a&gt; if you not familiar with this approach.&lt;br /&gt;&lt;br /&gt;This example invokes ApplicationModule and populates the &lt;a href="http://download.oracle.com/javaee/5/api/javax/servlet/ServletContext.html"&gt;ServletContext&lt;/a&gt; attributes from the custom ServletContextListener's ContextInitializer::contextInitialized(...) method. Please note that &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10686/oracle/adf/share/ADFContext.html#getApplicationScope__"&gt;ADFContext.getCurrent().getApplicationScope()&lt;/a&gt; in a web app refers the ServletContext. It means that whatever you set to ServletContext, can be retrieved later by calling ADFContext::getApplicationScope() from the Model layer. You can use EL #{applicationScope.someVariable} if you need to refer ServletContext attributes from the UI. &lt;br /&gt;&lt;br /&gt;The above example initializes a default DepartmentId during application start up and the same is used in the the Employees View Object query using groovy expression to get the employees (default DepartmentId is configured as context-param in the web.xml)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-uoMifcS1DrE/TZ_Zw1GAxTI/AAAAAAAACRI/Y60J1co0vO0/s1600/ServeltCntxt.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="153" width="400" src="http://1.bp.blogspot.com/-uoMifcS1DrE/TZ_Zw1GAxTI/AAAAAAAACRI/Y60J1co0vO0/s400/ServeltCntxt.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1193185544150680111?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1193185544150680111/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1193185544150680111' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1193185544150680111'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1193185544150680111'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/initializing-your-fusion-web.html' title='Initializing your Fusion Web Application Parameters at startup'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-uoMifcS1DrE/TZ_Zw1GAxTI/AAAAAAAACRI/Y60J1co0vO0/s72-c/ServeltCntxt.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3705295439039872984</id><published>2011-04-08T10:21:00.000-07:00</published><updated>2011-04-08T17:30:42.455-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Displaying ClobDomain on a page</title><content type='html'>There is a default JSF converter(oracle.genericDomain) available for most of the oracle.jbo.domain types( not a new stuff, this has been available since 11.1.1.1.0). The converter-class for 'oracle.genericDomain' is oracle.adfinternal.view.faces.convert.GenericDomainConverter. This precofigured converter comes along with &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/knownissues-096030.html"&gt;ADF&lt;/a&gt; binaries, so you just need to use it wherever required :)&lt;br /&gt;&lt;br /&gt;Example :&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:inputText value="#{bindings.ClobContent.inputValue}"  &lt;br /&gt;       label="#{bindings.ClobContent.hints.label}"  &lt;br /&gt;     &lt;b&gt;  converter="oracle.genericDomain"  &lt;/b&gt;&lt;br /&gt;       required="#{bindings.ClobContent.hints.mandatory}"  &lt;br /&gt;       columns="#{bindings.ClobContent.hints.displayWidth}"  &lt;br /&gt;       maximumLength="#{bindings.ClobContent.hints.precision}"  &lt;br /&gt;       shortDesc="#{bindings.ClobContent.hints.tooltip}"  &lt;br /&gt;       id="it2" rows="5"&amp;gt;  &lt;br /&gt;   &amp;lt;f:validator binding="#{bindings.ClobContent.validator}"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:inputText&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3705295439039872984?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3705295439039872984/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3705295439039872984' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3705295439039872984'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3705295439039872984'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/converter-for-clobdomain.html' title='Displaying ClobDomain on a page'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3366510004580550832</id><published>2011-04-06T04:40:00.000-07:00</published><updated>2011-04-06T04:40:56.928-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Throwing ValidationException from the beforeCommit() logic !</title><content type='html'>If you have some validation logic added to beforeCommit() of the ApplicationModuleImpl or EntityObjectImpl and you face strange rollback behavior(Entity Objects are losing the modified data) while committing data second time after correcting the validation error, then this post is for you :)&lt;br /&gt;&lt;br /&gt;From Developer's Guide....&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcrules.htm#ADFFD21603"&gt;8.5.2 How to Validate Conditions Related to All Entities of a Given Type&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;If your beforeCommit() logic can throw a ValidationException, you must set the jbo.txn.handleafterpostexc property to true in your configuration to have the framework automatically handle rolling back the in-memory state of the other entity objects that may have already successfully posted to the database (but not yet been committed) during the current commit cycle. &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Java Option : &lt;b&gt;-Djbo.txn.handleafterpostexc=true&lt;/b&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3366510004580550832?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3366510004580550832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3366510004580550832' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3366510004580550832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3366510004580550832'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/throwing-validationexception-from.html' title='Throwing ValidationException from the beforeCommit() logic !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7866071895522630644</id><published>2011-04-05T02:37:00.000-07:00</published><updated>2011-04-05T02:37:57.532-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Programmatically resetting the &lt;af:query&gt; and search result table</title><content type='html'>If you want to programmatically reset QueryModel of &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_query.html"&gt;&amp;lt;af:query&amp;gt;&lt;/a&gt; component, you can use the following code snippet in your managed bean.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;     RichQuery queryComp = getRichQuery();  &lt;br /&gt;     QueryModel queryModel = queryComp.getModel();  &lt;br /&gt;     QueryDescriptor queryDescriptor = queryComp.getValue();  &lt;br /&gt;     queryModel.reset(queryDescriptor);  &lt;br /&gt;     queryComp.refresh(FacesContext.getCurrentInstance());  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Along with the above requirement, If you need to reset the contents of result table as well, then call &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#executeEmptyRowSet%28%29"&gt;executeEmptyRowSet()&lt;/a&gt; on the ViewObject which is wired to the result table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;I'm attaching simple application illustrating the above discussed points. You &lt;a href="http://adf-samples.googlecode.com/files/QueryResetSample.zip"&gt;can download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example displays a popup with a search panel and result table. The custom popupFetchListener method added for the &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_popup.html"&gt;af:popup&lt;/a&gt; component resets the search panel and result table contents before displaying the popup.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Jhqot_l9x20/TZriWYHI4WI/AAAAAAAACQw/ryNrCt7oP8o/s1600/resetquery.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="345" src="http://2.bp.blogspot.com/-Jhqot_l9x20/TZriWYHI4WI/AAAAAAAACQw/ryNrCt7oP8o/s400/resetquery.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7866071895522630644?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7866071895522630644/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7866071895522630644' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7866071895522630644'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7866071895522630644'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/04/programmatically-resetting-and-search.html' title='Programmatically resetting the &amp;lt;af:query&amp;gt; and search result table'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Jhqot_l9x20/TZriWYHI4WI/AAAAAAAACQw/ryNrCt7oP8o/s72-c/resetquery.PNG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6219368189784791940</id><published>2011-03-29T09:33:00.000-07:00</published><updated>2011-03-29T21:29:32.299-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Displaying an edit dialog on double click of a table row</title><content type='html'>Let me share an interesting use case this time. There is read only table with an 'edit' link enabled for each row. The end user can open up the edit dialog either by clicking on this edit link or by double clicking on the table's row as shown in the following screen shot.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-SAjCf20Ty7I/TZIEZ2TaZ9I/AAAAAAAACQk/0_H0NJ47aOg/s1600/edittable.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="289" width="400" src="http://2.bp.blogspot.com/-SAjCf20Ty7I/TZIEZ2TaZ9I/AAAAAAAACQk/0_H0NJ47aOg/s400/edittable.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/DoubleClickToEditTable.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Implementation of edit dialog and displaying the same on click of &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_commandLink.html"&gt;&amp;lt;af:commandLink&amp;gt;&lt;/a&gt; is straight forward and doesn't need any explanation. Please see the tag doc for &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_popup.html"&gt;&amp;lt;af:popup&amp;gt;&lt;/a&gt; if you are looking for a detailed explanation on this. The trickiest part is showing the dialog with the selected row's data when user double clicks on a row. This is done by using  &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_clientListener.html"&gt;&amp;lt;af:clientListener&amp;gt;&lt;/a&gt; to invoke javascript method. This  client side method  queues &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/js_docs_out/oracle/adf/view/js/event/AdfActionEvent.html"&gt;AdfActionEvent&lt;/a&gt; on the commandLink. Thanks to Kamran Kashanian for sharing this tip. Please take a look at the following code snippet to get a feel of implementation.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;  &amp;lt;af:resource type="javascript"&amp;gt;  &lt;br /&gt;     function showEditorPopup(e) {  &lt;br /&gt;        var table = e.getSource();  &lt;br /&gt;        var keys = table.getSelectedRowKeys();  &lt;br /&gt;        var selectedKey;  &lt;br /&gt;        /** * Find the selected row key * */  &lt;br /&gt;        for (var k in keys) {  &lt;br /&gt;          selectedKey = k;  &lt;br /&gt;          break;  &lt;br /&gt;        }  &lt;br /&gt;        /**   &lt;br /&gt;         * Find the commandLink  &lt;br /&gt;         * and queue the action event on it   &lt;br /&gt;         * */  &lt;br /&gt;        var cl = table.findComponent("cl1", selectedKey);  &lt;br /&gt;        var event = new AdfActionEvent(cl);  &lt;br /&gt;        event.queue(cl.getPartialSubmit());  &lt;br /&gt;     }       &lt;br /&gt;  &amp;lt;/af:resource&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6219368189784791940?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6219368189784791940/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6219368189784791940' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6219368189784791940'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6219368189784791940'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/displaying-edit-dialog-on-double-click.html' title='Displaying an edit dialog on double click of a table row'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-SAjCf20Ty7I/TZIEZ2TaZ9I/AAAAAAAACQk/0_H0NJ47aOg/s72-c/edittable.PNG' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8645301080094593720</id><published>2011-03-25T05:55:00.000-07:00</published><updated>2011-03-26T00:37:53.706-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>Customizing Business Components Error Messages</title><content type='html'>Customization of business components error messages are well documented in Fusion Developer's Guide &lt;a href="http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/bcadvgen.htm#BABEFGCI"&gt;37.8 Customizing Business Components Error Messages&lt;/a&gt;. I would like to add a couple of points more here :)&lt;br /&gt;&lt;br /&gt;If you want to customize the display of DB level errors such as unique constraint violation, foreign key constraint violation etc by providing your own meaningful messages, then along with the steps mentioned in the Developer's Guide you may need to touch one more guy who is responsible for displaying the classic error messages. I'm talking about the ErrorHandler class (DCErrorHandlerImpl) provided by the binding layer. &lt;br /&gt;&lt;br /&gt;To get a clear picture, let us take a step back and see the role of ErrorHandler class at run time. When your business method throws error,  binding layer intercepts that and puts the 'configured'  ErrorHandler(default is &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/adf/model/binding/DCErrorHandlerImpl.html"&gt;DCErrorHandlerImpl&lt;/a&gt;) class in to action.  The ErrorHandlerClass is responsible for formatting the exception in a human readable format. During this exercise, DCErrorHandlerImpl (default error handler) class will skip the top level JboException as this is a wrapper over other business exception and doesn't have any business significance. This is OK in most of the scenarios. Unfortunately this default behavior may skip/swallow the custom message you set for replacing SQLExceptions. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Hmm..What next?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The solution is to override the default behavior using a Custom Error Handler. You can follow the chapter &lt;a href="http://download.oracle.com/docs/cd/E14571_01/web.1111/b31974/web_adv.htm#CIHHBEEJ"&gt;28.10 Customizing Error Handling&lt;/a&gt; to learn more on this topic. ( Please note that there is no method called DCErrorHandlerImpl::processMessage(), so you can happily skip that part given in Developer's Guide ). Now the real story starts...While displaying each item in a nested exception, the error handling logic would invoke &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/adf/model/binding/DCErrorHandlerImpl.html#skipException%28java.lang.Exception%29"&gt;DCErrorHandlerImpl::skipException(Exception ex)&lt;/a&gt; to decide whether to display the corresponding Exception in the final list or not. Here you can check for specifics exception types and take a call based on the business scenario. For example the below given code snippet will skip the SQLIntegrityConstraintViolationException from displaying in the final list.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;   @Override  &lt;br /&gt;   protected boolean skipException(Exception ex) {  &lt;br /&gt;     if (ex instanceof DMLConstraintException) {  &lt;br /&gt;       return false;  &lt;br /&gt;     } else if (ex instanceof SQLIntegrityConstraintViolationException) {  &lt;br /&gt;       return true;  &lt;br /&gt;     }  &lt;br /&gt;     return super.skipException(ex);  &lt;br /&gt;   }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/BusinessComponentsErrorMessages.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This sample displays employee entity and displays custom error message for violating unique key  constraint defined on the email column. The implementation uses the custom message bundle (model.msg.CustomMessageBundle) for the Model project to override the error message displayed for the data base constraint EMP_EMAIL_UK (default HR schema has unique key  constraint 'EMP_EMAIL_UK' defined on Email column). To display this custom messages from the web page, a custom error handler has been introduces as discussed above - view.CustomErrorHandler&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-eAbrbYKQLHU/TYyJ-oENTxI/AAAAAAAACQM/D_jDscdQjow/s1600/untitled.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="174" width="400" src="http://2.bp.blogspot.com/-eAbrbYKQLHU/TYyJ-oENTxI/AAAAAAAACQM/D_jDscdQjow/s400/untitled.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run test.jspx&lt;br /&gt;2. Copy the email of first employee, navigate to next record&lt;br /&gt;3. Update the email of second record with the copied value&lt;br /&gt;4. Click on Commit. You may notice a more user friendly error message instead of classic ORA-00001: unique constraint error.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8645301080094593720?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8645301080094593720/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8645301080094593720' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8645301080094593720'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8645301080094593720'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/customizing-business-components-error.html' title='Customizing Business Components Error Messages'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-eAbrbYKQLHU/TYyJ-oENTxI/AAAAAAAACQM/D_jDscdQjow/s72-c/untitled.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5833580319364221553</id><published>2011-03-24T02:31:00.000-07:00</published><updated>2011-03-25T00:59:11.824-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>&lt;af:setPropertyListener&gt; fails when used with &lt;af:showPopupBehavior&gt; for a button's action !</title><content type='html'>I've discussed a possible reason for &amp;lt;af:setPropertyListener&amp;gt; not to work on &amp;lt;af:popup&amp;gt; when used along with childCreation="deferred" in one of my &lt;a href="http://jobinesh.blogspot.com/2011/02/not-working-on-with-childcreationdeferr.html"&gt;previous post&lt;/a&gt;. In today's post, I'm again taking you back to yet another unsupported usage of &amp;lt;af:popup&amp;gt; :-). In this case, the popup triggering part looks like as shown in the following page snippet. Apparently, here the expectation is to initialize 'someVariable' before showing the popup.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:commandButton text="Show Popup" id="cb6"&amp;gt;  &lt;br /&gt; &amp;lt;af:setPropertyListener from="#{'something'}" to="#{pageFlowScope.someVariable}" type="action"/&amp;gt;  &lt;br /&gt; &amp;lt;af:showPopupBehavior popupId="p1"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:commandButton&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;However the above fails to initialize the property before showing the popup. &lt;b&gt;Why?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The reason is well documented under 'Cancels Client Events' of the &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showPopupBehavior.html"&gt;&amp;lt;af:showPopupBehavior&amp;gt;&lt;/a&gt; tag doc.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The showPopupBehavior tag cancels the client event defined by the triggerType. Canceling the client event will prevent delivery to the server. This is significant for action events raised by command family components because the server-side action listeners will be ignored. All actionListener method bindings and associated action listeners will not be invoked when the triggerType of "action" is used.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In a nutshell the action event gets cancelled by the showPopupBehavior tag, so your property setter doesn't gets invoked. However there are a couple of workarounds...&lt;br /&gt;&lt;br /&gt;1. Try using popupFetchListener for initializing the popup content(instead of &amp;lt;af:setPropertyListener&amp;gt; tag).&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:popup id="p2" contentDelivery="lazyUncached"   &lt;br /&gt;     childCreation="deferred"   &lt;br /&gt;     popupFetchListener="#{TestBean.popupFetchAction}" ...  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2. Try opening the popup programmatically (instead of using showPopupBehavior tag). Examples can be found under the tag doc for &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_popup.html"&gt;af:popup&lt;/a&gt;. You can safely use &amp;lt;af:setPropertyListener&amp;gt; to initialize properties in this approach.&lt;br /&gt;&lt;br /&gt;3. Trigger the showPopupBehavior for 'click' instead of 'action'.&lt;br /&gt;&amp;lt;af:showPopupBehavior popupId="p1" triggerType="click" /&amp;gt;&lt;br /&gt;Underlying theory is that 'click' and an 'action' do not cancel each other.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5833580319364221553?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5833580319364221553/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5833580319364221553' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5833580319364221553'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5833580319364221553'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/fails-when-used-with-for-buttons-action.html' title='&amp;lt;af:setPropertyListener&amp;gt; fails when used with &amp;lt;af:showPopupBehavior&amp;gt; for a button&apos;s action !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6728505102111495360</id><published>2011-03-20T21:01:00.000-07:00</published><updated>2011-03-20T21:01:13.652-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>How to stretch a column in a dynamically generated &lt;af:table&gt;</title><content type='html'>I happened to notice an interesting thread in an internal discussion forum on last week. Question was, how to stretch a column in a dynamically generated &amp;lt;af:table&amp;gt;? &lt;a href="http://andrewfacelets.blogspot.com/"&gt;Andrew Robinson&lt;/a&gt; provided an elegant solution for this query. I'm copying the same idea here as well for your reference.&lt;br /&gt;&lt;br /&gt;If you want to stretch a column in a dynamically generated table, then one possibility is to use an EL to fix the component ID to an 'Identifier' that changes per forEach iteration. Please see the below given tag snippet to get a more clear picture on the implementation part.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:table rows="#{bindings.DynamicVO.rangeSize}"  &lt;br /&gt;      fetchSize="#{bindings.DynamicVO.rangeSize}"  &lt;br /&gt;      emptyText="#{bindings.DynamicVO.viewable ? 'No data to display.' : 'Access Denied.'}"  &lt;br /&gt;      var="row" rowBandingInterval="0"  &lt;br /&gt;     &lt;b&gt; columnStretching="column:clmn1"  &lt;/b&gt;&lt;br /&gt;      value="#{bindings.DynamicVO.collectionModel}"  &lt;br /&gt;      selectedRowKeys="#{bindings.DynamicVO.collectionModel.selectedRow}"  &lt;br /&gt;      selectionListener="#{bindings.DynamicVO.collectionModel.makeCurrent}"  &lt;br /&gt;      rowSelection="single" id="t1"  &lt;br /&gt;      styleClass="AFStretchWidth"&amp;gt;  &lt;br /&gt;  &amp;lt;af:forEach items="#{bindings.DynamicVOIterator.attributeDefs}"  &lt;br /&gt;        var="def" &lt;b&gt;varStatus="vs"&lt;/b&gt;&amp;gt;  &lt;br /&gt;   &amp;lt;af:column headerText="#{def.name}" sortable="true"  &lt;br /&gt;         sortProperty="#{def.name}"  &lt;br /&gt;        &lt;b&gt; id="clmn${vs.index}"&amp;gt; &lt;/b&gt;&lt;br /&gt;    &amp;lt;af:inputText value="#{row.bindings[def.name].inputValue}"  &lt;br /&gt;            maximumLength="#{row.bindings[def.name].hints[def.name].precision}"  &lt;br /&gt;            id="fld1"/&amp;gt;  &lt;br /&gt;   &amp;lt;/af:column&amp;gt;  &lt;br /&gt;  &amp;lt;/af:forEach&amp;gt;  &lt;br /&gt; &amp;lt;/af:table&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6728505102111495360?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6728505102111495360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6728505102111495360' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6728505102111495360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6728505102111495360'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/how-to-stretch-column-in-dynamically.html' title='How to stretch a column in a dynamically generated &amp;lt;af:table&amp;gt;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5198639385456774599</id><published>2011-03-19T23:29:00.000-07:00</published><updated>2011-03-19T23:31:22.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Programmatically disclosing nodes in a &lt;af:tree&gt;</title><content type='html'>Programmatically  disclosing nodes in a &amp;lt;af:tree&amp;gt; is a very common use case in Rich Inernet Applications. I'm sharing an example (built using ADf Faces) illustrating three different use cases on this topic.&lt;br /&gt;&lt;br /&gt;1. Expand all nodes of a &amp;lt;af:tree&amp;gt; component&lt;br /&gt;2. Collapse all nodes of &amp;lt;af:tree&amp;gt; component&lt;br /&gt;3. Expand specific nodes of &amp;lt;af:tree&amp;gt; component&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-9AKz8zYek4I/TYWRwucUglI/AAAAAAAACQA/7acJb5tgyCw/s1600/tree.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="362" width="315" src="http://2.bp.blogspot.com/-9AKz8zYek4I/TYWRwucUglI/AAAAAAAACQA/7acJb5tgyCw/s400/tree.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href=" http://adf-samples.googlecode.com/files/TreeManipulationSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Expand all nodes of a &amp;lt;af:tree&amp;gt;&lt;br /&gt;&lt;br /&gt;This disclosed behavior of a tree component is controlled by the DisclosedRowKeys of tree component. The below shown method make use of constructor &lt;a href="http://myfaces.apache.org/trinidad/trinidad-api/apidocs/org/apache/myfaces/trinidad/model/RowKeySetTreeImpl.html#RowKeySetTreeImpl%28boolean%29"&gt;RowKeySetTreeImpl(boolean addAll)&lt;/a&gt; to create instance of RowKeySet having all rowKeys added. Please note that, if the parameter 'addAll' is true, every rowKey is initially added to this RowKeySet. This effectively would result in disclosure of all nodes when the tree is displayed.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; public void expandAllTreeNodes(ActionEvent act) {  &lt;br /&gt;   &lt;br /&gt;  UIXTree tree = getTree();  &lt;br /&gt;  RowKeySet _disclosedRowKeys = new RowKeySetTreeImpl(true);  &lt;br /&gt;  _disclosedRowKeys.setCollectionModel(ModelUtils.toTreeModel(tree.getValue()));  &lt;br /&gt;  tree.setDisclosedRowKeys(_disclosedRowKeys);  &lt;br /&gt;   &lt;br /&gt; }    &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;2. Collapse all nodes of &amp;lt;af:tree&amp;gt; component&lt;br /&gt;&lt;br /&gt;This is achieved by clearing off the DisclosedRowKeys of the tree component.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   &lt;br /&gt; public void collapseAllTreeNodes(ActionEvent act) {  &lt;br /&gt;   &lt;br /&gt;  UIXTree tree = getTree();  &lt;br /&gt;  RowKeySet _disclosedRowKeys = tree.getDisclosedRowKeys();  &lt;br /&gt;  if (_disclosedRowKeys != null &amp;amp;&amp;amp; _disclosedRowKeys.size() &amp;gt; 0) {  &lt;br /&gt;   _disclosedRowKeys.clear();  &lt;br /&gt;  }  &lt;br /&gt;  tree.setDisclosedRowKeys(_disclosedRowKeys);  &lt;br /&gt;    &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;3. Expand specific nodes of &amp;lt;af:tree&amp;gt; component&lt;br /&gt;&lt;br /&gt;The code searches for a specific node value by setting the Rowkey to an indexed value and iterate over nodes recursively.&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_table.htm"&gt;Fusion Web UI Developers Guide&lt;/a&gt; Says:&lt;br /&gt;&lt;i&gt;The tree model is a collection of rows. It has an isContainer() method that returns true if the current row contains child rows. To access the children of the current row, you call the enterContainer() method. Calling this method results in the TreeModel instance changing to become a collection of the child rows. To revert back up to the parent collection, you call the exitContainer() method.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5198639385456774599?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5198639385456774599/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5198639385456774599' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5198639385456774599'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5198639385456774599'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/programatically-dislosing-nodes-in.html' title='Programmatically disclosing nodes in a &amp;lt;af:tree&amp;gt;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-9AKz8zYek4I/TYWRwucUglI/AAAAAAAACQA/7acJb5tgyCw/s72-c/tree.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4388365129725737823</id><published>2011-03-14T06:33:00.000-07:00</published><updated>2011-03-14T21:02:08.635-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Overriding  ViewObjectImpl::rowQualifies(...) for in memory filtering of child nodes of a tree component</title><content type='html'>You can override &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#rowQualifies%28oracle.jbo.server.ViewRowImpl%29"&gt;ViewObjectImpl::rowQualifies(ViewRowImpl vr)&lt;/a&gt; for filtering the uncommitted data rows based on some specific business use cases/conditions. This feature is pretty useful if you need to filter the child rows having uncommitted changes while executing the ViewLink(s). I'm sharing a simple example illustrating the usage of &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#rowQualifies%28oracle.jbo.server.ViewRowImpl%29"&gt;ViewObjectImpl::rowQualifies(ViewRowImpl vr)&lt;/a&gt; for filtering the rows in memory. Requirement is to not to show the Employee nodes of a 'Department-Employee Tree' component having status='DELETE'(even before committing the transaction). This example overrides rowQualifies(...) to restrict the employee entities with 'DELETED' status from adding to the query result.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &lt;br /&gt;/**  &lt;br /&gt; * Evaluates whether the view row qualifies the view object's row match  &lt;br /&gt; * and in-memory filter view criteria.  &lt;br /&gt; * &amp;lt;p&amp;gt;  &lt;br /&gt; *  &lt;br /&gt; * This method is invoked on new view rows as well as view rows coming  &lt;br /&gt; * from query to see if the view row should be added to the query collection.  &lt;br /&gt; *  &lt;br /&gt; * @param  vr  the view row to examine.  &lt;br /&gt; * @return a &amp;lt;code&amp;gt;boolean&amp;lt;/code&amp;gt; value indicating whether the row qualifies  &lt;br /&gt; *     or not.  &lt;br /&gt; */  &lt;br /&gt; @Override  &lt;br /&gt; protected boolean rowQualifies(ViewRowImpl vr) {  &lt;br /&gt;  Object attrValue =vr.getAttribute("StatusFlag");  &lt;br /&gt;  if (attrValue != null) {  &lt;br /&gt;   if ("DELETE".equals(attrValue))  &lt;br /&gt;      return false;  &lt;br /&gt;   else  &lt;br /&gt;      return true;  &lt;br /&gt;  }  &lt;br /&gt;  return super.rowQualifies(vr);  &lt;br /&gt; }  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/RowQualifiesSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run test.jspx. This page may let you to update the status of the employee entities by selecting a value from the 'status' list. Please note that 'Department-Employee' tree doesn't displays employee entities with 'DELETE' status. This is controlled by EmployeesViewImpl::rowQualifies(ViewRowImpl vr) method.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-7oyq1QL_hAs/TX4X6l8pOwI/AAAAAAAACP4/poq4_-Cx46o/s1600/rowqualifier.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="400" width="299" src="http://4.bp.blogspot.com/-7oyq1QL_hAs/TX4X6l8pOwI/AAAAAAAACP4/poq4_-Cx46o/s400/rowqualifier.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4388365129725737823?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4388365129725737823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4388365129725737823' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4388365129725737823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4388365129725737823'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/overriding-rowqualifies-for-in-memory.html' title='Overriding  ViewObjectImpl::rowQualifies(...) for in memory filtering of child nodes of a tree component'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-7oyq1QL_hAs/TX4X6l8pOwI/AAAAAAAACP4/poq4_-Cx46o/s72-c/rowqualifier.PNG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8577260166783515171</id><published>2011-03-12T23:37:00.000-08:00</published><updated>2011-04-12T23:07:25.964-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Using &lt;af:quickQuery&gt; component for filtering child nodes of a tree</title><content type='html'>In todays post I'm sharing some tips to intercept the query execution of &amp;lt;af:quickQuery&amp;gt; to generate custom queries for filtering child nodes of a tree component. I do have a screen as shown in the following screen shot. The left pane of panelSplitter displays tree table with Department-Employee hierarchy. The  &amp;lt;af:quickQuery&amp;gt; (displayed on top) is built by dragging and dropping the 'All Queriable Attributes' of the Employee View Object instance. The same Employee View Object instance is displayed on right side of the panelSplitter. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-lNKwPRkmBlY/TXu1h3v8ZuI/AAAAAAAACPw/bGppU4T_I_Q/s1600/tablefilter.PNG" imageanchor="1" style="margin-left:1em; margin-right:1em"&gt;&lt;img border="0" height="119" width="400" src="http://1.bp.blogspot.com/-lNKwPRkmBlY/TXu1h3v8ZuI/AAAAAAAACPw/bGppU4T_I_Q/s400/tablefilter.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Download&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/QuickQueryTreetableChildSearch.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This sample uses a custom queryListener method for the &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_quickQuery.html"&gt;&amp;lt;af:quickQuery&amp;gt;&lt;/a&gt; to intercept the search action. This custom method executes the associated default search binding. Apart from this part, the method is also responsible for adding the hooks for filtering the child nodes -Employees records displayed below the Department (parent) node in the tree table. To filter the child nodes based on the search criteria from &amp;lt;af:quickQuery&amp;gt;, queryListener  method gets the ViewCriteria from the QueryEvent and pass the same to Department View Object. Please take a look at the source of TestBean::processQuery(...) to get a more detailed picture of the implementation. The filtering of child nodes/rows of the tree table is achieved at the ViewObject level by overriding the &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#createViewLinkAccessorRS(oracle.jbo.server.AssociationDefImpl, oracle.jbo.server.ViewObjectImpl, oracle.jbo.Row, java.lang.Object[])"&gt;ViewObjectImpl::createViewLinkAccessorRS(AssociationDefImpl assocDef,                                                 ViewObjectImpl accessorVO, Row masterRow, java.lang.Object[] values)&lt;/a&gt;. This method will get executed when you click on the parent node(built from this View Object) to see the child nodes.&lt;br /&gt;&lt;br /&gt;This sample has one more interesting feature. If you select a Employee row displayed below Department node in the tree table, you may notice that employee details displayed on right pane changes to diaplay the selected child row detail. This is achieved by using TargetIterator property of the nodeDefinition binding. This part is well explained in Fusion Developers Guide - &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/web_masterdetail.htm#ADFFD19626"&gt;24.5.4 Using the TargetIterator Property&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;PS: Another sample using ViewCriteria (instead of static query with bind variable as in the above sample) to filter child nodes of the tree is uploaded &lt;a href="http://adf-samples.googlecode.com/files/QuickQueryTreetableChildSearchUsingVC.zip"&gt;here&lt;/a&gt;. Rest of the implementation remains same as we discussed before.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8577260166783515171?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8577260166783515171/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8577260166783515171' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8577260166783515171'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8577260166783515171'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/using-component-for-filtering-child.html' title='Using &amp;lt;af:quickQuery&amp;gt; component for filtering child nodes of a tree'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-lNKwPRkmBlY/TXu1h3v8ZuI/AAAAAAAACPw/bGppU4T_I_Q/s72-c/tablefilter.PNG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-794721746429374850</id><published>2011-03-12T00:29:00.000-08:00</published><updated>2011-03-12T00:29:32.416-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Mobile'/><title type='text'>ADF Mobile Client extension is now available for public download !</title><content type='html'>Much awaited &lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/overview/adf-mobile-096323.html"&gt;ADF Mobile&lt;/a&gt; Client extension is now available under the JDeveloper download center(Go to JDeveloper main menu -&amp;gt; Help -&amp;gt; Check for Updates). This extension is built on top of JDeveloper 11.1.1.4.0. Give a try, its really promising stuff !&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-794721746429374850?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/794721746429374850/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=794721746429374850' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/794721746429374850'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/794721746429374850'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/adf-mobile-client-extension-is-now.html' title='ADF Mobile Client extension is now available for public download !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7514872133387269648</id><published>2011-03-10T04:09:00.000-08:00</published><updated>2011-03-21T02:51:02.816-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><title type='text'>What you may need to know about pagination support in EJB and  JavaBean Data Control</title><content type='html'>Once you application's business service is in place, you can use JDeveloper to create data controls that provide the information needed to declaratively bind UI components to those service. This meta information is also used  by the ADF model layer to invoke the business services at run time. The &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/appendix_datacontrols.htm#ADFFD22256"&gt;Data Control&lt;/a&gt; act as a Proxy Cum Adaptor for your business services. ADF has built in support for most of the common technologies like EJB, Web services, POJO, ADF BC etc. This means that, you may get consistent development experience across these technologies, and moreover your application's view layer may remain decoupled  from the business service implementation.  In todays post, I'm discussing pagination support for EJB and JavaBean Data Control.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to create Data Control?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Please refer &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/e16272/using_bind_model.htm#ADFJE162"&gt;Chapter 2 - ADF Model Data Binding&lt;/a&gt;Java EE Developer's Guide to learn more if you don't have much idea on this topic. This concept remains same for both EJB and JavaBean Data Controls.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Pagination Support&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;When you generated Data Control, design time 'wizard' creates Data control definition file (DataControls.dcx) within your project source. It contains meta data for your business service implementation and also settings that determine how the data control behaves at run time. Please take a look at the following sample dcx file(s).&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data Control definition for JavaBean:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;  &lt;br /&gt; &amp;lt;DataControlConfigs xmlns="http://xmlns.oracle.com/adfm/configuration"  &lt;br /&gt;           version="11.1.1.59.23" id="DataControls" Package="model"&amp;gt;  &lt;br /&gt;   &amp;lt;AdapterDataControl id="CustomPaginatedJavaServiceFacade"  &lt;br /&gt;            FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl"  &lt;br /&gt;            ImplDef="oracle.adf.model.adapter.bean.BeanDefinition"  &lt;br /&gt;            SupportsTransactions="false" SupportsSortCollection="true"  &lt;br /&gt;            SupportsResetState="false" SupportsRangesize="false"  &lt;br /&gt;            SupportsFindMode="false" SupportsUpdates="true"  &lt;br /&gt;            Definition="model.CustomPaginatedJavaServiceFacade"  &lt;br /&gt;            BeanClass="model.CustomPaginatedJavaServiceFacade"  &lt;br /&gt;            xmlns="http://xmlns.oracle.com/adfm/datacontrol"&amp;gt;  &lt;br /&gt;   &amp;lt;CreatableTypes&amp;gt;  &lt;br /&gt;    &amp;lt;TypeInfo FullName="model.Employees"/&amp;gt;  &lt;br /&gt;    &amp;lt;TypeInfo FullName="model.Departments"/&amp;gt;  &lt;br /&gt;    &amp;lt;TypeInfo FullName="model.CustomPaginatedJavaServiceFacade"/&amp;gt;  &lt;br /&gt;   &amp;lt;/CreatableTypes&amp;gt;  &lt;br /&gt;   &amp;lt;Source&amp;gt;  &lt;br /&gt;    &amp;lt;bean-definition BeanClass="model.CustomPaginatedJavaServiceFacade"  &lt;br /&gt;            &lt;b&gt; DataControlHandler="oracle.adf.model.adapter.bean.DataFilterHandler"  &lt;/b&gt;&lt;br /&gt;             xmlns="http://xmlns.oracle.com/adfm/adapter/bean"/&amp;gt;  &lt;br /&gt;   &amp;lt;/Source&amp;gt;  &lt;br /&gt;  &amp;lt;/AdapterDataControl&amp;gt;  &lt;br /&gt; &amp;lt;/DataControlConfigs&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Please note that, DataControlHandler entry that you see for the above JavaBean Data Control is keyed-in by me :)  By default the editor may not generate DataControlHandler for a POJO Bean. Runtime will use the default DataControlHandler in that case.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Data Control definition for EJB:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-image: URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif); background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;?xml version="1.0" encoding="UTF-8" ?&amp;gt;  &lt;br /&gt; &amp;lt;DataControlConfigs xmlns="http://xmlns.oracle.com/adfm/configuration"  &lt;br /&gt;           version="11.1.1.59.23" id="DataControls"  &lt;br /&gt;           Package="model.ejb"&amp;gt;  &lt;br /&gt;  &amp;lt;AdapterDataControl id="SessionEJBLocal"  &lt;br /&gt;            FactoryClass="oracle.adf.model.adapter.DataControlFactoryImpl"  &lt;br /&gt;            ImplDef="oracle.adfinternal.model.adapter.ejb.EjbDefinition"  &lt;br /&gt;            SupportsTransactions="false" SupportsSortCollection="true"  &lt;br /&gt;            SupportsResetState="false" SupportsRangesize="false"  &lt;br /&gt;            SupportsFindMode="false" SupportsUpdates="true"  &lt;br /&gt;            Definition="model.ejb.SessionEJBLocal"  &lt;br /&gt;            BeanClass="model.ejb.SessionEJBLocal"  &lt;br /&gt;            xmlns="http://xmlns.oracle.com/adfm/datacontrol"&amp;gt;  &lt;br /&gt;   &amp;lt;CreatableTypes&amp;gt;  &lt;br /&gt;    &amp;lt;TypeInfo FullName="model.ejb.Departments"/&amp;gt;  &lt;br /&gt;    &amp;lt;TypeInfo FullName="model.ejb.Employees"/&amp;gt;  &lt;br /&gt;   &amp;lt;/CreatableTypes&amp;gt;  &lt;br /&gt;   &amp;lt;Source&amp;gt;  &lt;br /&gt;    &amp;lt;ejb-definition ejb-version="3.0" ejb-name="SessionEJB" ejb-type="Session"  &lt;br /&gt;            ejb-business-interface="model.ejb.SessionEJBLocal"  &lt;br /&gt;            ejb-interface-type="local"  &lt;br /&gt;            initial-context-factory="weblogic.jndi.WLInitialContextFactory"  &lt;br /&gt;           &lt;b&gt; DataControlHandler="oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler"  &lt;/b&gt;&lt;br /&gt;            xmlns="http://xmlns.oracle.com/adfm/adapter/ejb"/&amp;gt;  &lt;br /&gt;   &amp;lt;/Source&amp;gt;  &lt;br /&gt;  &amp;lt;/AdapterDataControl&amp;gt;   &lt;br /&gt; &amp;lt;/DataControlConfigs&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;What is the role of DataControlHandler in ADF binding?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Well, in nutshell, the DataControlHandler entry in the dcx file decides the Data Control behavior at runtime( pagination, filtering support etc.). This means that all your service calls routed through this guy.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: #f0f0f0; border: 1px dashed #CCCCCC; color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;bean-definition BeanClass="model.CustomPaginatedJavaServiceFacade"  &lt;br /&gt;         &lt;b&gt; DataControlHandler="oracle.adf.model.adapter.bean.DataFilterHandler"  &lt;/b&gt;&lt;br /&gt;          xmlns="http://xmlns.oracle.com/adfm/adapter/bean"/&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Let us take a look at Two possible DataControlHandler candidates for your Service Facade Bean.&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/adf/model/adapter/bean/DataFilterHandler.html"&gt;oracle.adf.model.adapter.bean.DataFilterHandler&lt;/a&gt;:&lt;/b&gt;&lt;br /&gt;This is a very generic implementation which supports both pagination and in memory filtering, typically used for JavaBean Data Control. To enable pagination, developers may need to define set of methods which follows predefined contracts. To explain this, let us assume that you have an accessor method in your JavaBean to get all Departments as shown below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public List&amp;lt;departments&amp;gt; getDepartments()&lt;/b&gt;{...}&lt;br /&gt;&lt;br /&gt;Now,to enable pagination, you may need to have two more supporting methods with specific naming conventions and signature as given below.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;public List&amp;lt;departments&amp;gt; getDepartments(int start, int increment)&lt;/b&gt; {...) - Range method to fetch  records pagewise&lt;br /&gt;&lt;b&gt;public long getDepartmentsSize()&lt;/b&gt;{...} -  Returns total number of records&lt;br /&gt;&lt;br /&gt;At runtime, data binding layer may call getDepartmentsSize() first to decide the number of records, followed by  the paginated getter - getDepartments(int start, int increment).&lt;br /&gt;Please note that data filtering is(if requested from UI) happening in memory here.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/adf/model/adapter/bean/jpa/JPQLDataFilterHandler.html"&gt;oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler&lt;/a&gt;&lt;/b&gt;:&lt;br /&gt;This is a typical DataFilterHandler implementation for JPA based service facade. This class generates dynamic jpql for enabling pagination and filtering for you JPA based accessor methods defined in the Session Bean. The JPQLDataFilterHandler supports pagination, filtering and query criteria(model driven query) out of the box. When you build Session EJB Bean using the editor for your JPA based model project, the wizard would create a method with below signature in the generated source.&lt;br /&gt;&lt;br /&gt;public Object queryByRange(String jpqlStmt, int firstResult, int maxResults){...}&lt;br /&gt;All the request for paginated data and filtering of data are routed though this method. In other words, JPQLDataFilterHandler intercepts pagination, filter requests from a table and passes the request to queryByRange defined in the Bean with required set of parameters.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Important Note&lt;/b&gt;: By default, when you drag an accessor returned collection from an EJB Data Control and drop on a page, the result is a paginated collection and the session bean's built-in queryByRange() method will be used (instead of the getXXXFindAll() method) to retrieve the collection. If you have some custom code inside getXXXFindAll() and you want to invoke this piece while getting the collection, then there are two options for you:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Option 1:&lt;/b&gt; You can remove the DataControlHandler attribute in the source editor for the DataControls.dcx file. However, when you remove that attribute, the built-in support for named queries and pagination is also disabled. This approach is applicable if you don't need the built in pagination support at all.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Option 2:&lt;/b&gt; Replace the DataControlHandler attribute with oracle.adf.model.adapter.bean.DataFilterHandler using the source editor for the DataControls.dcx file. In this case you may need to define the supporting methods (as we discussed above under 'DataFilterHandler') to enable pagination. Of course, you may need to keep the custom logic(if any) which needs to be invoked during 'getter' invocation under the range fetch method. Query based filtering is disabled in this case, instead runtime may go for in memory filtering&lt;br /&gt;&lt;br /&gt;Example:&lt;br /&gt;public List&amp;lt;departments&amp;gt; getDepartments(){...} - accessor method&lt;br /&gt;public List&amp;lt;departments&amp;gt; getDepartments(int start, int increment){...} - range fetch method&lt;br /&gt;public long getDepartmentsSize(){...} - count fetch method&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;You &lt;a href="http://adf-samples.googlecode.com/files/EJBDataControlSample.zip"&gt;can &lt;b&gt;download&lt;/b&gt;the sample workspace from here.&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This sample application uses JPA based model. To illustrate the above discussed concepts, I'm exposing services through two channels - 1. POJOServiceBean 2. SessionEJBBean&lt;br /&gt;&lt;br /&gt;Bean Data Control for POJOServiceBean  is configured to use oracle.adf.model.adapter.bean.DataFilterHandler as DataControlHandler. You can see supporting methods in the Bean class to enable pagination for the accessor methods.&lt;br /&gt;&lt;br /&gt;EJB Data Control for SessionEJBBean is configured to use oracle.adf.model.adapter.bean.jpa.JPQLDataFilterHandler as DataControlHandler. In this case, pagination/filtering requests are routed through  public Object queryByRange(...) method of the SessionEJBBean. &lt;br /&gt;&lt;br /&gt;You can see two JSF pages in the view project(ejbView/pojoView). As the name sounds, each built from the different data controls.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7514872133387269648?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7514872133387269648/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7514872133387269648' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7514872133387269648'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7514872133387269648'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/what-you-may-need-to-know-about.html' title='What you may need to know about pagination support in EJB and  JavaBean Data Control'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8164589871893689027</id><published>2011-03-09T05:05:00.000-08:00</published><updated>2011-06-10T01:44:58.715-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Retrieving ViewCriteria from a custom queryListener method</title><content type='html'>You can leverage the built in functionalities of &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_quickQuery.html"&gt;&amp;lt;af:quickQuery&amp;gt;&lt;/a&gt; or &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_query.html"&gt;&amp;lt;af:query&amp;gt;&lt;/a&gt; component to build search functionalities for your screen. Sometimes you may need to intercept the query invocation using queryListener of the query component as shown below.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;  &amp;lt;af:quickQuery label="Search" id="search"   &lt;br /&gt;               value="#{bean.queryDescriptor}"   &lt;br /&gt;               &lt;b&gt;queryListener&lt;/b&gt;="#{someBean.processSomeQuery}"&amp;gt;  &lt;br /&gt;        &amp;lt;f:facet name="end"&amp;gt;  &lt;br /&gt;          &amp;lt;af:commandLink text="Advanced"/&amp;gt;  &lt;br /&gt;        &amp;lt;/f:facet&amp;gt;  &lt;br /&gt;  &amp;lt;/af:quickQuery&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In today's post I'm sharing some code snippets which may help you to retrieve model part of the &amp;lt;/af:quickQuery&amp;gt; component.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt;   &lt;br /&gt; public void processSomeQuery(QueryEvent queryEvent) {   &lt;br /&gt;     &lt;br /&gt;  QueryDescriptor qd = queryEvent.getDescriptor();   &lt;br /&gt;  AttributeCriterion criterion = qd.getCurrentCriterion();  &lt;br /&gt; &lt;br /&gt;  /** Gets the currently keyed in search criteria for quickQuery,&lt;br /&gt;   *  You can do manipulate the values here :)&lt;br /&gt;   */&lt;br /&gt;&lt;b&gt;  String attrLabel = criterion.getAttribute().getLabel();   &lt;br /&gt;  Object attrValue = criterion.getValues().get(0); &lt;/b&gt;  &lt;br /&gt;&lt;br /&gt;  DCBindingContainer bc =   &lt;br /&gt;  (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();   &lt;br /&gt;    &lt;br /&gt;  /** The below call get ViewCriteria from the Search binding */  &lt;br /&gt;  ViewCriteria vc = getViewCriteria(bc, qd);   &lt;br /&gt;   &lt;br /&gt;  /** Manipulate ViewCriteria, if you want and &lt;br /&gt;   *  then invoke query,optionally &lt;br /&gt;   */   &lt;br /&gt;  invokeQueryEventMethodExpression("#{bindings.ImplicitViewCriteriaQuery.processQuery}",   &lt;br /&gt;         queryEvent);   &lt;br /&gt;  }   &lt;br /&gt;  /**&lt;br /&gt;   * Gets ViewCriteria used by the QueryModel&lt;br /&gt;   */     &lt;br /&gt;  private ViewCriteria getViewCriteria(DCBindingContainer bc,   &lt;br /&gt;            QueryDescriptor qd) {   &lt;br /&gt;              &lt;br /&gt;  &lt;b&gt; Object execBinding =   &lt;br /&gt;     bc.findExecutableBinding("ImplicitViewCriteriaQuery");   &lt;br /&gt;  ViewCriteria vc =   &lt;br /&gt;   JUSearchBindingCustomizer.getViewCriteria((DCBindingContainer)execBinding, qd.getName());   &lt;br /&gt;  return vc;   &lt;/b&gt;&lt;br /&gt;    &lt;br /&gt;  }   &lt;br /&gt;      &lt;br /&gt;  private void invokeQueryEventMethodExpression(String expression,   &lt;br /&gt;               QueryEvent queryEvent) {   &lt;br /&gt;                 &lt;br /&gt;  FacesContext fctx = FacesContext.getCurrentInstance();   &lt;br /&gt;  ELContext elctx = fctx.getELContext();   &lt;br /&gt;  ExpressionFactory efactory =   &lt;br /&gt;   fctx.getApplication().getExpressionFactory();   &lt;br /&gt;  MethodExpression me =   &lt;br /&gt;   efactory.createMethodExpression(elctx, expression, Object.class,   &lt;br /&gt;             new Class[] { QueryEvent.class });   &lt;br /&gt;  me.invoke(elctx, new Object[] { queryEvent });   &lt;br /&gt;    &lt;br /&gt;  }   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8164589871893689027?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8164589871893689027/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8164589871893689027' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8164589871893689027'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8164589871893689027'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/retrieving-viewcriteria-from-custom.html' title='Retrieving ViewCriteria from a custom queryListener method'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8087953561218093029</id><published>2011-03-07T04:41:00.000-08:00</published><updated>2011-03-07T04:44:19.824-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Initializing the bind variables used for an LOV query</title><content type='html'>This post is continuation of one of my previous post on &lt;a href="http://jobinesh.blogspot.com/2009/08/tips-on-lov-runtime.html"&gt;LOV run time&lt;/a&gt;. Today, I'm sharing another approach for initializing the bind variable used in an LOV query. &lt;br /&gt;&lt;br /&gt;This example has an LOV defined for DepartmentId attribute of Employee View Object. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh6.googleusercontent.com/-CMc8AjYaPTk/TXTAYrnXggI/AAAAAAAACPk/63bWHr9dIco/s1600/lovEditor.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="251" src="https://lh6.googleusercontent.com/-CMc8AjYaPTk/TXTAYrnXggI/AAAAAAAACPk/63bWHr9dIco/s400/lovEditor.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;LOV query comes from Department View Object, and the 'where' clause has a bind variable defined as shown below.&lt;br /&gt;&lt;br /&gt;SELECT Departments.DEPARTMENT_ID, &lt;br /&gt;Departments.DEPARTMENT_NAME, &lt;br /&gt;Departments.MANAGER_ID, &lt;br /&gt;Departments.LOCATION_ID&lt;br /&gt;FROM DEPARTMENTS Departments&lt;br /&gt;WHERE ( Departments.LOCATION_ID = :bindVarLocId  OR :bindVarLocId IS NULL )&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How do you set bind variable value in the above case (when used in a LOV query)?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;One possibility is to let the bind variable to read the value from User Session Data. In this case, you can supply the bind variable value at run time by putting in to &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/ApplicationModule.html#getSession%28%29"&gt;ApplicationModule's User Session Data HashMap&lt;/a&gt; as shown in the following code snippet. You may need to expose this method (defined on AM) to the client as well.&lt;br /&gt;&lt;br /&gt;public void setLocationIDSessionData(Number locId){&lt;br /&gt;this.getSession().getUserData().put("LocationId", locId);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How does the query get value from User Session Data?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;ADF BC run time can access &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/Session.html"&gt;User Session&lt;/a&gt; values using groovy expressions. You may need to use the bind variable editor to associate the groovy expression with bind variable as shown in the screen shot.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh4.googleusercontent.com/-ghE6J7kAbc8/TXTB-ZfavDI/AAAAAAAACPo/IBieQ0Osya0/s1600/bindvaredit.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="355" src="https://lh4.googleusercontent.com/-ghE6J7kAbc8/TXTB-ZfavDI/AAAAAAAACPo/IBieQ0Osya0/s400/bindvaredit.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;When do you need to set 'User Session Data' with value for the bind variable ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You may need to do it before the LOV query execution. If you use ChoiceList ListOfValues, then you may need to do it through a method activity before the view activity.&lt;br /&gt;If you are using LOV component displayed as a pop up window, you can even rely on launchPopupListener of ListOfValues component.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/LOVQueryInitSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Run lovInForm.jspx. Click on the LOV displayed for DepartamentId in the parameter form. You may notice that list is restricted to display only those records with LocationId=1700&lt;br /&gt;&lt;br /&gt;2. Run lovInQuery.jspx. Click on the LOV displayed for DepartamentId in the search panel. As in the above case, list of values is restricted to display only those records with LocationId=1700&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8087953561218093029?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8087953561218093029/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8087953561218093029' title='10 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8087953561218093029'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8087953561218093029'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/initializing-bind-variables-in-query.html' title='Initializing the bind variables used for an LOV query'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh6.googleusercontent.com/-CMc8AjYaPTk/TXTAYrnXggI/AAAAAAAACPk/63bWHr9dIco/s72-c/lovEditor.PNG' height='72' width='72'/><thr:total>10</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7128099792448954506</id><published>2011-03-05T09:15:00.000-08:00</published><updated>2011-03-05T09:15:09.431-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Passing dynamic parameters to the Java Script method in a Fusion Web Application</title><content type='html'>In this post, I'm sharing some tips to pass dynamic parameters values to a Java Script method. The idea is inspired by an example from &lt;a href="http://frank.thepeninsulasedge.com/"&gt;Frank Nimphius&lt;/a&gt;. Solution is to use &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_clientAttribute.html"&gt;&amp;lt;af:clientAttribute&amp;gt;&lt;/a&gt; to associate the parameter and value with the component which triggers the event. When using af:clientAttribute the parameter can be accessed on the client through AdfUIComponent.getProperty("ParameterName"). The rich client framework takes care of marshaling the attribute value to the client. Also, the below code uses '&lt;a href="http://www.jibbering.com/faq/notes/closures/"&gt;closure&lt;/a&gt;' in the JavaScript method to ease the coding.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:resource type="javascript"&amp;gt;  &lt;br /&gt;  function someMethod(arg) {  &lt;br /&gt;    return function (evt) {  &lt;br /&gt;       var finalArg = evt.getSource().&lt;b&gt;getProperty('SomeDynamicArg')&lt;/b&gt; + ' : ' + arg;  &lt;br /&gt;       alert(finalArg);  &lt;br /&gt;       evt.cancel();  &lt;br /&gt;    }  &lt;br /&gt;  }  &lt;br /&gt; &amp;lt;/af:resource&amp;gt;  &lt;br /&gt; &amp;lt;af:commandButton text="SomeActionBtn" id="cb1"&amp;gt;  &lt;br /&gt;  &amp;lt;af:clientListener type="click"  &lt;br /&gt;            method="someMethod('SomeStaticArg')"/&amp;gt;  &lt;br /&gt;  &amp;lt;af:clientAttribute name="SomeDynamicArg"  &lt;br /&gt;            value="#{bindings.DepartmentName.inputValue}"/&amp;gt;  &lt;br /&gt; &amp;lt;/af:commandButton&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7128099792448954506?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7128099792448954506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7128099792448954506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7128099792448954506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7128099792448954506'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/passing-dynamic-parameters-to-java.html' title='Passing dynamic parameters to the Java Script method in a Fusion Web Application'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7220814623065806931</id><published>2011-03-01T03:34:00.000-08:00</published><updated>2011-03-01T03:49:15.747-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Controller'/><title type='text'>ADFc: No outcome metadata specified for method call activity 'null' !</title><content type='html'>While defining task flow method activities by EL binding to a method in managed bean, there are certain things you need to be aware of.  These points are well documented in Fusion Developer's Guide under &lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/taskflows_activities.htm#BACFBDAE"&gt;15.5 Using Method Call Activities&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm explaining a very common mistake when you EL bind a manged bean method as method activity for a task flow. In this case, if your method return some status message and you want to control navigation cases based on this outcome, its required to specify 'toString()'[displayed under Outcome group] as 'true' from the drop down list, as shown in the following screen shot.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="https://lh5.googleusercontent.com/-D4cz22hb9SY/TWzYGp-e5KI/AAAAAAAACPY/EyitaLMSWik/s1600/taskflow1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="https://lh5.googleusercontent.com/-D4cz22hb9SY/TWzYGp-e5KI/AAAAAAAACPY/EyitaLMSWik/s400/taskflow1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt; &amp;lt;method-call id="someMethodCall"&amp;gt;  &lt;br /&gt;  &amp;lt;method&amp;gt;#{backingBeanScope.managedBean1.doSomething}&amp;lt;/method&amp;gt;  &lt;br /&gt;  &amp;lt;outcome id="__16"&amp;gt;  &lt;br /&gt;   &amp;lt;to-string/&amp;gt;  &lt;br /&gt;  &amp;lt;/outcome&amp;gt;  &lt;br /&gt; &amp;lt;/method-call&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;to-string:&lt;/b&gt; If specified as true, the outcome is based on calling the toString() method on the Java object returned by the method.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;If you miss the above step(setting 'to-string'), then ADF run time may not invoke your method as its incomplete, and may result in unexpected result as well. If you see the log, you may notice a warning message as shown below.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;MethodCallMetadataXmlImpl&gt; &lt;parse&gt; ADFc: /WEB-INF/task-flow-definition.xml#task-flow-definition: &lt;br /&gt;&lt;MethodCallMetadataXmlImpl&gt; &lt;parse&gt; ADFc: No outcome metadata specified for method call activity 'null'.&lt;br /&gt;&lt;ActivityXmlImpl&gt; &lt;parse&gt; ADFc: /WEB-INF/task-flow-definition.xml#task-flow-definition: &lt;br /&gt;&lt;ActivityXmlImpl&gt; &lt;parse&gt; ADFc: Activity metadata could not be parsed. [Activity Type, ID] = ['method-call', 'someMethodCall'].&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7220814623065806931?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7220814623065806931/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7220814623065806931' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7220814623065806931'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7220814623065806931'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/03/adfc-no-outcome-metadata-specified-for.html' title='ADFc: No outcome metadata specified for method call activity &apos;null&apos; !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='https://lh5.googleusercontent.com/-D4cz22hb9SY/TWzYGp-e5KI/AAAAAAAACPY/EyitaLMSWik/s72-c/taskflow1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3159896959412310214</id><published>2011-02-27T02:06:00.000-08:00</published><updated>2011-02-28T04:54:33.861-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Yet another reason for "JBO-25014: Another user has changed the row with primary key oracle.jbo.Key"</title><content type='html'>I've discussed one possible (tricky) reason for JBO-25014 error in one of my previous post - &lt;a href="http://jobinesh.blogspot.com/2010/03/what-you-may-need-to-know-about-nested.html"&gt;'What you may need to know about Nested Application Module'&lt;/a&gt; . Recently I noticed yet another interesting reason for the above said JBO-25014 error. Let me summarize the same for the benefit of the ADF community.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Use case&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This use case has two view objects - SimpleEmployeeViewObject and DetailedEmployeeViewObject, both are based on the same entity object - EmployeeEntityObject. A specific business functionality is implemented using the above ViewObjects as listed below.&lt;br /&gt;&lt;br /&gt;1. SimpleEmployeeViewObject queries the DB by calling SimpleEmployeeViewObject.executeQuery(). The code doesn't fetch any records at this stage(I meant that, this code just got the executeQuery call, no iteration logic). However this call results in the creation of result set/cursor, and leaves it opened.&lt;br /&gt;&lt;br /&gt;2. Then, DetailedEmployeeViewObject queries by calling DetailedEmployeeViewObject.executeQuery(). Here the code fetches set of records and modifies the record with EmployeeID = 101.&lt;br /&gt;&lt;br /&gt;3. Commits the Transaction, and then call DetailedEmployeeViewObject.clearCache()&lt;br /&gt;&lt;br /&gt;4. As a next step, SimpleEmployeeViewObject tries to get the employee record with EmployeeID = 101. Note that, SimpleEmployeeViewObject  does not call executeQuery here, instead queries the &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/RowSet.html"&gt;RowSet&lt;/a&gt;(retrieved at Step 1) for the record. This may return the stale row from the opened cursor, and apparently this row doesn't reflect the modified attributes from database (committed at Step 3). This step modifies the retrieved record and commits the transaction.&lt;br /&gt;&lt;br /&gt;5. At Step 4, the 'commit' operation may tries to locks the row, it compares the original values of all the persistent attributes in the entity cache as they were last retrieved from the database with the values of those attributes just retrieved from the database during the lock operation. Apparently this may throw "JBO-25014: Another user has changed the row with primary key oracle.jbo.Key[101]" as the entity object is populated with a stale row set.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What is the solution ?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The solution is to close the opened cursor(result set) having the stale data after the commit  at Step3 ( before the next transaction). Please note that, ADF BC runtime closes the result set/curosr as part of Transaction::rollback(). However Transaction::commit() doesn't touch the opened cursors, by default. &lt;br /&gt;&lt;br /&gt;The easiest work around here is to call SimpleEmployeeViewObject.executeQuery() before step4. Either you can do it through a explicit call or you can move this call to &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#afterCommit%28oracle.jbo.server.TransactionEvent%29"&gt;SimpleEmployeeViewObjectImpl::afterCommit(TransactionEvent event)&lt;/a&gt; method.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Re-querying all View Objects on commit&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;On a related note, you can configure a specific Application Module to refresh all its View Objects after the commit of a transaction by setting &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#afterCommit%28oracle.jbo.server.TransactionEvent%29"&gt;RequeryOnCommit="true"&lt;/a&gt;. This setting may cause all the 'queried' View Objects of the Application Module to requery/refresh after the commit. This setting also may help you to solve error that we discussed in this post (You should be careful while keeping this ON as this result in expensive requery of all View Objects belonging to the Application Module).&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;;background-image:URL(http://2.bp.blogspot.com/_z5ltvMQPaa8/SjJXr_U2YBI/AAAAAAAAAAM/46OqEP32CJ8/s320/codebg.gif);padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;AppModule  &lt;br /&gt;  xmlns="http://xmlns.oracle.com/bc4j"  &lt;br /&gt;  Name="AppModule"  &lt;br /&gt;  Version="11.1.1.59.23"  &lt;br /&gt;  ClearCacheOnRollback="true" &lt;b&gt;RequeryOnCommit="true" &lt;/b&gt;&lt;br /&gt;  ComponentClass="model.AppModuleImpl"  &lt;br /&gt;  ComponentInterface="model.common.AppModule"  &lt;br /&gt;  ClientProxyName="model.client.AppModuleClient"&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3159896959412310214?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3159896959412310214/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3159896959412310214' title='9 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3159896959412310214'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3159896959412310214'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/02/yet-another-reason-for-jbo-25014.html' title='Yet another reason for &quot;JBO-25014: Another user has changed the row with primary key oracle.jbo.Key&quot;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>9</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-2866930730427703230</id><published>2011-02-22T22:38:00.000-08:00</published><updated>2011-02-22T23:18:47.558-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>&lt;af:setPropertyListener&gt; not working on &lt;af:popup&gt; with childCreation="deferred" !</title><content type='html'>You should be careful while using &amp;lt;af:setPropertyListener&amp;gt;  on &amp;lt;af:popup&amp;gt;. There is a known limitation when you use &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_setPropertyListener.html"&gt;&amp;lt;af:setPropertyListener&amp;gt;&lt;/a&gt; with  'popupFetch' type to initialize the properties/parameters for a &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_popup.html"&gt;&amp;lt;af:popup&amp;gt;&lt;/a&gt;. The relevant jsf snippet may look like as shown in the following diagram.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:popup id="p1" contentDelivery="lazyUncached"  &lt;br /&gt;       childCreation="deferred"&amp;gt;  &lt;br /&gt;  &amp;lt;af:setPropertyListener from="'check'" to="#{requestScope.params}"  &lt;br /&gt;    type="popupFetch"/&amp;gt;  &lt;br /&gt;  &amp;lt;af:dialog id="d2" title="Check"&amp;gt;  &lt;br /&gt;   &amp;lt;af:outputText value="Param from the caller: #{requestScope.params}"  &lt;br /&gt;    id="ot2"/&amp;gt;  &lt;br /&gt;   &amp;lt;/af:dialog&amp;gt;  &lt;br /&gt; &amp;lt;/af:popup&amp;gt;    &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;When you run this page, you may notice that the setPropertyListener with a popupFetch type is not getting called for the first time, and the same works without issues from next time onwards.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;What goes wrong here?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let me try to summarize the reason for this behavior. In the above jsf snippet, &amp;lt;af:setPropertyListener&amp;gt; resides inside the popup body which is not available/processed when the parent page renders for the first time because of the  deferred 'child creation' settings (childCreation ="deferred") for the popup. With this deferred configuration popup body is processed when you really ask for it. Please note that, af:setPropertyListener is expected to be evaluated/processed during the Apply Request Values phase in JSF life cycle which may happen much before the Render Response phase. When user opts to view popup, reuest reaches server and JSF lifecycle starts. As there is no popup body at this stage, there is no af:setPropertyListener tag for processing at Apply Request Values phase. Later in the JSF life cycle, popup body is processed at Render Response phase. Apparently next request for showing popup may have fully processed popup body in place, and everything may work as expected at this time. &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The work around solution is to use the popupFetchListener method to establish state(pass parameters) instead of &amp;lt;af:setPropertyListener&amp;gt;. If you modify the above jsf snippet as shown below, this use case will work.&lt;br /&gt;&lt;br /&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; &amp;lt;af:popup id="p2" contentDelivery="lazyUncached"  &lt;br /&gt;       childCreation="deferred"  &lt;br /&gt;       popupFetchListener="#{TestBean.popupFetchAction}"&amp;gt;  &lt;br /&gt;  &amp;lt;af:dialog id="d3" title="Check"&amp;gt;  &lt;br /&gt;   &amp;lt;af:outputText value="Param from the caller: #{requestScope.params}"  &lt;br /&gt;             id="ot3"/&amp;gt;  &lt;br /&gt;  &amp;lt;/af:dialog&amp;gt;  &lt;br /&gt; &amp;lt;/af:popup&amp;gt;  &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre  style="font-family:arial;font-size:12px;border:1px dashed #CCCCCC;width:99%;height:auto;overflow:auto;background:#f0f0f0;padding:0px;color:#000000;text-align:left;line-height:20px;"&gt;&lt;code style="color:#000000;word-wrap:normal;"&gt; public class TestBean {  &lt;br /&gt;  public void popupFetchAction(PopupFetchEvent popupFetchEvent) {  &lt;br /&gt;   ADFContext.getCurrent().getRequestScope().put("params", "check");  &lt;br /&gt;  }  &lt;br /&gt; }   &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;i&gt;Please note that this issue is being tracked as an 'Enhancement Request' by ADF Faces team. Once this is done the above stated limitation is no longer valid.&lt;/i&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-2866930730427703230?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/2866930730427703230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=2866930730427703230' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2866930730427703230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/2866930730427703230'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/02/not-working-on-with-childcreationdeferr.html' title='&amp;lt;af:setPropertyListener&amp;gt; not working on &amp;lt;af:popup&amp;gt; with childCreation=&quot;deferred&quot; !'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1223353218332941617</id><published>2011-02-22T06:21:00.000-08:00</published><updated>2011-02-22T06:24:59.717-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Overriding Control Hints of a View Object on the fly</title><content type='html'>I recently came across a use case where the requirement was to fetch Attribute Hints(display width, label etc.) for a View Object(and Entity Object) on the fly from an external system. Let me share a simple possible solution for this specific use case.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;The idea is to override &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewRowImpl.html#createViewRowAttrHints%28oracle.jbo.server.AttributeDefImpl%29"&gt;ViewRowImpl::createViewRowAttrHints(AttributeDefImpl attrDef)&lt;/a&gt; to return a custom implementation of ViewRowAttrHintsImpl class. The same concept has been discussed in one of my previous post sometime back - &lt;a href="http://jobinesh.blogspot.com/2010/06/decorate-ui-with-view-row-attributes.html"&gt;Decorate UI with view row Attribute's User Interface hints&lt;/a&gt;. Please note that, this is the place( custom ViewRowAttrHintsImpl class - LazyViewRowAttrHintsImpl) where we are adding the hook to retrieve the Attribute Hints from third party service.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;@Override&lt;br /&gt;protected ViewRowAttrHintsImpl createViewRowAttrHints(AttributeDefImpl attrDef) {&lt;br /&gt;  return new LazyViewRowAttrHintsImpl(attrDef, this);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The constructor of LazyViewRowAttrHintsImpl may look like as shown in the following code snippet. Please take a look at th source of LazyViewRowAttrHintsImpl.java to get a feel of the implementation (work space is attached at the end of this post).&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&lt;br /&gt; public class LazyViewRowAttrHintsImpl &lt;br /&gt;                     extends ViewRowAttrHintsImpl {&lt;br /&gt;  &lt;br /&gt;  public LazyViewRowAttrHintsImpl(&lt;br /&gt;           AttributeDefImpl attributeDefImpl,&lt;br /&gt;           ViewRowImpl viewRowImpl) {&lt;br /&gt;    super(attributeDefImpl, viewRowImpl);&lt;br /&gt;&lt;br /&gt;    //The following call retrieves AttrHints &lt;br /&gt;    //from third party service&lt;br /&gt;    //and add the same to Attribute Defn of VO&lt;br /&gt;    decorateWithLazyHints(attributeDefImpl);&lt;br /&gt;  } ...&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/LazyVOControlHints.zip"&gt;&lt;b&gt;download &lt;/b&gt;the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Please run the dept.jspx. You may notice that default UI hints ( such as label, field width etc. ) are overridden with values from a dummy service( UIHintsService ).&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1223353218332941617?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1223353218332941617/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1223353218332941617' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1223353218332941617'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1223353218332941617'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/02/overriding-control-hints-of-view-object.html' title='Overriding Control Hints of a View Object on the fly'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6650549924664328478</id><published>2011-02-22T00:50:00.000-08:00</published><updated>2011-02-22T00:51:25.851-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Customizing the width of a UI control using contentStyle attribute</title><content type='html'>You can use contentStyle attribute to override the default width of specific types of UI controls. This property is applicable for single select and multiple select controls( af:selectOneChoice, af:selectManyShuttle, af:selectBooleanRadio etc.) and input controls( af:inputText, af:inputRangeSlider, af:inputListOfValues,af:richTextEditor etc. ). &lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;af:selectOneChoice  &lt;b&gt;contentStyle=&amp;quot;width:200px&amp;quot;&lt;/b&gt; label=&amp;quot;Select an Item:&amp;quot; id=&amp;quot;soc1&amp;quot;&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;From &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31973/toc.htm"&gt;Web User Interface Developer's Guide&lt;/a&gt; &lt;b&gt;...&lt;/b&gt;&lt;br /&gt;&lt;i&gt;If the field is wider than the space allocated, the browser will not truncate the field but instead will take space from the label columns. This potentially could cause the labels to wrap more than you would like. In this case, you may want to consider reducing the width of the field contents (for example, use a smaller contentStyle width on an inputText component). &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;However, you should be cautious while using 'contentStyle' to override the default width of the controls, especially with controls like af:selectOneChoice. In case of af:selectOneChoice, by default, run time would try to set the 'width' by considering the maximum size of the displayed list item values. This 'defaulting behavior' is useful if your application is later enhanced to support a different language where the width of the af:selectOneChoice may vary based on the language characteristics.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6650549924664328478?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6650549924664328478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6650549924664328478' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6650549924664328478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6650549924664328478'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/02/customizing-width-of-ui-control-using.html' title='Customizing the width of a UI control using contentStyle attribute'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4074669268812007796</id><published>2011-02-02T23:55:00.000-08:00</published><updated>2011-02-02T23:57:22.008-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Creating Custom History Types</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;While dealing with business data, 'history' has its own role to play. The 'history' here means, data specific to a point in time. Most of the enterprise application may capture audit information when the user commits a business transaction. These audit data may includes previous value of some sensitive attributes, user who modified the data, modified date etc. ADF BC framework ships with a number of history types, but you can also create your own on need basis. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Life cycle of a 'history type' attribute&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Question here is, who does update these attributes (and when)? Well, this job is done by the ADF BC run time at prepareForDML phase of a transaction post cycle. When you commit/post a transaction, Transaction Manager would take each entity object through a transaction post cycle as shown in the following diagram. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_CMZrjNwEQhk/TUoyCjm19hI/AAAAAAAACNA/Evm-SI8xA3k/s1600/EntityLifeCycle.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/_CMZrjNwEQhk/TUoyCjm19hI/AAAAAAAACNA/Evm-SI8xA3k/s400/EntityLifeCycle.png" width="376" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;prepareForDML - Issues pre-doDML ntofication for all entities, this is used to assign history values before an entity row is saved. Run time uses attribute definition to identify the nature of each attribute and takes appropriate actions. &lt;br /&gt;&lt;br /&gt;doDML - Performs the appropriate SQL Data Manipulation Language operations on the database to reflect an update, delete or insert operation on an Entity Object beforeCommit&lt;br /&gt;&lt;br /&gt;beforeCommit - This is invoked on each modified entity instance after the changes have been posted to the database, but before they are committed. Last chance for you to validate your business data(if you have some data validation logic built using stored procedure, you can hook that call here). This is also a place for invoking third party services passing data from the current entity instance.&lt;br /&gt;&lt;br /&gt;afterCommit - Send notifications about a change to an entity object's state. This is invoked on the entity instance after committing data to DB. &lt;br /&gt;&lt;br /&gt;History types are very much extensible in ADF, you can build your own history type without much effort. This part is very well documented in Fusion Developer's Guide, please see topic &lt;a href="http://download.oracle.com/docs/cd/E17904_01/web.1111/b31974/bcadveo.htm#CEGCIEIE"&gt;38.10 Creating New History Types&lt;/a&gt; to learn more. In this post, I'm sharing simple example built using custom history type.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/HistorySample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS3 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example captures the old value of DepartmentName attribute using DepartmentNameAudit field whenever DepartmentName changes( DepartmentNameAudit is a custom 'history type'). I'm highlighting the steps for creating custom history type used in this example - 'modified value'.&lt;br /&gt;&lt;br /&gt;1. Define a new history type(modified value) using the editor( Tools-&amp;gt;Preferences-&amp;gt;Business Components-&amp;gt;History Types)&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_CMZrjNwEQhk/TUpDxaAZ4YI/AAAAAAAACNE/Rh-iuiWE9RM/s1600/history1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="221" src="http://1.bp.blogspot.com/_CMZrjNwEQhk/TUpDxaAZ4YI/AAAAAAAACNE/Rh-iuiWE9RM/s400/history1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2. Provide implementation for the custom history type by overriding &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/EntityImpl.html#getHistoryContextForAttribute%28oracle.jbo.server.AttributeDefImpl%29"&gt;EntityImpl::getHistoryContextForAttribute(...)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;@Override&lt;br /&gt;protected Object getHistoryContextForAttribute(AttributeDefImpl attr) {&lt;br /&gt;&lt;br /&gt;  if (attr.getHistoryKind() == MODIFIED_VALUE_HISTORY_TYPE) {&lt;br /&gt;  // your logic goes here&lt;br /&gt;  // return the value for the history type attribute&lt;br /&gt;  }&lt;br /&gt;  return super.getHistoryContextForAttribute(attr);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;3. Mark the desired attribute using newly defined history type&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_CMZrjNwEQhk/TUpExxbYemI/AAAAAAAACNI/9MrrFibhj24/s1600/history2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://1.bp.blogspot.com/_CMZrjNwEQhk/TUpExxbYemI/AAAAAAAACNI/9MrrFibhj24/s400/history2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Download the source and extract this to you local host.&lt;br /&gt;&lt;br /&gt;2. This example uses HR schema. The attribute DepartmentNameAudit in Departments entity is mapped to OLD_DEPARTMENT_NAME column in DEPARTMENTS table. If you want to run the sample, then please add this extra column to DEPARTMENTS table.&lt;br /&gt;&lt;br /&gt;ALTER TABLE DEPARTMENTS ADD OLD_DEPARTMENT_NAME  varchar2(30);&lt;br /&gt;&lt;br /&gt;3. Run main.jspx&lt;br /&gt;&lt;br /&gt;4. Modify Department Name field and commit the changes. Please see the corresponding record in you database table(DEPARTMENTS). The column OLD_DEPARTMENT_NAME may have the previous value of DEPARTMENT_NAME.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4074669268812007796?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4074669268812007796/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4074669268812007796' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4074669268812007796'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4074669268812007796'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/02/creating-custom-history-types.html' title='Creating Custom History Types'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CMZrjNwEQhk/TUoyCjm19hI/AAAAAAAACNA/Evm-SI8xA3k/s72-c/EntityLifeCycle.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6638746928007767449</id><published>2011-01-28T10:11:00.000-08:00</published><updated>2011-01-28T18:46:28.479-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Globally setting the Row Fetch Limit for all ViewObjects</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There is an interesting feature available with 11gR1PS3(11.1.1.4.0) release which may help you to set a default 'row fetch limit' for all ViewObjects at application level. This is very useful to avoid expensive table scan if you don't have maxfetchsize defined for individual ViewObjects. Apparently, this 'global setting' fits well for those ViewObjects where each query execution may result in large  number of records. Please note that, even the 'row count' query issued by the framework may also result in performance issues if the table is having huge chunks of data.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How do you set the 'Row Fetch Limit' globally?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This value can be configured using 'rowLimit' under &amp;lt;adf-adfm-config&amp;gt; section of &amp;lt;adf-config&amp;gt; file from your application. &lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&amp;lt;adf-adfm-config xmlns="http://xmlns.oracle.com/adfm/config"&amp;gt;&lt;br /&gt;&amp;lt;defaults useBindVarsForViewCriteriaLiterals="true" &lt;b&gt;rowLimit&lt;/b&gt;="10000"/&amp;gt;&lt;br /&gt;   ...&lt;br /&gt;&amp;lt;/adf-adfm-config&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;If you would like to edit this configuration visually, then please use the &amp;lt;adf-config&amp;gt; editor to key in value for 'Row Fetch Limit', as shown in the following screen shot.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_CMZrjNwEQhk/TUMJLfzo1KI/AAAAAAAACMs/dIJvJMo2I0Y/s1600/FetchSize1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="219" src="http://3.bp.blogspot.com/_CMZrjNwEQhk/TUMJLfzo1KI/AAAAAAAACMs/dIJvJMo2I0Y/s400/FetchSize1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;How does 'Row Fetch Limit' help to limit the fetch size at runtime?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;From the UI perspective, when the user scrolls down beyond the 'row fetch limit' the run time would generate oracle.jbo.RowLimitExceededWarning and the same would be displayed as a message dialog to the user. The same exception is thrown if you try to access the row(s) programmatically as well, exceeding the fetch size.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;oracle.jbo.RowLimitExceededWarning: JBO-25089: View object AppModule.EmployeesView1 attempted to fetch rows beyond the row limit&lt;br /&gt;  at oracle.jbo.server.ViewObjectImpl.createRowFromResultSet(ViewObjectImpl.java:5765)&lt;br /&gt;  at oracle.jbo.server.ViewObjectImpl.createInstanceFromResultSet(ViewObjectImpl.java:5588)&lt;br /&gt;  at oracle.jbo.server.QueryCollection.populateRow(QueryCollection.java:3528)&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;How do you override the global Row Fetch Limit for a specific ViewObject?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;It is always possible to override the global row fetch limit for specific ViewObject(s) based on your use cases. There are two possible approaches,&lt;br /&gt;&lt;br /&gt;1. Specify maxfetchsize for the ViewObject. You can see this option under ViewObject's tuning section in the editor window.&lt;br /&gt;&lt;br /&gt;2. Override &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#getRowLimit%28%29"&gt;ViewObjectImpl::getRowLimit()&lt;/a&gt; from your ViewOblectImpl to return -1.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;/**&lt;br /&gt;* A limit may be applied on the number of rows in a query collection. When&lt;br /&gt;* a new row is requested from the database and the limit is exceeded a&lt;br /&gt;* warning is raised. By default the limit is configured as an application&lt;br /&gt;* wide setting in adf-config.xml.&lt;br /&gt;* @return a limit on the number of rows in a query collection. If no row limit is enforced&lt;br /&gt;*/&lt;br /&gt;@Override&lt;br /&gt;protected long getRowLimit()&lt;br /&gt;{&lt;br /&gt;  return -1;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6638746928007767449?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6638746928007767449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6638746928007767449' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6638746928007767449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6638746928007767449'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/globally-setting-row-fetch-limit-for.html' title='Globally setting the Row Fetch Limit for all ViewObjects'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CMZrjNwEQhk/TUMJLfzo1KI/AAAAAAAACMs/dIJvJMo2I0Y/s72-c/FetchSize1.PNG' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4241756700633703466</id><published>2011-01-25T22:37:00.000-08:00</published><updated>2011-01-25T22:50:50.568-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Marking an Entity Object as modified</title><content type='html'>There are use cases where developers may need to explicitly set the Entity Object state as modified so that it becomes 'dirty' and participate in the 'transaction commit' cycle. This scenario usually arise where you may have Entity Objects(not exposed through UI) whose attributes needs to be populated by the system as 'history columns' or through database trigger, when a transaction gets committed. Please note that only dirty entity instances participate in transaction post cycle. How to mark an entity instance as modified?  Unfortunately, there is no public API available at  &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/EntityImpl.html"&gt;EntityImpl&lt;/a&gt;level to mark the instance as as modified (EntityImpl::setState() is a private method). A work around solution for this specific scenario is to brutally set one attribute of the EntityImpl instance with its current/original value.&lt;br /&gt;&lt;br /&gt;//purely a work around, &lt;br /&gt;//currentValue is same as someEntityImpl.getSomeAttribute()&lt;br /&gt;someEntityImpl.setSomeAttribute(currentValue); &lt;br /&gt;&lt;br /&gt;This action would mark the instance as dirty('STATUS_MODIFIED'), and it becomes a candidate for transaction post cycle.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4241756700633703466?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4241756700633703466/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4241756700633703466' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4241756700633703466'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4241756700633703466'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/marking-entity-object-as-modified.html' title='Marking an Entity Object as modified'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6722142904262943089</id><published>2011-01-22T22:49:00.000-08:00</published><updated>2011-01-23T21:07:17.752-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Customizing the &lt;af:query&gt; component display by overriding CriteriaItemAttributeHints</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;More granular control on the display of af:query is a much awaited feature by the ADF community. Good news is that, 11gR1(11.1.1.4.0)[ aka 11gR1PS3 ] release comes along with new API on ViewObjectImpl - &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#getCriteriaItemAttributeHints%28oracle.jbo.ViewCriteriaItem%29"&gt;public AttributeHints getCriteriaItemAttributeHints(ViewCriteriaItem vci)&lt;/a&gt; - which may help you to hook your custom logic to control the 'run time' display behavior of af:query built using &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/ViewCriteria.html"&gt;ViewCriteria&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I'm sharing simple example built based on the above concept. This example would display 'DepartmentName' in a 'shortened field' when displayed inside the af:query whereas the same field would be displayed in the normal size when displayed out side of af:query.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_CMZrjNwEQhk/TTvLMRyLzMI/AAAAAAAACIk/FtQQeijjZwo/s1600/search.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://1.bp.blogspot.com/_CMZrjNwEQhk/TTvLMRyLzMI/AAAAAAAACIk/FtQQeijjZwo/s400/search.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example overrides the &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#getCriteriaItemAttributeHints%28oracle.jbo.ViewCriteriaItem%29"&gt;DepartmentsViewImpl::getCriteriaItemAttributeHints(ViewCriteriaItem vci)&lt;/a&gt; to return customized AttributeHints as shown in the following code snippet&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;/**&lt;br /&gt;* By default return null. Subclasses may override to return&lt;br /&gt;* custom AttributeHints implementation for the given criteria item.&lt;br /&gt;*/&lt;br /&gt;@Override&lt;br /&gt;public AttributeHints getCriteriaItemAttributeHints(ViewCriteriaItem vci) {&lt;br /&gt;  if (vci != null &amp;amp;&amp;amp;&lt;br /&gt;    vci.getAttributeDef().getName().equals("DepartmentName")) {&lt;br /&gt;    return getCustomCriteriaItemAttributeHints(vci);&lt;br /&gt;  }&lt;br /&gt;  return super.getCriteriaItemAttributeHints(vci);&lt;br /&gt;}&lt;br /&gt;private AttributeHints getCustomCriteriaItemAttributeHints(ViewCriteriaItem vci) {&lt;br /&gt;  AttributeHints cutomAttributeHints = null;&lt;br /&gt;  String vciName = vci.getAttributeDef().getName();&lt;br /&gt;  if ((cutomAttributeHints = hintsMap.get(vciName)) == null) {&lt;br /&gt;    cutomAttributeHints = new CustomCriteriaItemAttributeHintImpl(vci);&lt;br /&gt;    hintsMap.put(vciName, cutomAttributeHints);&lt;br /&gt;  }&lt;br /&gt;  return cutomAttributeHints;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can take a look at the model.CustomCriteriaItemAttributeHintImpl (workspace is attached at the end of this post) to get a feel of the custom &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/AttributeHints.html"&gt;AttributeHints &lt;/a&gt;implementation. This class is sub classed from a generic CriteriaItemAttributeHintAdaptor class, which gives default implementation for all the methods required as per the contract set by the &lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e10653/oracle/jbo/AttributeHints.html"&gt;AttributeHints&lt;/a&gt;. Override the methods of your choice to add custom 'UI hints' based on the use case you are working with. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_CMZrjNwEQhk/TTvLi3s-2PI/AAAAAAAACIo/X-RB5ZmqI3o/s1600/ModelJavaClassDiagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://4.bp.blogspot.com/_CMZrjNwEQhk/TTvLi3s-2PI/AAAAAAAACIo/X-RB5ZmqI3o/s400/ModelJavaClassDiagram.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The current example overrides AttributeHints::getDisplayWidth(LocaleContext locale) using CustomCriteriaItemAttributeHintImpl class to provide 'reduced' field width for 'DepartmentName' field when displayed inside a query panel (which is built using ViewCriteria).&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;@Override&lt;br /&gt;public int getDisplayWidth(LocaleContext locale) {&lt;br /&gt;  ViewCriteriaItem vci = this.getViewCriteriaItem();&lt;br /&gt;/** &lt;br /&gt; * String HINT_NAME_DISPLAY_WIDTH_FOR_QUERY is the custom property defined at&lt;br /&gt; * DepartmentName attribute level to hold custom field width value &lt;br /&gt; */&lt;br /&gt;  Object fieldWidth =&lt;br /&gt;    vci.getAttributeDef().getProperty(HINT_NAME_DISPLAY_WIDTH_FOR_QUERY);&lt;br /&gt;  if (fieldWidth != null) {&lt;br /&gt;    return Integer.parseInt((String)fieldWidth);&lt;br /&gt;  }&lt;br /&gt;  return super.getDisplayWidth(locale);&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/CustomControlHintsSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 &lt;b&gt;PS3&lt;/b&gt; + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Please run the test.jspx. You may notice that 'DepartmentName' field is smaller in size when displayed inside the search panel at run time.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6722142904262943089?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6722142904262943089/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6722142904262943089' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6722142904262943089'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6722142904262943089'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/customizing-component-display-by.html' title='Customizing the &amp;lt;af:query&amp;gt; component display by overriding CriteriaItemAttributeHints'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_CMZrjNwEQhk/TTvLMRyLzMI/AAAAAAAACIk/FtQQeijjZwo/s72-c/search.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1032349437167800684</id><published>2011-01-19T16:10:00.000-08:00</published><updated>2011-01-19T16:10:59.866-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Why does &lt;tr:inputListOfValues&gt; fail to show dialog when used with ADF Faces application?</title><content type='html'>Sometime back I noticed a couple of queries on the above topic, saying the &amp;lt;tr:inputListOfValues&amp;gt; fails to show the dialog when used inside a Fusion Web Application( application built on ADF stack ). The answer for this specific case is that, &amp;lt;tr:inputListOfValues&amp;gt; is not designed to work with ADF Controller. In other words, ADF Controller is not bothered about the Trinidad Dialog configuration. Ideally developers are not supposed to mix Trinidad pages built using '&lt;a href="http://myfaces.apache.org/trinidad/devguide/dialogs.html"&gt;Trinidad Dialog Framework&lt;/a&gt;' with ADF Faces pages.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1032349437167800684?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1032349437167800684/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1032349437167800684' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1032349437167800684'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1032349437167800684'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/why-does-fail-to-show-dialog-when-used.html' title='Why does &amp;lt;tr:inputListOfValues&amp;gt; fail to show dialog when used with ADF Faces application?'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-644274770446660696</id><published>2011-01-14T18:03:00.000-08:00</published><updated>2011-01-14T18:04:38.882-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 3  is now available  on OTN</title><content type='html'>Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 3 (11.1.1.4.0) is available on OTN. &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/index-088099.html"&gt;Check it out&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-644274770446660696?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/644274770446660696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=644274770446660696' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/644274770446660696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/644274770446660696'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/oracle-jdeveloper-and-oracle-adf-11g.html' title='Oracle JDeveloper and Oracle ADF 11g Release 1 Patch Set 3  is now available  on OTN'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-9018895546426658320</id><published>2011-01-13T23:47:00.000-08:00</published><updated>2011-01-13T23:47:17.875-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>Editing multiple Attributes of View Object in a single go</title><content type='html'>You can edit multiple attributes of Entity Object or View Object in a single shot by selecting them from Structure window and editing the values using the 'Property Inspector'. &lt;br /&gt;1. Select Entity Object/View Object in the Project Window&lt;br /&gt;2. 'Multi select' the attributes in the Structure Window by pressing Ctrl key followed by the attributes from the Entity Object or View Object&lt;br /&gt;3. Modify the property of your interest using the Property Inspector window( Open this window if not already opened). This modification would get applied to all the selected attributes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_CMZrjNwEQhk/TS__AsKEPrI/AAAAAAAACII/fT4n97NuXdc/s1600/bulkedit.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="303" src="http://4.bp.blogspot.com/_CMZrjNwEQhk/TS__AsKEPrI/AAAAAAAACII/fT4n97NuXdc/s400/bulkedit.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-9018895546426658320?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/9018895546426658320/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=9018895546426658320' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9018895546426658320'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/9018895546426658320'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/editing-multiple-attributes-of-view.html' title='Editing multiple Attributes of View Object in a single go'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CMZrjNwEQhk/TS__AsKEPrI/AAAAAAAACII/fT4n97NuXdc/s72-c/bulkedit.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-4116129595364754677</id><published>2011-01-09T17:42:00.000-08:00</published><updated>2011-01-09T17:42:49.564-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Model'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Declaratively  setting the current row key in a ViewObject</title><content type='html'>In this post I'm sharing simple example illustrating the declarative approach for overriding the default selected row of a &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/ViewObject.html"&gt;ViewObject&lt;/a&gt;. Please take a look at the following screen shot, the row selection of the Department details displayed inside the 'paginated parameter form' changes in accordance with selection in the drop down list (displayed on the top of the screen). In other words, the row selection of a ViewObject for the parameter from changes in accordance with value from the drop down list. &lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_CMZrjNwEQhk/TSncUUgm_OI/AAAAAAAACIE/mT8rLfIoZdo/s1600/currentRowSet.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="260" src="http://4.bp.blogspot.com/_CMZrjNwEQhk/TSncUUgm_OI/AAAAAAAACIE/mT8rLfIoZdo/s400/currentRowSet.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example gets the row key of the currently selected item from selectOneChoice, and uses the same for setting the 'current row' for the ViewObject used for displaying parameter form in the task flow. Please note that, 'current row key' can be declaratively retrieved  by making use of built in 'currentRowKeyString' method from iterator used for building the selectOneChoice. As I mentioned earlier, this key is passed as parameter to the task flow, displayed below the drop down list.  This task flow is having 'SetCurrentRowWithKey'(from the DepartmentsViewObject iterator) as default activity, followed by a view activity to display the department and employee details. The 'SetCurrentRowWithKey' method call activity used in the above task flow is built by dragging and dropping the 'SetCurrentRowWithKey' operation displayed in the data control under the iterator used for building parameter form.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;setCurrentRowWithKey&lt;/i&gt;: Tries to finds a row using the serialized string representation of row key passed as a parameter. If found, that row becomes the current row.&lt;br /&gt;&lt;br /&gt;Please see topic '&lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/web_tables_forms.htm#CJADCJEC"&gt;23.2.3 What You May Need to Know About Setting the Current Row in a Table&lt;/a&gt;' in Fusion Developer's Guide to lean more about 'SetCurrentRowWithKey'.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/CustomRowSelection.zip"&gt; download the sample workspace from here.&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-4116129595364754677?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/4116129595364754677/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=4116129595364754677' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4116129595364754677'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/4116129595364754677'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/declaratively-setting-current-row-key.html' title='Declaratively  setting the current row key in a ViewObject'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CMZrjNwEQhk/TSncUUgm_OI/AAAAAAAACIE/mT8rLfIoZdo/s72-c/currentRowSet.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-6907488149136820458</id><published>2011-01-06T01:01:00.000-08:00</published><updated>2011-01-06T01:01:41.452-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Tips on defining Declarative View Objects</title><content type='html'>View Objects in 'Declarative SQL Mode' would help you to optimize SELECT clause at run time by having only those attributes/columns really used by the page(based on the attribute definitions from the page definition file ). This feature is useful if you have large number of attributes and only a subset is displayed on the UI.  Please refer &lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcquerying.htm#CHDGBHAI"&gt;5.8 Working with View Objects in Declarative SQL Mode&lt;/a&gt; in Fusion Developer's Guide to learn more about Declarative View Objects.&lt;br /&gt;&lt;br /&gt;Please note that, each attribute in the view object has a Boolean property called "IsSelected". This is shown in the attribute editor as a check box - "Selected in Query".&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_CMZrjNwEQhk/TSWDNBMrEeI/AAAAAAAACH8/9iCpzzu98Lk/s1600/dclarativeVO1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://3.bp.blogspot.com/_CMZrjNwEQhk/TSWDNBMrEeI/AAAAAAAACH8/9iCpzzu98Lk/s400/dclarativeVO1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;If IsSelected=true (or absence of IsSelected attribute), then that attribute will be selected in the SELECT statement always, regardless of whether the attribute is selected by the UI or not. So if you really want to have optimized SELECT clause generated at run time (based on the attribute usage on UI), please deselect "Selected in Query" check box manually for all 'Non Key' attributes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-6907488149136820458?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/6907488149136820458/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=6907488149136820458' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6907488149136820458'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/6907488149136820458'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2011/01/tips-on-defining-declarative-view.html' title='Tips on defining Declarative View Objects'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CMZrjNwEQhk/TSWDNBMrEeI/AAAAAAAACH8/9iCpzzu98Lk/s72-c/dclarativeVO1.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-7116610715837289593</id><published>2010-12-28T03:37:00.000-08:00</published><updated>2010-12-28T06:56:24.436-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Displaying special characters on UI</title><content type='html'>You can use Unicode to display special charters on UI components. You may need to use the resource bundle to hold the Unicode values (of the special characters), and the same can be referred from the UI using the key.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;ResourceBundle Entry&lt;br /&gt;-----------------------&lt;br /&gt;&lt;b&gt;view.copyRightSymbol=\u00a9&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;JSF&lt;br /&gt;----&lt;br /&gt;&amp;lt;c:set var="viewcontrollerBundle"&lt;br /&gt; value="#{adfBundle['view.ViewControllerBundle']}"/&amp;gt;&lt;br /&gt;&amp;lt;af:outputText &lt;br /&gt;value="Copyright #{viewcontrollerBundle[&lt;b&gt;'view.copyRightSymbol'&lt;/b&gt;]}" id="ot1"/&amp;gt;&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The output on the page may look like as shown in the following image.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_CMZrjNwEQhk/TRn4U6i3KZI/AAAAAAAACHs/vsEE5afF4AY/s1600/untitled.PNG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_CMZrjNwEQhk/TRn4U6i3KZI/AAAAAAAACHs/vsEE5afF4AY/s1600/untitled.PNG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-7116610715837289593?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/7116610715837289593/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=7116610715837289593' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7116610715837289593'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/7116610715837289593'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/displaying-special-characters-on-ui.html' title='Displaying special characters on UI'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_CMZrjNwEQhk/TRn4U6i3KZI/AAAAAAAACHs/vsEE5afF4AY/s72-c/untitled.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8098616351732089462</id><published>2010-12-24T04:07:00.000-08:00</published><updated>2010-12-24T08:53:38.014-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Updating supporting business data before committing the transaction</title><content type='html'>In some specific business scenarios you may need to manipulate(create/modify/delete) related business records before committing the parent record(EntityObject). For example, inserting entries in to an audit table whenever some business data changes. Here the audit table its not updated by a user, instead the table is populated based on the updated data from the transaction tables. This post discusses a recommended pattern for such scenarios where you may need to create/modify  child/supporting entities whenever the parent entity changes.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Where do I keep the extra 'code' to deal with related entities?&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Here you are looking for a place to hook your logic for creating/modifying supporting entities whenever the parent entity gets modified. The right place to keep this 'extra' logic is your parent EntityObject's &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/server/EntityImpl.html#prepareForDML_int__oracle_jbo_server_TransactionEvent_"&gt;prepareForDML(int operation, TransactionEvent e)&lt;/a&gt; method. With this approach, the newly created EntityObject(s) would get a chance to participate in the 'entity validation and post' cycle. ADF BC run time would take care the rest :)&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/DMLBeforeCommit.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example would let you to create Department records. For each newly created department record, system would generate a dummy employee record. This is done be overriding DepartmentsEntityImpl::prepareForDML(int operation, TransactionEvent e) as shown in the following code snippet.&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;@Override&lt;br /&gt;protected void prepareForDML(int operation, TransactionEvent e) {&lt;br /&gt;super.prepareForDML(operation, e);&lt;br /&gt;  if (operation == EntityImpl.DML_INSERT) {&lt;br /&gt;    createDummyEmployees();&lt;br /&gt;  }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run the main.jspx. This page displays Departments-Employees hierarchy. You can create new Department by clicking the 'Create Dept' button. When you commit the data by pressing 'Commit' button, behind the scene, system would create a dummy employee record for each new Department.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_CMZrjNwEQhk/TRSHA4qX7XI/AAAAAAAACFU/hykpDIPoUio/s1600/dml.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/_CMZrjNwEQhk/TRSHA4qX7XI/AAAAAAAACFU/hykpDIPoUio/s400/dml.PNG" width="330" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8098616351732089462?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8098616351732089462/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8098616351732089462' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8098616351732089462'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8098616351732089462'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/updating-supporting-business-data.html' title='Updating supporting business data before committing the transaction'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CMZrjNwEQhk/TRSHA4qX7XI/AAAAAAAACFU/hykpDIPoUio/s72-c/dml.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3243299601423855514</id><published>2010-12-17T08:56:00.000-08:00</published><updated>2010-12-17T08:56:48.969-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Programmatically disclosing a ShowDetailItem in a  &lt;af:panelTabbed&gt;</title><content type='html'>In this post I'm sharing an example illustrating the programmatic disclosure of &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_showDetailItem.html"&gt;&amp;lt;af:showDetailItem&amp;gt;&lt;/a&gt; which is added inside a &lt;a href="http://jdevadf.oracle.com/adf-richclient-demo/docs/tagdoc/af_panelTabbed.html"&gt;&amp;lt;af:panelTabbed&amp;gt;&lt;/a&gt;. Please note that while programmatically disclosing a showDetailItem, it's your responsibility to set the 'Disclosed' to false for the previously displayed item. To illustrate this, take a look at the following code snippet: &lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;&lt;br /&gt;RichPanelTabbed richPanelTabbed = getPanelTabbed();&lt;br /&gt;for (UIComponent child : richPanelTabbed.getChildren()) {&lt;br /&gt;    RichShowDetailItem sdi = (RichShowDetailItem)child;&lt;br /&gt;    sdi.setDisclosed(isThisItemToBeDisclosed(sdi));&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/DetailItemSample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS2]&lt;br /&gt;&lt;br /&gt;How to run this sample?&lt;br /&gt;&lt;br /&gt;Run the test.jspx. This page displays drop down list displaying the tab names and a button close to it for disclosing&amp;nbsp; the selected tab programatically.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_CMZrjNwEQhk/TQuP7D_-nwI/AAAAAAAACFM/wtXmOyoc_eI/s1600/pannelTabbed.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/_CMZrjNwEQhk/TQuP7D_-nwI/AAAAAAAACFM/wtXmOyoc_eI/s400/pannelTabbed.PNG" width="397" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3243299601423855514?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3243299601423855514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3243299601423855514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3243299601423855514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3243299601423855514'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/programmatically-disclosing.html' title='Programmatically disclosing a ShowDetailItem in a  &amp;lt;af:panelTabbed&amp;gt;'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_CMZrjNwEQhk/TQuP7D_-nwI/AAAAAAAACFM/wtXmOyoc_eI/s72-c/pannelTabbed.PNG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-8650489324812345525</id><published>2010-12-11T20:42:00.000-08:00</published><updated>2010-12-11T20:42:02.415-08:00</updated><title type='text'>Identifying the source  of  a Class file</title><content type='html'>Sometimes you may need to identify the jar file from where a specific Class has been loaded. This information is useful when you need to deal with some weird ClassLoader issues. The following API may help you here.&lt;br /&gt;YourClz.class.getProtectionDomain().&lt;a href="http://download.oracle.com/javase/6/docs/api/java/security/CodeSource.html"&gt;getCodeSource().getLocation();&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-8650489324812345525?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/8650489324812345525/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=8650489324812345525' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8650489324812345525'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/8650489324812345525'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/identifying-source-of-class-file.html' title='Identifying the source  of  a Class file'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-304062768398651098</id><published>2010-12-10T02:10:00.000-08:00</published><updated>2010-12-10T09:15:30.032-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Tips on configuring timezone  for a fusion web application</title><content type='html'>You can set the timezone for a fusion web application using the time-zone element in &lt;a href="http://myfaces.apache.org/trinidad/devguide/configuration.html#trinidad-config.xml"&gt;trinidad-config.xml&lt;/a&gt;&lt;br /&gt;Doc says:&lt;br /&gt;&lt;i&gt;Apache Trinidad will attempt to default the time zone to the time zone used by the client browser. If needed, you can use an EL expression that evaluates to a TimeZone object. This value is used by org.apache.myfaces.trinidad.converter.DateTimeConverter while converting strings to Date. &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Please note that the above configuration is valid only for the view layer. ADF BC layer would use the time zone configured in the adf-config.xml. And this value can be retrieved by using &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/common/DefLocaleContext.html"&gt;oracle.jbo.common.DefLocaleContext&lt;/a&gt;.&lt;br /&gt;e.g: DefLocaleContext.getInstance().getUserTimeZone();&lt;br /&gt;&lt;br /&gt;How to make these two layers to work on same 'timezone' ?&lt;br /&gt;&lt;br /&gt;Yes, you can do that using EL for configuring timezone in adf-config.xml. Please see the EL #{adfFacesContext.timeZone.ID} used in the following configuration. This refers the timezone used by the view layer.&lt;br /&gt;#{adfFacesContext.timeZone.ID} =&gt; AdfFacesContext.getCurrentInstance().getTimeZone().getID();&lt;br /&gt;In effect, this expression help us to pass the timezone from the view layer to the business service layer in a smart way.&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;?xml version=&amp;quot;1.0&amp;quot; encoding=&amp;quot;windows-1252&amp;quot; ?&amp;gt;&lt;br /&gt;&amp;lt;adf-config xmlns=&amp;quot;http://xmlns.oracle.com/adf/config&amp;quot;&lt;br /&gt; ......&lt;br /&gt;&amp;lt;user-time-zone-config xmlns=&amp;quot;http://xmlns.oracle.com/adf/usertimezone/config&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;user-timezone expression=&amp;quot;&lt;b&gt;#{adfFacesContext.timeZone.ID}&lt;/b&gt;&amp;quot;/&amp;gt;&lt;br /&gt;&amp;lt;/user-time-zone-config&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-304062768398651098?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/304062768398651098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=304062768398651098' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/304062768398651098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/304062768398651098'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/tips-on-configuring-timezone-for-fusion.html' title='Tips on configuring timezone  for a fusion web application'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-3635133291673471861</id><published>2010-12-09T09:46:00.000-08:00</published><updated>2010-12-09T09:46:34.229-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Why do I get oracle.jbo.JboException: JBO-29000 ORA-01882:  timezone region  not found</title><content type='html'>Some of you you might have encountered the below shown error while deploying the ADF application on a stand alone weblogic server.&lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;oracle.jbo.JboException: JBO-29000: Unexpected exception caught:&lt;br /&gt;java.sql.SQLDataException, msg=ORA-01882: timezone region  not found&lt;br /&gt;at oracle.jbo.server.OracleSQLBuilderImpl.setSessionTimeZone(OracleSQLBuilderImpl.java:4964)&lt;br /&gt;&lt;br /&gt;((OracleConnection) conn).setSessionTimeZone(regionName);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;What goes wrong here?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Let us take a step back and see what happens when a client checks out an ApplicationModule to serve it's request.  Please note that, on each checkout of an application module from the pool, that application module pool will acquire a connection from the database connection pool and would try to refresh the connection metadata to reflect the current use context. The timezone from the current locale context is set on the database connection by calling&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E11882_01/appdev.112/e13995/oracle/jdbc/OracleConnection.html#setSessionTimeZone_java_lang_String_"&gt;&lt;br /&gt;oracle.jdbc.OracleConnection::setSessionTimeZone(regionName)&lt;/a&gt;&lt;br /&gt;API Doc Says:&lt;br /&gt;&lt;i&gt;This method is used to set the session time zone. This method must be invoked before accessing any TIMESTAMP WITH LOCAL TIME ZONE data. Upon invocation of this method, the Jdbc driver sets the session timezone of the connection and saves the session timezone so that any TSLTZ data accessed via Jdbc are adjusted using the session timezone.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;This call is equivalent to ALTER SESSION SET TIME_ZONE='regionName' command on the database for a session. If the database is not able to find the regionName from V$TIMEZONE_NAMES table( SELECT * from V$TIMEZONE_NAMES ), then you may get the error that I mentioned at the beginning. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Solution &lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Solution is to get rid of the unsupported default timezone. You can set the timezone either using adf-config.xml or as JVM arguments.&lt;br /&gt;1. Configuring using adf-config.xml&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;adf-config ....&lt;br /&gt;&amp;lt;user-time-zone-config xmlns=&lt;br /&gt;&amp;quot;http://xmlns.oracle.com/adf/usertimezone/config&amp;quot;&amp;gt;&lt;br /&gt;&amp;lt;user-timezone expression= &amp;quot;EL exp&amp;quot; /&amp;gt;&lt;br /&gt;&amp;lt;/user-time-zone-config&amp;gt; &lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;2. Passing as JVM argument &lt;br /&gt;Java -Duser.timezone=Asia/Calcutta&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-3635133291673471861?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/3635133291673471861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=3635133291673471861' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3635133291673471861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/3635133291673471861'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/why-do-i-get-oraclejbojboexception-jbo.html' title='Why do I get oracle.jbo.JboException: JBO-29000 ORA-01882:  timezone region  not found'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-5505795877942995536</id><published>2010-12-08T16:50:00.000-08:00</published><updated>2010-12-08T16:50:45.463-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Sorting a Transient ViewObject</title><content type='html'>Transient ViewObject is a value holder for non persistable data. In this post I'm sharing a very simple example illustrating the built in sorting support for a transient ViewObject. Please note that if you have table built using a transient ViewObject, a click on the sort icon for a column in turn would invoke &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#setSortBy_java_lang_String_"&gt;ViewObjectImpl::setSortBy(String sortBy)&lt;/a&gt; to perform in memory sorting. Whereas for a non transient VO, sorting is done by setting the OrderByClause using &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#setOrderByClause_java_lang_String_"&gt;ViewObjectImpl::setOrderByClause(String orderByClause)&lt;/a&gt;. This example is built based on the above theory :). I'm populating the the rows programmatically from the overridden ViewObjectImpl::executeQueryForCollection(...) and the rest is taken care by the framework. Please see &lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvvo.htm#sm0341"&gt;Fusion Developers Guide&lt;/a&gt; to know the key framework methods to override for programmatic View Objects&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/SortingTransientVO.zip"&gt;download the sample workspace from here&lt;/a&gt;. &lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Run the main.jspx and try sorting the table columns.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-5505795877942995536?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/5505795877942995536/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=5505795877942995536' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5505795877942995536'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/5505795877942995536'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/sorting-transient-viewobject.html' title='Sorting a Transient ViewObject'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4496361440376457974.post-1434712244883312028</id><published>2010-12-02T23:41:00.000-08:00</published><updated>2010-12-04T03:11:41.803-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Faces'/><title type='text'>Using oracle.jbo.domain.Array  with ViewCriteria</title><content type='html'>Sometimes you may need pass multiple values to the SQL WHERE clause. Apparently you may end up in using SQL IN clause to pass values. A possible solution (using ADF BC) for such use case has been shared in one of my previous post(&lt;a href="http://jobinesh.blogspot.com/2010/09/using-bind-variable-for-sql-statements.html"&gt;Using bind variable for...&lt;/a&gt;.). This is not the only one possibility, you can realize similar use cases using &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/toc.htm"&gt;oracle.jbo.domain.Array&lt;/a&gt; as well. This approach doesn't require the custom database function that we used in the previous post to parse the comma separated input string. In this post I'm sharing sample application built using oracle.jbo.domain.Array to pass multiple arguments to a SQL statements with IN clause. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;A glance at the implementation&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;In this example user can search departments using comma separated values as shown in the following diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_CMZrjNwEQhk/TPh9BuL84HI/AAAAAAAACEw/Z9o9DF-TKak/s1600/Array1.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="343" src="http://4.bp.blogspot.com/_CMZrjNwEQhk/TPh9BuL84HI/AAAAAAAACEw/Z9o9DF-TKak/s400/Array1.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Custom Converter for oracle.jbo.domain.Array&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As you can see in the above picture, DepartmentName field in the search panel takes comma separated values. This inputText has a custom converter(view.CustomDomainArrayConverter) added to convert comma delimited values to oracle.jbo.domain.Array. To get a feel of it, please explore the class view.CustomDomainArrayConverter in the sample workspace - attached at the end of this post. &lt;br /&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;af:inputText value=&amp;quot;#{bindings.ArrayOfDeptNames.inputValue}&amp;quot;&lt;br /&gt;        ......&lt;br /&gt;        id=&amp;quot;it1&amp;quot; &amp;gt;&lt;br /&gt;&lt;b&gt;&amp;lt;f:converter converterId=&amp;quot;ArrayConverter&amp;quot;/&amp;gt;&lt;/b&gt;&lt;br /&gt;&amp;lt;/af:inputText&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;ViewCriteria  Definition&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Search part is  implemented using a ViewCriteria where the attribute DepartmentName is mapped to a bind variable operand(ArrayOfDeptNames) of type oracle.jbo.domain.Array. Please take a look at the bind variable 'ArrayOfDeptNames' definition in the following diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_CMZrjNwEQhk/TPiPvh1KnPI/AAAAAAAACE0/etCdZxouqQI/s1600/array2.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://1.bp.blogspot.com/_CMZrjNwEQhk/TPiPvh1KnPI/AAAAAAAACE0/etCdZxouqQI/s400/array2.PNG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;pre style="font-family: Andale Mono, Lucida Console, Monaco, fixed, monospace; color: #000000; background-color: #eee;font-size: 12px;border: 1px dashed #999999;line-height: 14px;padding: 5px; overflow: auto; width: 100%"&gt;&lt;code&gt;&amp;lt;Variable&lt;br /&gt;    Name=&amp;quot;ArrayOfDeptNames&amp;quot;&lt;br /&gt;    Kind=&amp;quot;viewcriteria&amp;quot; &lt;b&gt;ColumnType=&amp;quot;CHARTABLETYPE&amp;quot;&lt;/b&gt;&lt;br /&gt;    Type=&amp;quot;oracle.jbo.domain.Array&amp;quot;&lt;br /&gt;    ElemType=&amp;quot;java.lang.String&amp;quot;&amp;gt;   &lt;br /&gt;&amp;lt;/Variable&amp;gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;The &lt;b&gt;ColumnType="CHARTABLETYPE"&lt;/b&gt; in the above definition is mapped to a custom  database type to hold the value types used in the query. Obviously, to run this sample you may need to have this type defined in your database. &lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;CREATE OR REPLACE TYPE  "CHARTABLETYPE"  as table of varchar2(4000);&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Generating Native SQL for CriteriaItem having Array with IN clause&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;I overrode the &lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e10653/oracle/jbo/server/ViewObjectImpl.html#getCriteriaItemClause_oracle_jbo_ViewCriteriaItem_"&gt;getCriteriaItemClause(ViewCriteriaItem vci)&lt;/a&gt; to generate the native SQL for Array with IN clause. Please see the following code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;@Override&lt;br /&gt;public String getCriteriaItemClause(ViewCriteriaItem vci) {&lt;br /&gt;  if (vci.getAttributeDef().getName().equals("DepartmentName") &amp;amp;&amp;amp;&lt;br /&gt;    vci.getViewCriteria().getName().contains("DepartmentsViewCriteria")) {&lt;br /&gt;    if (vci.getViewCriteria().getRootViewCriteria().isCriteriaForQuery()) {&lt;br /&gt;    return getINClauseForDatabaseUse(vci);&lt;br /&gt;    } else {&lt;br /&gt;    return getINClauseForCache(vci);&lt;br /&gt;    }&lt;br /&gt;  } else {&lt;br /&gt;    return super.getCriteriaItemClause(vci);&lt;br /&gt;  }&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected String getINClauseForDatabaseUse(ViewCriteriaItem vci) {&lt;br /&gt;&lt;br /&gt;  String whereCluase = "1=1";&lt;br /&gt;  if (getArrayOfDeptNames() != null) {&lt;br /&gt;    whereCluase =&lt;br /&gt;        this.getEntityDef(0).getAliasName() + ".DEPARTMENT_NAME IN (SELECT * FROM TABLE(CAST(:ArrayOfDeptNames AS CHARTABLETYPE)))";&lt;br /&gt;  }&lt;br /&gt;  return whereCluase;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;protected String getINClauseForCache(ViewCriteriaItem vci) {&lt;br /&gt;  String whereCluase = "1=1";&lt;br /&gt;  return whereCluase;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Search form used in this example is built by dragging and dropping the  ExecuteWithParams from the Data Control Pallet. DepartmentsViewCriteria, that I explained initially, is mapped to DepartmentsView1 instance in the AppModule.&lt;br /&gt;&lt;br /&gt;The final SQL generated at run time may look like as shown below.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #eeeeee; border: 1px dashed rgb(153, 153, 153); color: black; font-family: Andale Mono,Lucida Console,Monaco,fixed,monospace; font-size: 12px; line-height: 14px; overflow: auto; padding: 5px; width: 100%;"&gt;&lt;code&gt;SELECT Departments.DEPARTMENT_ID,   Departments.DEPARTMENT_NAME, .... Departments WHERE&lt;br /&gt;( ( Departments.DEPARTMENT_NAME IN (SELECT * FROM TABLE(CAST(:ArrayOfDeptNames AS CHARTABLETYPE)))) )&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can &lt;a href="http://adf-samples.googlecode.com/files/JboArraySample.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11g R1 PS2 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How to run this sample?&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;1. Unzip the source to your local drive.&lt;br /&gt;2. Setup the required DB objects in your local schema(HR) by running the &lt;jboarraysample&gt;\select_in_list.sql&lt;br /&gt;3. Run the main.jspx. This page displays query field (which takes comma separated values) and a result table.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4496361440376457974-1434712244883312028?l=jobinesh.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://jobinesh.blogspot.com/feeds/1434712244883312028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=4496361440376457974&amp;postID=1434712244883312028' title='5 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1434712244883312028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4496361440376457974/posts/default/1434712244883312028'/><link rel='alternate' type='text/html' href='http://jobinesh.blogspot.com/2010/12/using-oraclejbodomainarray-with.html' title='Using oracle.jbo.domain.Array  with ViewCriteria'/><author><name>Jobinesh</name><uri>http://www.blogger.com/profile/02803942794714887699</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-AlaqslOncZs/TfblPp2uERI/AAAAAAAACw0/6ILsJZlwZNs/s220/Copy%2Bof%2BDSC00923.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_CMZrjNwEQhk/TPh9BuL84HI/AAAAAAAACEw/Z9o9DF-TKak/s72-c/Array1.PNG' height='72' width='72'/><thr:total>5</thr:total></entry></feed>
