<?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-294172151396534006</id><updated>2012-01-30T05:11:22.083-08:00</updated><category term='JDeveloper'/><category term='ADF BC Validation'/><category term='JDeveloper 11.1.1.4.0'/><category term='JDeveloper 11.1.2.1.0'/><category term='ADF Regions'/><category term='af:switcher'/><category term='OpenOffice and ADF'/><category term='ADF lifeCycle'/><category term='ADF Drag and Drop'/><category term='ADF Master Detail'/><category term='ADF Reusable Code'/><category term='Misc'/><category term='ADF Tree Table'/><category term='JDeveloper 11.1.1.5.0'/><category term='Oracle-XE'/><category term='ADF BC'/><category term='ADF Table'/><category term='ADF Tools'/><category term='Weblogic Server'/><category term='ADF'/><category term='ADF Task Flows'/><title type='text'>Born To DeBug</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>43</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-140913907961173952</id><published>2011-12-17T10:14:00.000-08:00</published><updated>2011-12-17T12:42:46.808-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Task Flows'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><title type='text'>TaskFlow managed  Bean properties.Referring to a Bean instance from another Bean instance  using task flows. ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;In this example we are going to show how to access bean instances from other bean instances using task flows.&lt;br /&gt;Based on a question in the OTN forum:&lt;br /&gt;&lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=2321268&amp;amp;tstart=0"&gt;https://forums.oracle.com/forums/thread.jspa?threadID=2321268&amp;amp;tstart=0&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It might sound a bit strange to some, but task flows can be quite helpful for that matter.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/TaskFlowBeanParametersExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What is the purpose of task flows?&lt;br /&gt;&lt;br /&gt;According to documentation:&lt;br /&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/taskflows.htm#BABFBAFA"&gt;http://docs.oracle.com/cd/E24382_01/web.1112/e16182/taskflows.htm#BABFBAFA&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="italic" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;ADF task flows&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&amp;nbsp;provide a modular approach for defining control flow in a Fusion web application.&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/i&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;Among other things, Task Flows provide the ability to&amp;nbsp;instantiate&amp;nbsp;beans with the appropriate scope.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;According to documentation:&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/web_getstarted.htm#CACCFIII"&gt;http://docs.oracle.com/cd/E24382_01/web.1112/e16182/web_getstarted.htm#CACCFIII&lt;/a&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;i&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small;"&gt;In an application that uses ADF data binding and ADF task flows, managed beans are registered in different configuration files from those used for a standard JSF application. In a standard JSF application, managed beans are registered in the&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;faces-config.xml&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;&amp;nbsp;configuration file. &lt;b&gt;In a Fusion web application, managed beans can be registered in the&amp;nbsp;&lt;/b&gt;&lt;/span&gt;&lt;b&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;faces-config.xml&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;&amp;nbsp;file, the&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;adfc-config.xml&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;&amp;nbsp;file, or a task flow definition file. Which configuration file you use to register a managed bean depends on what will need to access that bean, whether or not it needs to be customized at runtime, what the bean's scope is, and in what order all the beans in the application need to be instantiated.&lt;/span&gt;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;So, basically, this means that, we can declare managed beans with a specific scope per taskFlow.&lt;br /&gt;If you check the documentation's &amp;nbsp;images regarding task flows and managed beans:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/img/tf_mem_scope.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="235" src="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/img/tf_mem_scope.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You will notice that each managed Bean has it's own properties.&lt;br /&gt;&lt;br /&gt;This gives us the ability to create, as&amp;nbsp;declarative&amp;nbsp;as possible, connections between instances of beans.&lt;br /&gt;&lt;br /&gt;This of course needs an understanding of the bean scopes in order to have a proper implementation.&lt;br /&gt;Here is the documentation about scopes&lt;br /&gt;&lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31974/taskflows.htm#CHDFAIGC"&gt;http://docs.oracle.com/cd/E15523_01/web.1111/b31974/taskflows.htm#CHDFAIGC&lt;/a&gt;&lt;br /&gt;&lt;a href="http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adf_lifecycle.htm"&gt;http://docs.oracle.com/cd/E24382_01/web.1112/e16182/adf_lifecycle.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For persistent readers and investigators on bean scopes. Please refer to a very interesting discussion on EMG&lt;br /&gt;&lt;a href="http://groups.google.com/group/adf-methodology/browse_thread/thread/c7427b4b0b69766d"&gt;http://groups.google.com/group/adf-methodology/browse_thread/thread/c7427b4b0b69766d&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Lets move on to our scenario:&lt;br /&gt;For the sake of this example, we are going to create a page template. Inside this page template we are going to place a menuBar with some menus and menuItems.&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/-pNHBMs52pbs/Tut09g8x-nI/AAAAAAAAAoc/Ac6t2RpH5SI/s1600/template.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="http://2.bp.blogspot.com/-pNHBMs52pbs/Tut09g8x-nI/AAAAAAAAAoc/Ac6t2RpH5SI/s320/template.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then we are going to bind some of the menus to a backing bean. of scope &lt;b&gt;View. &lt;/b&gt;&amp;nbsp;Why we want to have it in a View Scope? Well, this is going to be another detailed post about scopes. For now, lets say that we want to keep the binding alive during the life of the page (ViewPort)&lt;br /&gt;We are going to create a new Java Class and we are going to name her ( I prefer to thing of it as a she :) )&lt;br /&gt;&lt;b&gt;TemplateBean. &lt;/b&gt;&amp;nbsp;Then we are going to create bindings to some of the menus:&lt;br /&gt;&lt;br /&gt;templateBean&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/-90X3wywPU8Q/Tut3E4Hl7LI/AAAAAAAAAos/Iu2vhQuEz1I/s1600/TemplateBean.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-90X3wywPU8Q/Tut3E4Hl7LI/AAAAAAAAAos/Iu2vhQuEz1I/s320/TemplateBean.JPG" width="206" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;template page:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-EvntdxfJ2ts/Tuz1aLz8aLI/AAAAAAAAApw/TiCp1d3TaMA/s1600/menuBindings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://4.bp.blogspot.com/-EvntdxfJ2ts/Tuz1aLz8aLI/AAAAAAAAApw/TiCp1d3TaMA/s400/menuBindings.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At this point, if we check our adfc-config.xml file we will see that the appropriate entry of the bean is written:&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/-ZRoXkTjMHvs/Tuz12T89jBI/AAAAAAAAAp4/T7UDrLPwrb4/s1600/templateBeanADFCConfig.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="81" src="http://3.bp.blogspot.com/-ZRoXkTjMHvs/Tuz12T89jBI/AAAAAAAAAp4/T7UDrLPwrb4/s320/templateBeanADFCConfig.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next, we are going to create a taskflow and a page inside it. That page is going to use the previously mentioned template.&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/-ptaYynAwnI8/TuzQbz3BIpI/AAAAAAAAAo4/6C9QLq8j2ng/s1600/TaskFlowWithPage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="151" src="http://3.bp.blogspot.com/-ptaYynAwnI8/TuzQbz3BIpI/AAAAAAAAAo4/6C9QLq8j2ng/s320/TaskFlowWithPage.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Creating the page based on the previously created template:&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/-1uk67c7sBrc/TuzRDKocDGI/AAAAAAAAApA/Blu4WLh8Kow/s1600/createPageBasedOnTemplate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="236" src="http://1.bp.blogspot.com/-1uk67c7sBrc/TuzRDKocDGI/AAAAAAAAApA/Blu4WLh8Kow/s320/createPageBasedOnTemplate.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are going to use the HR Schema for this example and the Employees table. We will generate the appropriate BC with the wizard of JDeveloper:&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/-iSlX0_x1Ffk/TuzRy1OUSII/AAAAAAAAApI/w5lCO6ziEwk/s1600/BC.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://4.bp.blogspot.com/-iSlX0_x1Ffk/TuzRy1OUSII/AAAAAAAAApI/w5lCO6ziEwk/s320/BC.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Up to now, we have completed the following:&lt;br /&gt;&lt;br /&gt;1) Generated the Business Components.&lt;br /&gt;&lt;br /&gt;2) Created a page template with some menus and menu items and binded some menus with a backing bean with scope of type &lt;b&gt;View.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;3) Created a task flow and a page in it that is using this template.&lt;br /&gt;&lt;br /&gt;In the new page we are going to drag and drop the employees iterator to the page as a form:&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/-GrmjxwB_lJ0/TuzUFrKWBGI/AAAAAAAAApQ/p_WmRSOy7_Y/s1600/DragNDropAsForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="245" src="http://3.bp.blogspot.com/-GrmjxwB_lJ0/TuzUFrKWBGI/AAAAAAAAApQ/p_WmRSOy7_Y/s320/DragNDropAsForm.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;There is an additional button with the rollback operation as you will see in the above picture.&lt;br /&gt;This is added during the making of the sample application.&lt;br /&gt;&lt;br /&gt;For this example application, we are going to have the following logic:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;When the user changes the salary of an employee, menu1 will be disabled if the new value is greater than 100. if the value is lower or equal to 100.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;NOTE&lt;/b&gt;: For the simplicity of this example we are going to have the menus enabled during query. The above scenario will take place only when changing values. This might not seem a real case scenario but the goal is to demonstrate the features of taks flows and their injection of bean instances to other instances.&lt;br /&gt;&lt;br /&gt;Now, lets think about our case a bit... We have a template with some menus.. This template.. well is a template.. and for that reason it can be used in many cases and pages.. So it is not wise to bind it with a specific use case right? We have to keep the template menus loose and adaptive to any page..&lt;br /&gt;We already have bindings to &amp;nbsp;a backing bean of those menus... Why not use them then?&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are going to create a value change listener method for the salary attribute of our page:&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/-sINUJxHKe90/TuzhU1j1HnI/AAAAAAAAApY/rIEgddT6cU0/s1600/CreateVCL.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://2.bp.blogspot.com/-sINUJxHKe90/TuzhU1j1HnI/AAAAAAAAApY/rIEgddT6cU0/s320/CreateVCL.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;With the help of the wizard, we crated a managed bean with the Value Change Listener method for the salary attribute.&lt;br /&gt;&lt;br /&gt;If we check the task flow properties now, we will see that there is a new entry there:&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/-f4vl0jUJy0A/Tuz3Pr8PdFI/AAAAAAAAAqA/mstAl2peMao/s1600/rewuestBEanOnTaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="120" src="http://1.bp.blogspot.com/-f4vl0jUJy0A/Tuz3Pr8PdFI/AAAAAAAAAqA/mstAl2peMao/s320/rewuestBEanOnTaskFlow.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;According to our scenario, we want to check the value of the salary attribute and disable the menu1 which resides in the template we created previously.&lt;br /&gt;&lt;br /&gt;And here comes the magic.. All we have to do is to create a property in the bean of the page with the same type as the template bean, implement our logic and make the appropriate reference in the task flow...&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/-9GtPxdoGOsg/TuzwhuFcePI/AAAAAAAAApg/GC5DHlaupwQ/s1600/requestBean.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="167" src="http://2.bp.blogspot.com/-9GtPxdoGOsg/TuzwhuFcePI/AAAAAAAAApg/GC5DHlaupwQ/s320/requestBean.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Lets implement our Value Change Listener logic:&lt;br /&gt;&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/--2d1jmIq_gg/Tuz0gXaT_wI/AAAAAAAAApo/UiX5m1c4po4/s1600/salaryVCL.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="396" src="http://3.bp.blogspot.com/--2d1jmIq_gg/Tuz0gXaT_wI/AAAAAAAAApo/UiX5m1c4po4/s640/salaryVCL.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The only thing left now, is to &lt;b&gt;reference&lt;/b&gt; to the appropriate TemplateBean instance.&lt;br /&gt;This can be easily done in our 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/-MTcSQE7muJI/Tuz6y1X3nzI/AAAAAAAAAqI/0g61QoMoq0k/s1600/taskFlowInitiation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="156" src="http://3.bp.blogspot.com/-MTcSQE7muJI/Tuz6y1X3nzI/AAAAAAAAAqI/0g61QoMoq0k/s640/taskFlowInitiation.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see from the above picture, we create another managed Bean in our task flow. The one for the &amp;nbsp;templateBean.&lt;br /&gt;Then, after selecting the aRequestBean, we created a new property and placed the correct name of the property, class and the instance we want to use.&lt;br /&gt;&lt;br /&gt;Everything else will be handled by the framework.&lt;br /&gt;&lt;br /&gt;It doesnt get more declarative than this!&lt;br /&gt;&lt;br /&gt;And that is it!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/TaskFlowBeanParametersExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-140913907961173952?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/140913907961173952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/12/taskflow-managed-bean.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/140913907961173952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/140913907961173952'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/12/taskflow-managed-bean.html' title='TaskFlow managed  Bean properties.Referring to a Bean instance from another Bean instance  using task flows. ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-pNHBMs52pbs/Tut09g8x-nI/AAAAAAAAAoc/Ac6t2RpH5SI/s72-c/template.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-4071103904150126176</id><published>2011-12-13T05:10:00.000-08:00</published><updated>2011-12-13T05:50:03.931-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF lifeCycle'/><title type='text'>Validator or ValueChangeListener. ADF 11g lifeCycle</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is an example that will demonstrate the lifeCycle phases involved with &lt;b&gt;validations &lt;/b&gt;and &lt;b&gt;ValueChangeEvents&lt;/b&gt;.&lt;br /&gt;There is some confusion on which is triggered first and when they are triggered.&lt;br /&gt;This post will try to clear things a bit.&lt;br /&gt;Even though the documentation is sufficient enough, this post will work as a helper by pointing only the important elements in order to understand the process as a general concept.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ValidatorOrValidationExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;According to the documentation:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm"&gt;http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Validations should fire first and then ValueChangeEvents should be issued:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/gs_lifecycle.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" oda="true" src="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/gs_lifecycle.gif" width="293" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The two important phases in our case are :&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Apply Request Values&lt;/strong&gt; and &lt;strong&gt;Process Validations&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;According to Documentation:&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=294172151396534006" id="sthref227" name="sthref227"&gt;&lt;/a&gt;&lt;strong&gt;Apply Request Values&lt;/strong&gt;: Each component in the tree extracts new values from the request parameters (using its decode method) and stores the values locally. Most associated events are queued for later processing. If a component has its &lt;code&gt;immediate&lt;/code&gt; attribute set to &lt;code&gt;true&lt;/code&gt;, then the validation, the conversion, and &lt;a href="http://www.blogger.com/blogger.g?blogID=294172151396534006" id="sthref228" name="sthref228"&gt;&lt;/a&gt;the events associated with the component are processed during this phase. For more information, see &lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_lifecycle.htm#CIACBJCJ"&gt;Section 4.2, "Using the Immediate Attribute."&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;li&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=294172151396534006" id="sthref229" name="sthref229"&gt;&lt;/a&gt;&lt;strong&gt;Process Validations&lt;/strong&gt;: Local values of components are converted from the input type to the underlying data type. If the converter fails, this phase continues to completion (all remaining converters, validators, and required checks are run), but at completion, the lifecycle jumps to the Render Response phase.&lt;br /&gt;If there are no failures, the &lt;code&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=294172151396534006" id="sthref230" name="sthref230"&gt;&lt;/a&gt;required&lt;/code&gt; attribute on the component is checked. If the value is &lt;code&gt;true&lt;/code&gt;, and the associated field contains a value, then any associated validators are run. If the value is &lt;code&gt;true&lt;/code&gt; and there is no field value, this phase completes (all remaining validators are executed), but the lifecycle jumps to the Render Response phase. If the value is &lt;code&gt;false&lt;/code&gt;, the phase completes, unless no value is entered, in which case no validation is run. For more information about conversion and validation, see &lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/af_validate.htm#CIAJCIFG"&gt;Chapter 6, "Validating and Converting Input."&lt;/a&gt;&lt;/li&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;What we understand here is that, for input components, by default, the &lt;strong&gt;validations&lt;/strong&gt; are going to be fired in the &lt;strong&gt;Process Validations&lt;/strong&gt; phase. Furthermore, they have a specific order:&lt;br /&gt;&lt;br /&gt;1)&amp;nbsp; converters&lt;br /&gt;2)&amp;nbsp; required checks (check if it is required)&lt;br /&gt;3)&amp;nbsp; validators&lt;br /&gt;&lt;br /&gt;NOTE: Of course there are some other cases were the required checks are not fired.. but the above is the general idea.&lt;br /&gt;&lt;br /&gt;As you may have noticed, in the &lt;strong&gt;Apply Request Values&lt;/strong&gt; phase, it is mentioned that if the component has it's &lt;strong&gt;immediate&lt;/strong&gt; property to &lt;strong&gt;true, &lt;/strong&gt;then the validations will take place in tha phase. &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Which means, that they are not skipped.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;What we understand here is that &lt;strong&gt;validations will fire no matter if the component is immediate =true or not&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;But when does the ValueChangeEvent is triggered?&lt;br /&gt;&lt;br /&gt;Again, according to the documentation:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/lc_example.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" oda="true" src="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/lc_example.png" width="219" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;ValueChangeEvent is an intermediate phase between Process Validations and and updae model Values.&lt;br /&gt;&lt;br /&gt;This means that ValueChangeListener are invoked right after validations. It does not matter if the component is immediate true or not. &lt;br /&gt;&lt;br /&gt;The difference lays in the phase those operations will be executed.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The case of the &lt;strong&gt;commandButton&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;CommandButtons will trigger the validations and valueChangelisteners of inputComponent while pressed. It is the same case weither the the button is partialSubmit and the inputComponent partialTriggered by the button, or the button is not partialSubmit.&lt;br /&gt;&lt;br /&gt;If we set the commandButton to immediate true, then some phases are skipped:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/lc_immaction.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="256" src="http://docs.oracle.com/cd/E15523_01/web.1111/b31973/img/lc_immaction.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;According to documentation&lt;/i&gt;:&lt;br /&gt;&lt;br /&gt;&lt;blockquote class="tr_bq"&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&amp;nbsp;When&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;actionSource&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;&amp;nbsp;c&lt;/span&gt;&lt;a href="" id="sthref237" name="sthref237" style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; text-align: -webkit-auto;"&gt;&lt;/a&gt;&lt;a href="" id="sthref238" name="sthref238" style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; text-align: -webkit-auto;"&gt;&lt;/a&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;omponents (such as a&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;commandButton&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;) are set to&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;immediate&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;, events are delivered in the Apply Request Values phase instead of in the Invoke Application phase. The&amp;nbsp;&lt;/span&gt;&lt;code style="background-color: white; font-size: 12px; text-align: -webkit-auto;"&gt;actionListener&lt;/code&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; text-align: -webkit-auto;"&gt;&amp;nbsp;handler then calls the Render Response phase, and the validation and model update phases are skipped.&lt;/span&gt;&lt;/blockquote&gt;&lt;br /&gt;This means that if the button is set to immediate only the &lt;b&gt;ApplyRequestValues &lt;/b&gt;phase will be &lt;b&gt;invoked&lt;/b&gt;, the &lt;b&gt;Process Validations&lt;/b&gt; phase will be &lt;b&gt;skipped&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;So, if we will have a &lt;b&gt;selectOneChoice &lt;/b&gt;component with &lt;b&gt;autoSubmit=false&lt;/b&gt; and &lt;b&gt;immediate=false &lt;/b&gt;and a &lt;b&gt;commandButton &lt;/b&gt;with &lt;b&gt;immediate=true.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;According to what we know so far, the commandButton will invoke the &lt;b&gt;ApplyRequestValues &lt;/b&gt;phase and then render response phase. Our selectOneChoise, will invoke the &lt;b&gt;validation&lt;/b&gt; and &lt;b&gt;ValueChangeListener &lt;/b&gt;in the &lt;b&gt;Process Validations&lt;/b&gt; phase.. which in our case, &lt;b&gt;will not be invoked&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;So we are bypassing everything...&lt;br /&gt;&lt;br /&gt;I&lt;i&gt;f we want to invoke validators and valueChangeListeners while having the button immediate=true, we will have to have the selectOneChoice to immediate=true as well!&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&amp;nbsp;why? simply because, according to documentation, while having the input component immediate=true, all &lt;b&gt;validators and valuChangeListeners will be shifted to ApplyRequestValues. &lt;/b&gt;Which is exactly what we want.&lt;br /&gt;&lt;br /&gt;Conclusion: Validators are executed before ValueChangeListeners. They are &lt;b&gt;executed even if the input component is immediate=true.&lt;/b&gt;&amp;nbsp;The only change is the &lt;b&gt;which phase they will be executed in.&lt;/b&gt;&lt;br /&gt;The combination of commandButton can bypass he validations and valuechangelisteners if it set to immediate=true. We can still have &lt;b&gt;validations &lt;/b&gt;and &lt;b&gt;valueChangeListeners triggered &lt;/b&gt;if we have the i&lt;b&gt;nputComponent to immediate=true&lt;/b&gt;. Since the validations and ValueChangelisteners will be triggered in a different phase and more specifically, they will be triggered in the &lt;b&gt;ApplyRequestValues &lt;/b&gt;phase.&lt;br /&gt;&lt;br /&gt;Well, this is it. &amp;nbsp;Of Course we could continue investigating more programmatic ways and workarounds but this would be out of the scope of this post&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ValidatorOrValidationExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-4071103904150126176?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/4071103904150126176/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/12/validator-or-valuechangelistener-adf.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4071103904150126176'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4071103904150126176'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/12/validator-or-valuechangelistener-adf.html' title='Validator or ValueChangeListener. ADF 11g lifeCycle'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3741648774050480377</id><published>2011-12-08T06:22:00.001-08:00</published><updated>2011-12-08T07:31:09.456-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.1.5.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC'/><title type='text'>Create Description Attribute of an LOV Attribute. Using Reference Entities. ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;In this example we are going to create a simple LOV and we are going to have an additional attribute as the description of that LOV.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/LOVDescriptionExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;In more detail, we are going to use two entities in one View Object. The first entity will be our updatable entity. The second entity is going to be the reference Entity. The role of the second entity is to provide a description of the id if the first entity.&lt;br /&gt;&lt;br /&gt;So, basically we are going to have an LOV which will display meaningles ids and another attribute from another entity that will display the description of that id. The description will be a meaningfull message to the user.&lt;br /&gt;For this example we are going to use the HR Schema and the following tables:&lt;br /&gt;&lt;br /&gt;Locations,&lt;br /&gt;Countries.&lt;br /&gt;&lt;br /&gt;We want to show a form of Locations and we want to have the Country Id from an LOV.&lt;br /&gt;&lt;br /&gt;First we will create the Business Components with the wizard of JDeveloper.&lt;br /&gt;&lt;br /&gt;This will produce us all the BC:&lt;br /&gt;&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/-UVa1GSDgu10/TuDPD0frr1I/AAAAAAAAAm0/rtGehAQT-dk/s1600/BC.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" mda="true" src="http://3.bp.blogspot.com/-UVa1GSDgu10/TuDPD0frr1I/AAAAAAAAAm0/rtGehAQT-dk/s320/BC.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We simply left the Location View Object only. We removed all other views in the Application module.&lt;br /&gt;We want to show the Country name for the corresponding Country Id.&lt;br /&gt;Additionally we want to have the CountryId as an LOV.&lt;br /&gt;Lets Create the LOV&lt;br /&gt;&lt;br /&gt;First, we locate the attribute we want, CountryId in our case in the LocationsView vo and we press the&amp;nbsp; plus sign in the LOV section. On the new window, we press the plus sign again in order to set the List Data Source. In the new window(again) we shuttle on the right the CountriesView vo and we press ok:&lt;br /&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/-jwUAI-VvogY/TuDPz8oisTI/AAAAAAAAAm8/FZgSQmQzWbM/s1600/createLOV1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="169" mda="true" src="http://4.bp.blogspot.com/-jwUAI-VvogY/TuDPz8oisTI/AAAAAAAAAm8/FZgSQmQzWbM/s320/createLOV1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Next, we have to map the attributes we want to associate:&lt;br /&gt;&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/-oHtuASgOXlw/TuDQvWqqc5I/AAAAAAAAAnE/0zQluZzcLvA/s1600/returnAttribute.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="293" mda="true" src="http://3.bp.blogspot.com/-oHtuASgOXlw/TuDQvWqqc5I/AAAAAAAAAnE/0zQluZzcLvA/s320/returnAttribute.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Last but not list, is the apperance of the&amp;nbsp; List of the Values. We select the UI Hints in the same window and we shuttle the attributes we want to have them displayed in the list of values. Additionally, we set the type of the List to Input Text with List of Values.&lt;br /&gt;&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/-OtIxE_uCzkM/TuDQ_M7WN0I/AAAAAAAAAnM/cgKxYzWvTq4/s1600/UIHints.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="317" mda="true" src="http://2.bp.blogspot.com/-OtIxE_uCzkM/TuDQ_M7WN0I/AAAAAAAAAnM/cgKxYzWvTq4/s320/UIHints.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And that is about it. our lov is created. The next step is to associate our Locations entity with our Countries entities in the Same viewObject, the LocationsView.&lt;br /&gt;We go to LocationsView and more specifically in the&amp;nbsp;Data&amp;nbsp;Model. We shuttle the Countries entity to&amp;nbsp;the right&amp;nbsp;and we will see that&amp;nbsp;the association is applied immediatelly.&amp;nbsp;We select the join to be&amp;nbsp;outer join just in the case of no data.&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/-yPtNp4i-kIE/TuDRw6ePQHI/AAAAAAAAAnU/V1aTWUPE0iU/s1600/entityRef.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="129" mda="true" src="http://3.bp.blogspot.com/-yPtNp4i-kIE/TuDRw6ePQHI/AAAAAAAAAnU/V1aTWUPE0iU/s320/entityRef.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now that we have our entity, we are going to shuttle our desired attribute, which is the CountryName. Now that we have added the Countries entity we can shuttle CountryName from that entity. If we havent done that, we would not be able to show this attribute in the LocationsView.&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/-7JH-D39xuF8/TuDTBSP5K_I/AAAAAAAAAnc/AleWPXZqKQ4/s1600/AddNewAttributeFromEntity.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="121" mda="true" src="http://2.bp.blogspot.com/-7JH-D39xuF8/TuDTBSP5K_I/AAAAAAAAAnc/AleWPXZqKQ4/s320/AddNewAttributeFromEntity.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&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/-EEc_dWXjLfE/TuDTGZgGIAI/AAAAAAAAAnk/rzVfAv0kgiQ/s1600/ShuttleAttributes.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" mda="true" src="http://4.bp.blogspot.com/-EEc_dWXjLfE/TuDTGZgGIAI/AAAAAAAAAnk/rzVfAv0kgiQ/s320/ShuttleAttributes.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;And we press OK.&lt;br /&gt;As you might have noticed above, we shuttled only one attribute, the CountryName and the PK is additionally shuttled. This is needed because the framework needs to update the association for every new value in the main CountryId from the Locations Entity.&lt;br /&gt;&lt;br /&gt;From the BC point of view, all&amp;nbsp; the mandatory steps are done. &lt;br /&gt;Off to create our jspx!&lt;br /&gt;For this example we are going to create a simple jspx form to our unbounded task flow. We are simply going to drag and drop our LocationsView iterator from the datacontrol to our jspx as a form:&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/-G9iBSfmeSgw/TuDULS2Qv2I/AAAAAAAAAn0/4v4WMSLgWRw/s1600/dragAndDropForm.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" mda="true" src="http://3.bp.blogspot.com/-G9iBSfmeSgw/TuDULS2Qv2I/AAAAAAAAAn0/4v4WMSLgWRw/s320/dragAndDropForm.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the new window we are going to select the attributes that we want to display in our form. As you will see in the wizard, we will have the additiona CountryId1 attribute from the reference entity. we will remove that because we dont want to have duplicate components. &lt;br /&gt;NOTE: we could prevent this in the BC layer and the Display Hint attribute. The scope of this example is simply illustrative and aims to demonstrate the description functionality.&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/-vBWoG_9RvHg/TuDVY50D1VI/AAAAAAAAAn8/0lkY8qYnYZE/s1600/FormAttributes.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="283" mda="true" src="http://2.bp.blogspot.com/-vBWoG_9RvHg/TuDVY50D1VI/AAAAAAAAAn8/0lkY8qYnYZE/s320/FormAttributes.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As you see, we have the CountryId1 attribute to be displayed. We simply select it and press the red x button to remove it from the list. Another important think to notice here is that the wizard understood from the BC that the type of the List for the CountryId is List of Values and immediatelly converts it to the corresponding component.&lt;br /&gt;We press OK and after adding some additional buttons with operations we have our form.&lt;br /&gt;&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/-eFqHUGVkD9c/TuDWhzgv8ZI/AAAAAAAAAoE/tyPP1ShUWdM/s1600/FormAttrsPage.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" mda="true" src="http://2.bp.blogspot.com/-eFqHUGVkD9c/TuDWhzgv8ZI/AAAAAAAAAoE/tyPP1ShUWdM/s320/FormAttrsPage.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;But we are not quite there... a few adjustments left.&lt;br /&gt;In order to properly display the CountryName in every change of the CountryId we have to make the CountryId LOV to AutoSubmit=true and place partialTriggers to the CountryName. The partial Trigger will be the id of the CountryId LOV component.&lt;br /&gt;&lt;br /&gt;AutoSubmit:&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/-sKLdz4c-bBM/TuDW2sWtGNI/AAAAAAAAAoM/YhIFpCSP3lo/s1600/lovAutoSubmit.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" mda="true" src="http://4.bp.blogspot.com/-sKLdz4c-bBM/TuDW2sWtGNI/AAAAAAAAAoM/YhIFpCSP3lo/s320/lovAutoSubmit.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;PartialTriggers:&lt;br /&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/-xF_dSm7jjuU/TuDW7B6QLhI/AAAAAAAAAoU/eMCyRxWdhaA/s1600/partialTriger.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="214" mda="true" src="http://4.bp.blogspot.com/-xF_dSm7jjuU/TuDW7B6QLhI/AAAAAAAAAoU/eMCyRxWdhaA/s320/partialTriger.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And That is it!&lt;br /&gt;Every time we change value in our CountryId the CountryName will be updated accordingly.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/LOVDescriptionExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-3741648774050480377?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3741648774050480377/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/12/create-description-attribute-of-lov.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3741648774050480377'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3741648774050480377'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/12/create-description-attribute-of-lov.html' title='Create Description Attribute of an LOV Attribute. Using Reference Entities. ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-UVa1GSDgu10/TuDPD0frr1I/AAAAAAAAAm0/rtGehAQT-dk/s72-c/BC.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5031863129018102918</id><published>2011-11-23T03:36:00.001-08:00</published><updated>2011-11-23T04:09:43.604-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Programmatically create new row of View Object in Application Module. ADF bc 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;this is yet another example of showing hwo to create a new row of view object in an Application Module method.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowOnApplicationModule.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We will use the Departments table of the HR Schema in this example.&lt;br /&gt;First we are generating the BC through the JDeveloper wizard.&lt;br /&gt;&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/-gmpfHnsIL_4/TszdO5I9yaI/AAAAAAAAAlc/5ULIc2pWaEA/s1600/bc.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="99" src="http://1.bp.blogspot.com/-gmpfHnsIL_4/TszdO5I9yaI/AAAAAAAAAlc/5ULIc2pWaEA/s320/bc.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then, we generate the java class of the Application Module:&lt;br /&gt;&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/-_GCQPY8B3DM/TszdnbDm0PI/AAAAAAAAAlk/sQA0N3SrWyQ/s1600/createjavaAM.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="113" src="http://2.bp.blogspot.com/-_GCQPY8B3DM/TszdnbDm0PI/AAAAAAAAAlk/sQA0N3SrWyQ/s320/createjavaAM.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Inside the java class we place the following code:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-dtFIrIM9I_U/Tszd-bMJU-I/AAAAAAAAAl0/1LyLXahKRoU/s1600/code.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="252" src="http://2.bp.blogspot.com/-dtFIrIM9I_U/Tszd-bMJU-I/AAAAAAAAAl0/1LyLXahKRoU/s320/code.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The usage of this method varies.. In this example we are going to use page button in a page.&lt;br /&gt;&lt;br /&gt;We have to do one more thing for that, expose our method in the client interface of the Application Module:&lt;br /&gt;We go to the java section of the Application module and we press the pencil icon in the client panel:&lt;br /&gt;In the new window, we select our method and shuttle it to right panel:&lt;br /&gt;&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/-P-P7zy_LYkU/TszgzEah2_I/AAAAAAAAAmk/-T-JnGe1jss/s1600/expose.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="210" src="http://1.bp.blogspot.com/-P-P7zy_LYkU/TszgzEah2_I/AAAAAAAAAmk/-T-JnGe1jss/s320/expose.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;For that we create a page in our unbounded task flow:&lt;br /&gt;&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/-ECUJAuWQH9s/TszedtGo_PI/AAAAAAAAAl8/iiYpTuCajkE/s1600/dropPage.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="84" src="http://3.bp.blogspot.com/-ECUJAuWQH9s/TszedtGo_PI/AAAAAAAAAl8/iiYpTuCajkE/s320/dropPage.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then we double click on the page, this will show us a wizard to help us create the page. This happens the first time only, the time that we want to actually generate the page.&lt;br /&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/-YcSdARwYp1M/Tsze3HxOzyI/AAAAAAAAAmE/C58k1HE5zbc/s1600/createpage.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="218" src="http://4.bp.blogspot.com/-YcSdARwYp1M/Tsze3HxOzyI/AAAAAAAAAmE/C58k1HE5zbc/s320/createpage.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In this example, we are going to use a jspx..&lt;br /&gt;&lt;br /&gt;Then, from the dataControls, we are draging and droping the DepartmentsView onto the page as a form:&lt;br /&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/-xECeWDQ7_MQ/TszfZB9varI/AAAAAAAAAmM/-tEjsCoGAwI/s1600/dropControls.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="161" src="http://4.bp.blogspot.com/-xECeWDQ7_MQ/TszfZB9varI/AAAAAAAAAmM/-tEjsCoGAwI/s320/dropControls.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;we just accept the default options from the wizard:&lt;br /&gt;&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/-maS7eangHP8/TszftxXM5gI/AAAAAAAAAmU/VH4L7ilqS6U/s1600/generateForm.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="234" src="http://1.bp.blogspot.com/-maS7eangHP8/TszftxXM5gI/AAAAAAAAAmU/VH4L7ilqS6U/s320/generateForm.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;and press ok. The result looks something like this:&lt;br /&gt;&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/-WJLFtHve62I/TszgHUFbv7I/AAAAAAAAAmc/NcWBBK_3yOk/s1600/newDeptForm.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="157" src="http://3.bp.blogspot.com/-WJLFtHve62I/TszgHUFbv7I/AAAAAAAAAmc/NcWBBK_3yOk/s320/newDeptForm.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, what we want to create a button that will call our Application Module method.&lt;br /&gt;All we have to do is to drag and drop our&amp;nbsp; method from the dataControl and select&amp;nbsp; ADF&amp;nbsp; Button:&lt;br /&gt;&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/-uVHdB-lxgWI/TszhQg99rzI/AAAAAAAAAms/lG5JWOsb68w/s1600/createAMMethodASButton.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="174" src="http://1.bp.blogspot.com/-uVHdB-lxgWI/TszhQg99rzI/AAAAAAAAAms/lG5JWOsb68w/s320/createAMMethodASButton.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And That is it.&lt;br /&gt;If we run the page now, and press the button a new row will be shown.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowOnApplicationModule.zip"&gt;Download Sample Application.&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/294172151396534006-5031863129018102918?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5031863129018102918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/programmatically-create-new-row-of-view.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5031863129018102918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5031863129018102918'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/programmatically-create-new-row-of-view.html' title='Programmatically create new row of View Object in Application Module. ADF bc 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-gmpfHnsIL_4/TszdO5I9yaI/AAAAAAAAAlc/5ULIc2pWaEA/s72-c/bc.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-6923776520269136378</id><published>2011-11-18T07:09:00.000-08:00</published><updated>2011-11-18T07:09:34.083-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Tree Table'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Master-Detail-Detail. Using Tree Table and Table. Using Target Data Source featrue. ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi, &lt;br /&gt;This is an example demonstrating the usage of treeTable and table of ADF all together.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailDetailTreeTableAndTableExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We are going to use the HR Schema and more specifically the following tables:&lt;br /&gt;Departmens,&lt;br /&gt;Employees,&lt;br /&gt;EmployeesViewDetails.&lt;br /&gt;&lt;br /&gt;Departments and Employees are going to be the Master detail that will be displayed in the Tree Table&lt;br /&gt;the EmployeesViewDetails will be the detail table shown below the tree Table.&lt;br /&gt;&lt;br /&gt;After generating the appropriate Business Components through JDeveloper wizard, we are going to create an additional association and a viewLink.&lt;br /&gt;Because the EmployeesViewDetails is a database view, the associations are not provided by JDeveloper wizard.&lt;br /&gt;Furthermore, we are changing the the Primary Key of the EmployeesViewDetails from RowId to EmployeeId.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Association:&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/-YrZxq6uyi9k/TsJHlq6OomI/AAAAAAAAAfA/mUOTs3GD1qo/s1600/CreateAssociation.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" nda="true" src="http://2.bp.blogspot.com/-YrZxq6uyi9k/TsJHlq6OomI/AAAAAAAAAfA/mUOTs3GD1qo/s320/CreateAssociation.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;ViewLink based on that association:&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/-BnG6hY4M47Q/TsJHrtBS41I/AAAAAAAAAfI/Rl9O8Z2gd2g/s1600/CreateViewLink.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" nda="true" src="http://3.bp.blogspot.com/-BnG6hY4M47Q/TsJHrtBS41I/AAAAAAAAAfI/Rl9O8Z2gd2g/s320/CreateViewLink.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Finally we reach to a point where we will create the Application Module hierarchy:&lt;br /&gt;This is the tricky part. at this point, we have to understand two things:&lt;br /&gt;&lt;b&gt;One&lt;/b&gt;, we are going to use the &lt;b&gt;Target Data Source feature&lt;/b&gt;. This feature according to the following documents&lt;br /&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/master-detail-moredetail-154767.html"&gt;http://www.oracle.com/technetwork/developer-tools/adf/master-detail-moredetail-154767.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf"&gt;http://www.oracle.com/technetwork/developer-tools/adf/learnmore/sept2011-otn-harvest-508189.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;needs to point value that corresponds to a key of the other iterator..&lt;br /&gt;Additionally the JDeveloper documentation for this feature says:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-YDvbIV56VVQ/TsZdbbjHhaI/AAAAAAAAAjg/VsBD4Wyl1II/s1600/documentation.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="25" src="http://2.bp.blogspot.com/-YDvbIV56VVQ/TsZdbbjHhaI/AAAAAAAAAjg/VsBD4Wyl1II/s320/documentation.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;So, what we have to do is to point the right value to the right Key..&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Two&lt;/b&gt;, Our hierarchy is&lt;b&gt; not going to be the following&lt;/b&gt;:&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/-A-r9m0r-meo/TsJH0YmPbiI/AAAAAAAAAfQ/R5MIfny78co/s1600/AMBCHierarchy.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="156" nda="true" src="http://3.bp.blogspot.com/-A-r9m0r-meo/TsJH0YmPbiI/AAAAAAAAAfQ/R5MIfny78co/s320/AMBCHierarchy.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Is going to be the following:&lt;/b&gt;&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/-H_vzRaZYjVc/TsZekEPeTVI/AAAAAAAAAjo/FD3juBBj6jA/s1600/newHierarchy.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="130" src="http://1.bp.blogspot.com/-H_vzRaZYjVc/TsZekEPeTVI/AAAAAAAAAjo/FD3juBBj6jA/s320/newHierarchy.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, why is that???&lt;br /&gt;Simply because, we want to use the &lt;b&gt;target Data Source&lt;/b&gt; feature, and for that reason, we need to map the same key attributes.&lt;br /&gt;Further more, we do not want to show the details on our tree.... We just want to show it on a separate table.&lt;br /&gt;&lt;br /&gt;The concept is simple: We have to have the same keys to synchronize properly.&lt;br /&gt;Now, to our case, apparently, we cannot synchronize Employees and EmployeesViewDetails directly, for the simplest reason that we are on a master-detail-detail situation...&lt;br /&gt;&lt;br /&gt;In fact, our example is a very special case, because it is a pure coincidence that Employees and EmployeeViewDetails have the same attribute as a primary key.&lt;br /&gt;&lt;br /&gt;According to documentation, a draft and general explanation would be the following:&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;the targeted Data Source iterator, will find a row where it's key value is the same as the key value of the selected row of the iterator that invokes the target Data Source iterator and will set this row to current.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;well, reading it again, it is not simple at all!! :D&lt;br /&gt;ok lets try again...&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;The targeted iterator will simply search for a row in the list and make it current.&amp;nbsp;&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;The key of that row, will have the same value as the key of the selected row in the tree.&lt;/b&gt;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;hmm... still not good..&lt;br /&gt;&lt;br /&gt;&lt;i&gt;The iterator that uses the &lt;b&gt;target Data Source&amp;nbsp; &lt;/b&gt;feature, will force the specified iterator to find a row with the same key value as the previous one.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;I give up.... :D&lt;br /&gt;Well, so if we had just added the EmployeesViewDetail without having it as a detail under Employees... we should have seen all employees and every time we selected an employee, the employeesViewDetail table would simply change the current row.&lt;br /&gt;And of course, we do not want that..&lt;br /&gt;So, the best approach is the one showed in the screen.&lt;br /&gt;Why? Well, when we select an employee from the tree, the target Data Source feature will invoke the other employees iterator, which in turn will invoke the employeesViewDetails iterator to refresh because, after all, it is a detail right?..&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Next, we are going to Create our page.&lt;br /&gt;First, we will create a task flow and a jspx on it.&lt;br /&gt;Onto jspx, we drag and drop the departments Iterator from the dataControl and we select, &lt;b&gt;treeTable&lt;/b&gt;.&lt;br /&gt;Then, we add a rule for the Employees as shown in the Screen below.&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/-4AdqsvYDAgk/TsZpucMms0I/AAAAAAAAAjw/UGeR7vDzfPw/s1600/iteratorHierarchy.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-4AdqsvYDAgk/TsZpucMms0I/AAAAAAAAAjw/UGeR7vDzfPw/s320/iteratorHierarchy.JPG" width="264" /&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;br /&gt;For Departments rule, we shuttle DepartmentId and Department Name attributes.&lt;br /&gt;For Employees rule, we shuttle EmployeesId, firstName and lastName.&lt;br /&gt;Next, we surround our treeTable with a panelCollection.&amp;nbsp; We Simply right click on the tree table component and we select panelCollection.&lt;br /&gt;&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/-XEezGODcC68/TsJKeBcVtQI/AAAAAAAAAfg/QrJ9sjkrwLk/s1600/suroundWithpanelCollection.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="167" nda="true" src="http://2.bp.blogspot.com/-XEezGODcC68/TsJKeBcVtQI/AAAAAAAAAfg/QrJ9sjkrwLk/s320/suroundWithpanelCollection.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Since treeTable component, does not create other than the node column, we will create them ourselves.&lt;br /&gt;&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/-e4cZwIXWWSs/TsJMrE9SHvI/AAAAAAAAAfo/J_FuzRTjXRs/s1600/addColumnsOntreeTable.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" nda="true" src="http://1.bp.blogspot.com/-e4cZwIXWWSs/TsJMrE9SHvI/AAAAAAAAAfo/J_FuzRTjXRs/s320/addColumnsOntreeTable.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After that, we surround the panelCollection with a panelGroupLayout with type Scroll. This will be the parent Container of both, our treeTable and table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;At this point, we have to apply the &lt;b&gt;target Data Source &lt;/b&gt;feature. As we explained earlier, we are going to set this feature for the Employees detail iterator of the Departments master iterator. This Employees iterator will point to "other" Employees iterator.&lt;br /&gt;But first, we have to add this iterator. So in our page definition we add the other Employees as iterator. &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/-1ubDGTtJMmA/TsZrkQkHH2I/AAAAAAAAAj4/UiM-DGuDuK0/s1600/addOtherIterator.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="206" src="http://4.bp.blogspot.com/-1ubDGTtJMmA/TsZrkQkHH2I/AAAAAAAAAj4/UiM-DGuDuK0/s320/addOtherIterator.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Then, we are going to set our &lt;b&gt;Target Data Source&lt;/b&gt; value.&lt;br /&gt;We simply select the tree of Departments and then the rule of Employees,&lt;br /&gt;after that, we expand the target data source option and open the help wizard to choose our iterator. The iterator would be the "other" Employees iterator.&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/-mNDm-H7TfHQ/TsZu0yZEi5I/AAAAAAAAAkA/CuLAGNNfzlc/s1600/targetDataSource.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://2.bp.blogspot.com/-mNDm-H7TfHQ/TsZu0yZEi5I/AAAAAAAAAkA/CuLAGNNfzlc/s320/targetDataSource.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, every time we select an employee from our tree, the "other" employees iterator will change the current row to the same as the selected in the tree.&lt;br /&gt;All we have to do now is to drag and drop the EmployeesViewDetails from our Data Control&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/-AlFJoryQ5-8/TsZytx_R4LI/AAAAAAAAAkI/w2Zav_E_g3k/s1600/dropEmpDetails.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://1.bp.blogspot.com/-AlFJoryQ5-8/TsZytx_R4LI/AAAAAAAAAkI/w2Zav_E_g3k/s320/dropEmpDetails.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After that, we surround the table with a panelCollection (the usual best practice..) and set partial triggers to table from the tree table.&lt;br /&gt;&lt;br /&gt;And that is it!&lt;br /&gt;When you run the page you will see a row in the empsDetailsView ofcourse, since it is querying, but this is not the scope of this post.. When ever you select an employee the table will be refreshed with the employee's details.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailDetailTreeTableAndTableExample.zip"&gt;Download Sample Application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards. &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-6923776520269136378?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/6923776520269136378/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/master-detail-detail-using-tree-table.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6923776520269136378'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6923776520269136378'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/master-detail-detail-using-tree-table.html' title='Master-Detail-Detail. Using Tree Table and Table. Using Target Data Source featrue. ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-YrZxq6uyi9k/TsJHlq6OomI/AAAAAAAAAfA/mUOTs3GD1qo/s72-c/CreateAssociation.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-4534701296505440451</id><published>2011-11-16T13:12:00.000-08:00</published><updated>2011-11-16T13:12:19.319-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Create new Record after Search Criteria (Using Search Form) returns no Results. ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;In this post, we are going to immediately create a row when we have no search results.&lt;br /&gt;This is usually the case in &lt;b&gt;oracle forms&lt;/b&gt;. Forms have a different out of the box approach.&lt;br /&gt;When a Form opens, it open in a mixed mode. This means that no data are fetched. The user is able to insert some data and press enter, if there are no data in the DB with a given primary key, then, Forms are entering insert mode. This means that they create a new row. If the data are there, the record is Queried.&lt;br /&gt;&lt;br /&gt;We are going to do the same with the following example.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowWhenNoResultsOnSearchFormExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We will use, as usual, the HR schema of Oracle XE and more specifically we are going to use the Regions table. We choose the Regions table because it is the simplest table regarding dependencies and fits the scope of this example.&lt;br /&gt;&lt;br /&gt;First, we generate the Business Components from tables with the help of JDeveloper's wizard.&lt;br /&gt;Next, we are going to use the &lt;b&gt;Search Form &lt;/b&gt;&amp;nbsp;feature ADF BC provides.&lt;br /&gt;We create a page called index.&lt;br /&gt;So, we drag and drop the Regions iterator onto our page and&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/-JyYXxBdEp5g/Tr52Audw4HI/AAAAAAAAAeg/VXnUj3eTUIA/s1600/dropSearchForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://1.bp.blogspot.com/-JyYXxBdEp5g/Tr52Audw4HI/AAAAAAAAAeg/VXnUj3eTUIA/s320/dropSearchForm.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Ok. After dropping the Search Form, we can simply run and test our page. We will see that the default mode of the page is the fetch data mode. In other words, it queries and shows the first row.&lt;br /&gt;If we press the &lt;b&gt;find button&lt;/b&gt;, the page will enter &lt;b&gt;into the find mode&lt;/b&gt;, where all fields are search criteria.&lt;br /&gt;We can insert some data and &lt;b&gt;press the execute button&lt;/b&gt;. Then the execute operation will be invoked and search for records that have those data we entered earlier.&lt;br /&gt;&lt;br /&gt;Well, this out of the box functionality is not exactly what we want... So lets try to change it a bit.&lt;br /&gt;First, let's try to open the page in find mode.&lt;br /&gt;To do that, we are going to &amp;nbsp;create an invoke action, as mentioned in this post:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dstas.blogspot.com/2010/09/adf-11g-methodaction-and-invokeaction.html"&gt;http://dstas.blogspot.com/2010/09/adf-11g-methodaction-and-invokeaction.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Our invoke action is going to invoke the Find Operation.&lt;br /&gt;Additionally we are going to change the refresh property. Our Refresh property is going to be: &lt;b&gt;prepareModel&lt;/b&gt;&lt;br /&gt;For further reading please check the following links:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groundside.com/resources/DuncanMills/S298736_bindings.pdf"&gt;http://groundside.com/resources/DuncanMills/S298736_bindings.pdf&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sthref837"&gt;http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sthref837&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Additionally, we are going to set a Refresh Condition. This is to avoid executing the invokeAction in every postBack.&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/-3Ks42m5ub0Y/Tr6D_cKJybI/AAAAAAAAAeo/bFpXvYv4zEA/s1600/invokeFindWithRefreshCondition.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://4.bp.blogspot.com/-3Ks42m5ub0Y/Tr6D_cKJybI/AAAAAAAAAeo/bFpXvYv4zEA/s320/invokeFindWithRefreshCondition.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If we now run and test our page, we will see that our page is entering in find mode! We are ready to set criteria and press execute!&lt;br /&gt;Up to now, we are half way through. We have to enter in insert mode.&lt;br /&gt;When? right after &lt;b&gt;knowing &lt;/b&gt;that the execute operation returned no results.&lt;br /&gt;&lt;br /&gt;So, at this point we can understand when we should invoke an insert operation. When our iterator has no rows.. No rows can be produced by many cases, one of them is when we enter non existing criteria and search.. Another reason might be the fact that there are not any records in the DB... What ever the case, we are fully covered.&lt;br /&gt;Since we are opening the page in find mode.. we have to search..&lt;br /&gt;Additionally, it would be great if we could enter in insert mode even if we issue a rollback and the DB has no rows..&lt;br /&gt;&lt;br /&gt;Last but no least, is that we want to create a new row if the search has no results, but, we want to use those search criteria values in the new row.&lt;br /&gt;&lt;br /&gt;For that, we are going to alter a bit the Execute operation. We are going to create our own actionListener method.&lt;br /&gt;But First, we have to apply our logic. Our logic says that if we do not have any records fetched by the execute operation, we should immediately create a new Row, with initial values, those values we did the execute on the first place.&lt;br /&gt;One thing at the time:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting the values from find mode:&lt;/b&gt;&lt;br /&gt;We will override the&amp;nbsp;create(AttributeList attributeList) method of the Regions View Row java class:&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/-bl74GmpEVuE/TsQjOepVEJI/AAAAAAAAAjI/kaedQrXEdS0/s1600/createMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="94" src="http://2.bp.blogspot.com/-bl74GmpEVuE/TsQjOepVEJI/AAAAAAAAAjI/kaedQrXEdS0/s320/createMethod.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then, we will create a method in our application module, that will check if there are any rows fetched (Since it will be invoked right after the Execute) and if not, it will create a new Row in the Regions view Object. We do not have to worry about the initial values since we have done some coding in the create method as mentioned above.&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/-LBTnp4cFDd8/TsQkzBx5DKI/AAAAAAAAAjQ/uGOVNNTQEhE/s1600/AMCode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="79" src="http://2.bp.blogspot.com/-LBTnp4cFDd8/TsQkzBx5DKI/AAAAAAAAAjQ/uGOVNNTQEhE/s320/AMCode.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then we &lt;b&gt;expose&lt;/b&gt; this method to the client interface and add it as a &lt;b&gt;methodAction&lt;/b&gt; in the pageDef of the&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/-O5-xkXPUZec/TsQlBTRcswI/AAAAAAAAAjY/mIa5B9ekmIw/s1600/pageDef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/-O5-xkXPUZec/TsQlBTRcswI/AAAAAAAAAjY/mIa5B9ekmIw/s320/pageDef.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And that is it.&lt;br /&gt;When we run the page, it will open in find mode. If we set criteria that will bring any data, the page will enter in insert mode with initial values those data.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowWhenNoResultsOnSearchFormExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-4534701296505440451?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/4534701296505440451/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/create-new-record-after-search-criteria.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4534701296505440451'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4534701296505440451'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/create-new-record-after-search-criteria.html' title='Create new Record after Search Criteria (Using Search Form) returns no Results. ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-JyYXxBdEp5g/Tr52Audw4HI/AAAAAAAAAeg/VXnUj3eTUIA/s72-c/dropSearchForm.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3446649080328709888</id><published>2011-11-16T04:49:00.001-08:00</published><updated>2011-11-16T08:36:48.317-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.1.4.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Table'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Conditionally Displaying Table Records Based on Another records's attribute value. Conditionally making required attributes of those rows. ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;In this example we are going to create a small application demonstrating the following case:&lt;br /&gt;&lt;br /&gt;Using a table, a value of&amp;nbsp; an attribute of a row, will determine if some other rows will be visible or not. &lt;br /&gt;Furthemore, on those rows, specific attributes will be required or not.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ConditionallyDisplayRecordsOnATable.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Lets get into the details.&lt;br /&gt;We have a table, that we want to filter it's data. Ok, so far so good. We can do that by using the iterator's filter property in the pageDef. Additionally we are going to use a transient attribute that will keep the value we want to filter with.&lt;br /&gt;&lt;br /&gt;Then, we want to have some attributes of those hidden rows to be mandatory only when those rows are visible.&lt;br /&gt;The condition that will determine wether those attributes will be required or not will be based on a value of an attribute of another row.&lt;br /&gt;&lt;br /&gt;Example.&lt;br /&gt;&lt;br /&gt;We Have Row A, Row B, Row C and Row D which they are visible.&lt;br /&gt;We have Row E, Row F which are not visible.&lt;br /&gt;&lt;br /&gt;When we will set value to attribute d of&amp;nbsp; Row D, row E and row F will be visible with the same attributes to be required.&lt;br /&gt;&lt;br /&gt;In fact we are going to make things a bit more difficult. We want to have validation erros only when pressing commit. This is due to ease of use reasons. Simply put, we do not want mandatory field messages to be thrown every time we change a row.&lt;br /&gt;Last but not least, the attribute that will determine the visibility of other rows, will be a Yes/No radio Button.&lt;br /&gt;So, this means that, when the user selects Yes on a RadioButton of a row, there will be some logic that will make other, specific rows, be visible and make their radioButtons be required.&lt;br /&gt;&lt;br /&gt;The logic that will make the rows visible and the radio required is purelly in the scope of business requirements. In this example we are going to use a simple case. The scope of this post is to demonstrate the implementation in order to achieve this functionality.&lt;br /&gt;&lt;br /&gt;We are going to create a table in the HR Schema.&lt;br /&gt;&lt;br /&gt;The Sql Script is already included in the application. &lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ConditionallyDisplayRecordsOnATable.zip"&gt;Download the application&lt;/a&gt; and find the script called &lt;strong&gt;SampleData.sql&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;As you can see from the table, there is not something weird.. Columns may have different names depending on requirements.&lt;br /&gt;After we run the script, we create our BC from JDeveloper wizard.&lt;br /&gt;&lt;br /&gt;And we have the following BCs:&lt;br /&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/-8p6T84aoy48/TsO-Cu0sv4I/AAAAAAAAAf4/0DVQXMU4dZw/s1600/bc.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="120" src="http://4.bp.blogspot.com/-8p6T84aoy48/TsO-Cu0sv4I/AAAAAAAAAf4/0DVQXMU4dZw/s320/bc.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;It is quite obvious that attribute SelectRadio is going to be our radioGroup of yes/no. So we are going to add a List of Values to this attribute. The List of Values is going to be a&amp;nbsp;new view object with static values.&lt;br /&gt;The attributes are going to be the following:&lt;br /&gt;ID,VALUE.&lt;br /&gt;&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/-eChRO4mVbmw/TsPAP4q9MPI/AAAAAAAAAgA/wsQY6P0Squk/s1600/createStaticLOV.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="199" src="http://2.bp.blogspot.com/-eChRO4mVbmw/TsPAP4q9MPI/AAAAAAAAAgA/wsQY6P0Squk/s320/createStaticLOV.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;With the following DATA:&lt;br /&gt;&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/-C8VFys6CB88/TsPAWGw0iJI/AAAAAAAAAgI/Tc2T56td7H0/s1600/CreateStaticData.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="201" src="http://3.bp.blogspot.com/-C8VFys6CB88/TsPAWGw0iJI/AAAAAAAAAgI/Tc2T56td7H0/s320/CreateStaticData.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We set the Y and N just for simplycity.&lt;br /&gt;After finishing the creation of the static VO we create an LOV in our sample View Object:&lt;br /&gt;&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/-KiSwSw2iLFg/TsPByGvIeqI/AAAAAAAAAgQ/_YYD1MOWpCM/s1600/createLOV1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="263" src="http://3.bp.blogspot.com/-KiSwSw2iLFg/TsPByGvIeqI/AAAAAAAAAgQ/_YYD1MOWpCM/s320/createLOV1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then we just add the Static View object as an accessor.&lt;br /&gt;We map the Selectradio attribute with the &lt;strong&gt;selectradio &lt;/strong&gt;attribute with the &lt;strong&gt;choice &lt;/strong&gt;attribute. and that is it.&lt;br /&gt;&lt;br /&gt;Ok, so far we have created the VO with an LOV.&lt;br /&gt;&lt;br /&gt;What we want now is to make the radio Group conditionally required. As we see in the db table. it is not required. We could&amp;nbsp;have a entity validation method. But in this example we are going to try something different. We are going to use the required property of the radioButton.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Since, we will have another row determining the required property, we are going to follow this approach:&lt;br /&gt;&lt;br /&gt;We will place a transient attribute in our viewObject called&amp;nbsp; &lt;strong&gt;ReqRadio.&lt;/strong&gt; This attribute is going to determine if this the RadioButton is going to be required or not. So we add this attribute:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-I9QQuFqn1n8/TsPFBo-dccI/AAAAAAAAAgo/uT84LBZohos/s1600/ReqRadio.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="201" src="http://4.bp.blogspot.com/-I9QQuFqn1n8/TsPFBo-dccI/AAAAAAAAAgo/uT84LBZohos/s320/ReqRadio.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, the only thing left is to place the logic where this transient attribute will get a value.&lt;br /&gt;Since a radioButton will determine if another radioButton of another row will be mandatory, we will have to do an iteration over all those rows that are dependent of that row. &lt;br /&gt;For this example, we keep things simple. we have a column in our table in the DB which is called, &lt;strong&gt;typeofdata.&lt;/strong&gt; As you will see in the rows, we have a record that has a value of MasterFormC and others that have value of formC. This example logic says that all rows that have formC and the radioButton of MasterFormC is with value Y, then, those records will have their radioButton required.&lt;br /&gt;&lt;br /&gt;The simplest way to do that is to &lt;strong&gt;create&lt;/strong&gt; a &lt;strong&gt;ViewCriteria&lt;/strong&gt; in our &lt;strong&gt;ViewObject&lt;/strong&gt; that we will use it to filter our rows. The Execution Mode will be set to memory&lt;br /&gt;&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/-VVe8k8bdmbY/TsPIDkzmJdI/AAAAAAAAAgw/LcLieIqe-s4/s1600/ViewCriteria.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="181" src="http://2.bp.blogspot.com/-VVe8k8bdmbY/TsPIDkzmJdI/AAAAAAAAAgw/LcLieIqe-s4/s320/ViewCriteria.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As you can see from the screen above, we set the typeofdata to be equal to "formC".&lt;br /&gt;Next, we are going to create a method in our Application Module that will do the following:&lt;br /&gt;First, we will check if the typeofdata is MasterFormC and then:&lt;br /&gt;Will get the ViewCriteria of the View Object, apply it, get the RowSetIterator and set value to the transient attribute ReqRadio of each record.&lt;br /&gt;The value to be set will be given as a parameter.&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/-GBizsJjvSWA/TsPlNwKHTnI/AAAAAAAAAjA/3vRQhihQxe4/s1600/AMCode.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="192" src="http://4.bp.blogspot.com/-GBizsJjvSWA/TsPlNwKHTnI/AAAAAAAAAjA/3vRQhihQxe4/s320/AMCode.JPG" width="320" /&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;br /&gt;As you can see from the code, we return a message that we will use it later in our page.&lt;br /&gt;Next, we expose this method to the client interface of our AM.&lt;br /&gt;&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/-87kqX5OBZ4s/TsPOgCvZ4BI/AAAAAAAAAhA/qN2fuk_HbI8/s1600/expose.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="96" src="http://1.bp.blogspot.com/-87kqX5OBZ4s/TsPOgCvZ4BI/AAAAAAAAAhA/qN2fuk_HbI8/s320/expose.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next, we will create our page and we will drag and drop our table onto the page:&lt;br /&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/-KebplQJv2AE/TsPPiqxHGFI/AAAAAAAAAhI/CrzallloqmU/s1600/dropTable.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="145" src="http://4.bp.blogspot.com/-KebplQJv2AE/TsPPiqxHGFI/AAAAAAAAAhI/CrzallloqmU/s320/dropTable.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then, we will surround our table with a panelCollection container and insert Commit and RollBack operations as toolbar Buttons in the toolbar which will reside in the toolbar facet of the panelCollection&lt;br /&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/-Yvt7JzgwYQ0/TsPQ3vTCpqI/AAAAAAAAAhQ/a8xQzPw8sKA/s1600/toolbarButtons.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="151" src="http://4.bp.blogspot.com/-Yvt7JzgwYQ0/TsPQ3vTCpqI/AAAAAAAAAhQ/a8xQzPw8sKA/s320/toolbarButtons.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As we mentioned earlier, we do not want to have validation errors every time we change a row... For that reason, we are gong to set the &lt;strong&gt;immediate property of the table to true.&lt;/strong&gt;&lt;br /&gt;&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/-4aZYSIus9rE/TsPRXv1FQaI/AAAAAAAAAhY/zGCXBfcqkTE/s1600/immediateTrue.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="219" src="http://3.bp.blogspot.com/-4aZYSIus9rE/TsPRXv1FQaI/AAAAAAAAAhY/zGCXBfcqkTE/s320/immediateTrue.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The last thing to do onthe UI for the RadioButton is the requiredProperty. the required Property will be based on the value of the reqRadio:&lt;br /&gt;&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/-LpWb6NFVrbc/TsPZaefWHZI/AAAAAAAAAiQ/SPA7ywFcGeo/s1600/requiredOnPage.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="201" src="http://3.bp.blogspot.com/-LpWb6NFVrbc/TsPZaefWHZI/AAAAAAAAAiQ/SPA7ywFcGeo/s320/requiredOnPage.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Now that we have a pageDef, we will expose our AM method as a methodAction:&lt;br /&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/-b8OHx3UX11I/TsPk0HgNziI/AAAAAAAAAi4/jiPgx7-x9Og/s1600/EnableFiltering.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="143" src="http://4.bp.blogspot.com/-b8OHx3UX11I/TsPk0HgNziI/AAAAAAAAAi4/jiPgx7-x9Og/s320/EnableFiltering.JPG" width="320" /&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;br /&gt;Additionally, we want to filter our iterator with all those rows that can be visible due to our business logic.&lt;br /&gt;For that, we are going to create a &lt;strong&gt;transient&lt;/strong&gt; attribute that will be called &lt;strong&gt;IsVisible&lt;/strong&gt;. We are going to change a bit the code in the getter of this attribute (we have to create the ViewRowImpl jav class of our view object first and select the generateAccessors property):&lt;br /&gt;&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/-rhCC2kn0Ygk/TsPkeVSkPlI/AAAAAAAAAiw/jSqGYxVZeTQ/s1600/getIsVisible.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="78" src="http://2.bp.blogspot.com/-rhCC2kn0Ygk/TsPkeVSkPlI/AAAAAAAAAiw/jSqGYxVZeTQ/s320/getIsVisible.JPG" width="320" /&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;br /&gt;With the above code, we will know if this row is to be visible or not.&lt;br /&gt;Onto our pageDefinition:&lt;br /&gt;in the pageDef, we select the iterator of our View Object and we wil enable the filtering:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-pmQQcvh_0Xg/TsPT0GGGy2I/AAAAAAAAAhw/dUTMRCjSTHQ/s1600/EnableFiltering.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="189" src="http://4.bp.blogspot.com/-pmQQcvh_0Xg/TsPT0GGGy2I/AAAAAAAAAhw/dUTMRCjSTHQ/s320/EnableFiltering.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now we will be able to filter our table properly.&lt;br /&gt;Last but not least, is our radioButton. We set it to &lt;strong&gt;autoSubmit=true &lt;/strong&gt;in the page. We then create a valueChangeListener for our RadioButton. &lt;br /&gt;Additionally we will create a popup with a dialog and an outputFormatted text with value of a pageFlowScope variable.&lt;br /&gt;&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/-60-ybOnQAYs/TsPVGooxa4I/AAAAAAAAAh4/AI5F1oiEmrs/s1600/popup.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="164" src="http://2.bp.blogspot.com/-60-ybOnQAYs/TsPVGooxa4I/AAAAAAAAAh4/AI5F1oiEmrs/s320/popup.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then, we create bindings for the popup and the table. This will allow us to programmatically show the popup and partialTarget our table.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-TQrxGgt-uSY/TsPkGfwYk2I/AAAAAAAAAio/QtNApGHwNVE/s1600/managedBeanCode.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" hda="true" height="139" src="http://1.bp.blogspot.com/-TQrxGgt-uSY/TsPkGfwYk2I/AAAAAAAAAio/QtNApGHwNVE/s320/managedBeanCode.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And That is it.&lt;br /&gt;&lt;br /&gt;If you run the application You will see that initially, the data are filtered and depending on the value of the MasterFormC typeofdata, the rows are becoming visible and required. Additionally there is a popup Shown when the rows are becoming visible notifying the user that the following rows must have a value on their radioButtons.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ConditionallyDisplayRecordsOnATable.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-3446649080328709888?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3446649080328709888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/conditionally-displaying-table-records.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3446649080328709888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3446649080328709888'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/conditionally-displaying-table-records.html' title='Conditionally Displaying Table Records Based on Another records&apos;s attribute value. Conditionally making required attributes of those rows. ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-8p6T84aoy48/TsO-Cu0sv4I/AAAAAAAAAf4/0DVQXMU4dZw/s72-c/bc.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7335844265919944317</id><published>2011-11-12T06:46:00.001-08:00</published><updated>2011-11-12T07:23:18.007-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF lifeCycle'/><title type='text'>prepareModel, renderModel and the lifeCycle. ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is a small post explaining a bit the difference of &lt;b&gt;prepareModel&lt;/b&gt; and &lt;b&gt;renderModel&lt;/b&gt; options in the refresh property of an &lt;b&gt;InvokeAction&lt;/b&gt;.&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/-yVjVC34dKCA/Tr6JXhtRfrI/AAAAAAAAAew/rXKVZw1rVE8/s1600/prepareModelRenderModel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="69" src="http://1.bp.blogspot.com/-yVjVC34dKCA/Tr6JXhtRfrI/AAAAAAAAAew/rXKVZw1rVE8/s320/prepareModelRenderModel.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Those two refresh properties are very self explanatory..&lt;br /&gt;&lt;br /&gt;The only difference is the following:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;prepareModel: Is executed right after initContext is executed.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;renderModel: Is executed right after metadataCommit is executed.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;In other words, &lt;b&gt;prepareModel&lt;/b&gt; is executed right before any validations or posts or updates take place. Basically, is executed after initContext and before everything else. So, this property is useful for actions and methods that do not require any validation process or updates. It will be executed before all that.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;RenderModel, &lt;/b&gt;on the other hand, is executed after all those steps are done and passed. So we can use this refresh option when our business logic, or our logic, claims that all steps of the life Cycle should be done.&lt;br /&gt;&lt;br /&gt;I understand that this is not the full description nor it is the official documentation. Besides, there is the official documentation for that. But, those lines can be used in everyday developing and I believe that can help in understanding which property we should choose depending on the case.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/img/flowofcontrol.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/img/flowofcontrol.gif" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;(&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;Figure 20-1 Lifecycle of a Web Page Request Using JSF and Oracle ADF from&amp;nbsp;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adf_lifecycle.htm"&gt;online documentation regarding ADF LifeCycle&lt;/a&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/img/gs_adf_jsf_lifecycle.gif" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/img/gs_adf_jsf_lifecycle.gif" width="289" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;(&lt;/span&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;Figure 20-2 Lifecycle of a Page Request in a Fusion Web Application from&amp;nbsp;&lt;/span&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adf_lifecycle.htm" style="background-color: white; font-family: Tahoma, sans-serif; font-size: small; font-style: italic; font-weight: bold;"&gt;online documentation regarding ADF LifeCycle&lt;/a&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;)&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic;"&gt;Regards.&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sthref837"&gt;10.5.5.3 Correctly Configuring Refresh Property of InvokeAction Executables&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/adf_lifecycle.htm"&gt;20 Understanding the Fusion Page Lifecycle&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://groundside.com/resources/DuncanMills/S298736_bindings.pdf"&gt;http://groundside.com/resources/DuncanMills/S298736_bindings.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="font-family: Tahoma, sans-serif; font-size: x-small;"&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;span class="Apple-style-span" style="background-color: white; font-family: Tahoma, sans-serif; font-size: x-small; font-style: italic; font-weight: bold;"&gt;&lt;br /&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/294172151396534006-7335844265919944317?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7335844265919944317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/preparemodel-rendermodel-and-lifecycle.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7335844265919944317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7335844265919944317'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/preparemodel-rendermodel-and-lifecycle.html' title='prepareModel, renderModel and the lifeCycle. ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-yVjVC34dKCA/Tr6JXhtRfrI/AAAAAAAAAew/rXKVZw1rVE8/s72-c/prepareModelRenderModel.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3014365391423856965</id><published>2011-11-10T10:10:00.000-08:00</published><updated>2011-11-10T10:10:31.365-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF Regions'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Master Detail CRUD operations with Regions ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is an example that demonstrates how to create a Master Detail relationship between tables by using Regions. The main purpose of regions is the notion of reusability. With regions and bounded task flows we can reuse our pages into many other pages keeping the same functionality and having a more cleaner approach. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailCRUDOperationsInRegionsExample.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For this example we are going to use only one Model project and keep things simple.&lt;br /&gt;We are going to create&amp;nbsp;our Business Components through JDeveloper and it's wizards.&lt;br /&gt;We are using Master Detail for Departments and Employees.&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/-fFhTj-dGuMo/Trv4afUbsdI/AAAAAAAAAdo/uoRKAR8LvYM/s1600/bc.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://4.bp.blogspot.com/-fFhTj-dGuMo/Trv4afUbsdI/AAAAAAAAAdo/uoRKAR8LvYM/s320/bc.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, we are going to create two Bounded Task Flows that use fragments.&lt;br /&gt;One for the Departments&lt;br /&gt;One for the employees.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gPnURfAbErk/Trv6VmykPiI/AAAAAAAAAdw/qFJ4sAcE_Us/s1600/btfFragments.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://1.bp.blogspot.com/-gPnURfAbErk/Trv6VmykPiI/AAAAAAAAAdw/qFJ4sAcE_Us/s320/btfFragments.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In each bounded task flow we drag and drop a view and place the appropriate names of departments and employees.&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/-4s4jxrU9nyQ/Trv7jHoOBUI/AAAAAAAAAd4/hGGk8Nf5uoE/s1600/fragViewBTF.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="113" src="http://3.bp.blogspot.com/-4s4jxrU9nyQ/Trv7jHoOBUI/AAAAAAAAAd4/hGGk8Nf5uoE/s320/fragViewBTF.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then in the unbounded flow we create a jspx that will have two Regions defined. &lt;br /&gt;One for the Department BTF&lt;br /&gt;One for the Employees BTF&lt;br /&gt;&lt;br /&gt;For Departments we are going to drag and drop the Departments iterator as a form with navigation buttons and submit button. Additionally, we add the createInsert and Delete Operation buttons next to submit&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/-E6D9G1eCG2k/TrwAdvuK3II/AAAAAAAAAeA/u1OtRsZlktA/s1600/dndDeps.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="140" src="http://3.bp.blogspot.com/-E6D9G1eCG2k/TrwAdvuK3II/AAAAAAAAAeA/u1OtRsZlktA/s320/dndDeps.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We do the same with employees. The only difference here is that&amp;nbsp; we drop an editable table and not a form. Additionally we drag it from the hierarchy and not the alone one in our Data Control. This means that we drag the detailed employees.&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/-oH2W5DGstDU/TrwBvr_jTeI/AAAAAAAAAeI/aQzQV-697yE/s1600/dndEmps.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="178" src="http://2.bp.blogspot.com/-oH2W5DGstDU/TrwBvr_jTeI/AAAAAAAAAeI/aQzQV-697yE/s320/dndEmps.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next, we are going to create an index page in our unbounded task flow that will contain our Bounded Task Flows as regions.&lt;br /&gt;&lt;br /&gt;In order to that, after we created the index page, we simply drag and drop each Bounded Task Flow as a &lt;b&gt;Region&lt;/b&gt;&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/-wPYIEHCM0Bk/TrwCpn8I6nI/AAAAAAAAAeQ/3sHUWLDtkdQ/s1600/dndBTFAsRegion.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://1.bp.blogspot.com/-wPYIEHCM0Bk/TrwCpn8I6nI/AAAAAAAAAeQ/3sHUWLDtkdQ/s320/dndBTFAsRegion.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We do the same for the Employees Bounded Task Flow.&lt;br /&gt;Up to now, we have our hierarchy done and well placed. Since we share the same application module instance, we are good to go!!&lt;br /&gt;All that is left now is to place commit and rollback buttons in our Departments fragment and we are done!&lt;br /&gt;For the rollback button we have to make a specific adjustment:&lt;br /&gt;The emps region needs to be refreshed and indicate that the rollback is performed. For this reason we are going to set the refresh property as follows:&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/-5eUi50k2bpE/TrwSWp2FYAI/AAAAAAAAAeY/zAoWFcCkUvE/s1600/refreshCondtionOnDetailRegion.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="107" src="http://1.bp.blogspot.com/-5eUi50k2bpE/TrwSWp2FYAI/AAAAAAAAAeY/zAoWFcCkUvE/s320/refreshCondtionOnDetailRegion.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;So, what we do here is, to set a refresh condition on our detail region. What we say here is, refresh emps fragment when the dept fragments is refreshed.&lt;br /&gt;&lt;br /&gt;NOTE: this is a simple application demonstrating the ease of use of Regions. It is not intended to cover all aspects of regions.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailCRUDOperationsInRegionsExample.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-3014365391423856965?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3014365391423856965/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/master-detail-crud-operations-with.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3014365391423856965'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3014365391423856965'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/master-detail-crud-operations-with.html' title='Master Detail CRUD operations with Regions ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-fFhTj-dGuMo/Trv4afUbsdI/AAAAAAAAAdo/uoRKAR8LvYM/s72-c/bc.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5326583302479072292</id><published>2011-11-08T12:45:00.000-08:00</published><updated>2011-11-08T12:45:51.530-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC Validation'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><title type='text'>Validate Entity or Validate Entity Attribute when using af:table or af:treetable ? ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;With this post we are going to investigate which validation is better to use for a specific circumstance. The &lt;b&gt;Entity Validation&lt;/b&gt; or the&lt;b&gt; Entity Attribute Validation&lt;/b&gt; for the specific case of &lt;b&gt;af:table&lt;/b&gt; UI component. Here is our case:&lt;br /&gt;&lt;br /&gt;We have rows that have &amp;nbsp;two input fields that they depend on each other.&lt;br /&gt;For instance, in this example we are going to use the HR schema of Oracle XE, &amp;nbsp;we are going to have a logic that says that we cannot have an employee with firstName or PhoneNbr. But we can have an employee without firstName and phone Nbr. In other words, we have to set values to both fields or to none of them.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/EntityValEntityAttrValInvestigation.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;NOTE: This is an example test case and this example might not actually fit any business logic. It is purely&amp;nbsp;illustrative and the scope of this post is to investigate a best practice on the validation approach of two depended fields.&lt;br /&gt;&lt;br /&gt;So, what we have now is a business rule. This rule says that we can have an employee with no firstName and no phoneNbr, but, if we must set values, we have to set to both of them.&lt;br /&gt;&lt;br /&gt;OK, for this rule we are going to develop both cases for our investigation.&lt;br /&gt;&lt;br /&gt;One with Entity Attribute Validations. &lt;b&gt;Method A&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;One with Entity Validation. &lt;b&gt;Method B&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;For the simplicity of this example, we will create two separate entities of the employees table and two separate views.&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/-Vnb1mKadBfI/TrlxuaR9bgI/AAAAAAAAAb4/E16qC8G___Q/s1600/BCCreation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="161" src="http://4.bp.blogspot.com/-Vnb1mKadBfI/TrlxuaR9bgI/AAAAAAAAAb4/E16qC8G___Q/s320/BCCreation.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Method A:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Since it is not just a mandatory property and has some logic, for this example we are going to use a method type of validation.&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/-yxE0qsZ6mH8/TrlyPl56xYI/AAAAAAAAAcA/SKHsmdOt5YA/s1600/ATTRFirstNameMethod1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://2.bp.blogspot.com/-yxE0qsZ6mH8/TrlyPl56xYI/AAAAAAAAAcA/SKHsmdOt5YA/s320/ATTRFirstNameMethod1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We accept the default name of the method, as proposed from JDeveloper wizard.&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/-MA2ITeEZ7Rw/Trl1NwkiMZI/AAAAAAAAAcQ/xrNqt28QnYU/s1600/FirstNameProposedMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-MA2ITeEZ7Rw/Trl1NwkiMZI/AAAAAAAAAcQ/xrNqt28QnYU/s320/FirstNameProposedMethod.png" width="292" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;In the failure handling section we set a message that corresponds to our business logic:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-bUAhyxlFp88/Trl2NJtS4qI/AAAAAAAAAcY/stIxGQJwyws/s1600/FirstNameFailureHandling.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-bUAhyxlFp88/Trl2NJtS4qI/AAAAAAAAAcY/stIxGQJwyws/s320/FirstNameFailureHandling.png" width="292" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;We do exactly the same ( with a slight difference in the failure handling message) for the PhoneNbr attribute.&lt;br /&gt;&lt;br /&gt;For the phoneNbr we have to check the the checkBox in order to generate the method. This is because there is already one 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/-7MQ9Q1MLPrw/Trl5HVdL2eI/AAAAAAAAAcg/z-R4yjgHcYU/s1600/phoneNbrMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-7MQ9Q1MLPrw/Trl5HVdL2eI/AAAAAAAAAcg/z-R4yjgHcYU/s320/phoneNbrMethod.png" width="292" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next, we have to right some code in the methods:&lt;br /&gt;NOTE: in case your java class has no accessors, go to the java section of your entity, press the pencil and select the Create Accessors checkBox&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/-ao3GJhJb7IY/Trl525KFpDI/AAAAAAAAAco/Vvdgp6XDPIQ/s1600/createAccessors.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="156" src="http://1.bp.blogspot.com/-ao3GJhJb7IY/Trl525KFpDI/AAAAAAAAAco/Vvdgp6XDPIQ/s320/createAccessors.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The methods for each attribute:&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/-pdua-mL0pRA/Trl6BLm7TOI/AAAAAAAAAcw/9a_7kBtmJBY/s1600/attributeMethods.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://4.bp.blogspot.com/-pdua-mL0pRA/Trl6BLm7TOI/AAAAAAAAAcw/9a_7kBtmJBY/s320/attributeMethods.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Method B:&lt;/b&gt;&lt;br /&gt;For method B, we will do the same process but only once, with one method. Because we are going to create one EntityValidation method. We are using &lt;b&gt;EntityB.&amp;nbsp;&lt;/b&gt;The process is the same, but the starting point is different:&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/-WJd6g0NBx0M/Trl71veKZII/AAAAAAAAAc4/l38Ar6rjnC4/s1600/EntitiyValidation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="181" src="http://3.bp.blogspot.com/-WJd6g0NBx0M/Trl71veKZII/AAAAAAAAAc4/l38Ar6rjnC4/s320/EntitiyValidation.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, we have only one method so we will simply put both conditions of the other entity class into 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/-6dS-jbuVlwA/Trl8ZwVO6PI/AAAAAAAAAdA/jhCcDSO9VlY/s1600/EntityValdiationCode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="99" src="http://4.bp.blogspot.com/-6dS-jbuVlwA/Trl8ZwVO6PI/AAAAAAAAAdA/jhCcDSO9VlY/s320/EntityValdiationCode.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;All we have to do now, is to create two separate pages, each one will have a view Object (already created by the JDeveloper wizard ). All we have to do after the pages, is to... test...&lt;br /&gt;&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/-S0CDKjoXmcI/Trl9YODNooI/AAAAAAAAAdI/gq2pG9lOfKQ/s1600/taskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="143" src="http://2.bp.blogspot.com/-S0CDKjoXmcI/Trl9YODNooI/AAAAAAAAAdI/gq2pG9lOfKQ/s320/taskFlow.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We create the pages and we drag and drop a view to a page:&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/-AELr4frYOaI/TrmGD-Q9D6I/AAAAAAAAAdQ/VqCaAEoi4e0/s1600/DNDEmps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="167" src="http://3.bp.blogspot.com/-AELr4frYOaI/TrmGD-Q9D6I/AAAAAAAAAdQ/VqCaAEoi4e0/s320/DNDEmps.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;we set the FirstName and the PhoneNbr as &lt;b&gt;autoSubmit&lt;/b&gt; true.&lt;br /&gt;&lt;br /&gt;If you run the application and press the first button, we will be navigated to to method A page where we have the entity attribute validations. There, if go and delete the value of the FirstName in the first row, press tab, we will get an error message:&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/-Aq30uVnN0Y4/TrmRGAYtdRI/AAAAAAAAAdY/5TQEpF0X628/s1600/errorMessageMethodA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://3.bp.blogspot.com/-Aq30uVnN0Y4/TrmRGAYtdRI/AAAAAAAAAdY/5TQEpF0X628/s320/errorMessageMethodA.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The above is correct. It is exactly what we wanted. Lets go and delete the PhoneNbr of the same row,&lt;br /&gt;Normally, we should not get any error message right? At least, this is the visual logical thought..&lt;br /&gt;However, we still get the error...&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/-QogOQclbI-4/TrmSDs8A3qI/AAAAAAAAAdg/TNItLSy1Mto/s1600/errorMessageMA2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://4.bp.blogspot.com/-QogOQclbI-4/TrmSDs8A3qI/AAAAAAAAAdg/TNItLSy1Mto/s320/errorMessageMA2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;This is very logical and expected behavior. Since validations are failed, no values are set in the attributes, thus our method in the second attribute handles the FirstName with it's "old" value which is not old because it has never changed.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now, if we check the same in the second page, we will not receive the same behavior. We will have the accepted one. &lt;b&gt;The difference here is that the Entity Validation is triggered when the whole entity is submitted. This happened when we change a row by clicking to another record in the table or by pressing a button.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;So this investigation and example clearly indicates that when it comes to depended attributes and their validations, the correct declarative way is to use an Entity Validation and not an Entity Attribute Validation&lt;br /&gt;&lt;br /&gt;Reference:&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcvalidation.htm#ADFFD407"&gt;http://download.oracle.com/docs/cd/E24382_01/web.1112/e16182/bcvalidation.htm#ADFFD407&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/EntityValEntityAttrValInvestigation.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-5326583302479072292?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5326583302479072292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/validate-entity-or-validate-entity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5326583302479072292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5326583302479072292'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/validate-entity-or-validate-entity.html' title='Validate Entity or Validate Entity Attribute when using af:table or af:treetable ? ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Vnb1mKadBfI/TrlxuaR9bgI/AAAAAAAAAb4/E16qC8G___Q/s72-c/BCCreation.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-8171173049893869521</id><published>2011-11-08T02:49:00.000-08:00</published><updated>2011-11-08T04:21:03.125-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='af:switcher'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>af:switcher and af:goLink Example ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;Here is an example demonstrating how to conditionally have a &lt;strong&gt;goLink&lt;/strong&gt; on your jspx.&lt;br /&gt;The case is simple, based on some value, the goLink should not be a goLink and be an output text.&lt;br /&gt;In other words, how to implement a conditional goLink.&lt;br /&gt;&lt;strong&gt;af:switcher&lt;/strong&gt;&amp;nbsp; comes into the game. With af:switcher we can have facets. Each facet has a name. The switcher will determine which facet will be rendered or not. So, all we have to do is to write the appropriate condition. Check the Following screen:&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/-bz9QhDSSPRk/TrkHd3gi_7I/AAAAAAAAAbw/Bxb2DXFofyE/s1600/switcherExample.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="88" ida="true" src="http://1.bp.blogspot.com/-bz9QhDSSPRk/TrkHd3gi_7I/AAAAAAAAAbw/Bxb2DXFofyE/s320/switcherExample.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;As you can see in the above screen, the &lt;strong&gt;facetName&lt;/strong&gt; property of the &lt;strong&gt;switcher&lt;/strong&gt; can accept EL and infact what we did here, to conditionally render a facet of the switcher. The translation of the facetName is the following:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;&lt;em&gt;#{aVariableHere eq 'aVale' ? 'GOLINK' : 'OUTPUTTEXT'}&lt;/em&gt;&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;means:&lt;br /&gt;&lt;br /&gt;"if the&amp;nbsp; &lt;strong&gt;&lt;em&gt;aVariableHere&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; equals to&lt;strong&gt;&lt;em&gt;&amp;nbsp; aValue&lt;/em&gt;&lt;/strong&gt;&amp;nbsp; then (&lt;strong&gt;&lt;em&gt;?&lt;/em&gt;&lt;/strong&gt;)&amp;nbsp;render the facet with name &lt;strong&gt;&lt;em&gt;GOLINK&lt;/em&gt;&lt;/strong&gt; else (&lt;strong&gt;&lt;em&gt;:&lt;/em&gt;&lt;/strong&gt;) render the facet with name &lt;strong&gt;&lt;em&gt;OUTPUTTEXT&lt;/em&gt;&lt;/strong&gt;.&lt;br /&gt;&lt;br /&gt;In this example, the values are strictly illustrative, they should change depending on bussiness logic.&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-8171173049893869521?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/8171173049893869521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/afswitcher-and-fgolink-exapmple-adf-11g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8171173049893869521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8171173049893869521'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/afswitcher-and-fgolink-exapmple-adf-11g.html' title='af:switcher and af:goLink Example ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-bz9QhDSSPRk/TrkHd3gi_7I/AAAAAAAAAbw/Bxb2DXFofyE/s72-c/switcherExample.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7214247635904683781</id><published>2011-11-04T12:44:00.000-07:00</published><updated>2011-11-04T12:46:58.247-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Drag and Drop'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><title type='text'>Drag And Drop Records Between Tables.  ADF BC 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi&lt;br /&gt;This is a small example of the following case:&lt;br /&gt;&lt;br /&gt;Drag and Drop&amp;nbsp; records from one table to another.&lt;br /&gt;&lt;br /&gt;More Specifically,&amp;nbsp; we are going to create a small application that will give us the ability to drag and drop employees to the desired department. The result to this will be to update the information of that employee.&amp;nbsp; We are going to present&amp;nbsp; each department and it's employees separately and we will be able to drag and drop employees from one department to another... &lt;br /&gt;For this simple case, we are going to use 2 departments with their corresponding employees.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/DragAndDropBetweenTablesExample.zip"&gt;Download the Sample Application (JDeveloper 11.1.2.1.0).&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We generate the appropriate business components for our little example. &amp;nbsp;The business components are:&lt;br /&gt;Entities: Departments, Employees.&lt;br /&gt;View Objects: Departments Employees.&lt;br /&gt;&lt;br /&gt;Furthermore, all the appropriate entity associations and viewlinks are generated by the JDeveloper wizard.&lt;br /&gt;Once we have that, we have to concider what else of development is left to be done on the Model layer.&lt;br /&gt;Our use case describes the "move" of one or more employees from one department to another department. This means that each employee, of those draged and droped, will update there DepartmentId value.&lt;br /&gt;So, what we have to do now, is to provide answers to the following logical and technical questions:&lt;br /&gt;&lt;br /&gt;1) How are we going to know which employees are being moved?&lt;br /&gt;2) To which Department are those employees are being moved?&lt;br /&gt;3) Should we prevent any movement to the same department?&lt;br /&gt;4) Should we immediatelly commit any movement to the database? Or should we have it a separate operation for the user?&lt;br /&gt;5) How are we going to handle two different instances of VO in the Same Application Module?&amp;nbsp;Are there any benefits to have two different Application Modules ?&lt;br /&gt;6) How much code should we use in the view layer? Are we going to use AM methods? Are we going to develop in the Backing Beans?&lt;br /&gt;7) Will the user be able to &amp;nbsp;edit employees and drag and drop without just commiting?&lt;br /&gt;&lt;br /&gt;Lets try to answer them one by one...&lt;br /&gt;1) We are going to know all the information of every row straight from the controller. Sample code will be provider later in this post. So, there is no problem for this. The framework allows use to handle this information.&lt;br /&gt;&lt;br /&gt;2) We have this imformation as well. Even though we will be droping employees to another employees table. Basically we will be able to know the Department Id of the other iterator directly from the Application Module. More about the Applicaton Module later on.&lt;br /&gt;&lt;br /&gt;3) Normally, we should prevent it, because it is less consuming to simply check both Departments's ids and raise a message, rather than updating viewRows and entities with the same values. Besides, the implementation will acutally be the same for both tables. Which means that the user will be able to actually drag and drop employees inside the same table. &amp;nbsp;This will certainly be an overuse of the functionality and it will be better to prevent it.&lt;br /&gt;&lt;br /&gt;4) No, we should not immediatelly commit, simply because, the user might do a mistake and will want to undo her changes. It is a lot easier to simply have a rollback button, which, in terms of ADF development, is just a drag and drop. On the other case, we will have to redo an update and commit again. These are extra roundtrips to the database which is not a good thing to occupy the database if you can avoid it. Now, there is always the case where the user will want to undo the changes of only specific employees and not all of them. Well, in this case, the user will have to find those employees and re drag them back to original Department. Even if this is the case, all those changes will take place in the cache and not in the database. All those changes will be posted and commited to the DB when the user will press the commit button. One button. One press. One commit. keep the DBAs even happier.&lt;br /&gt;&lt;br /&gt;5)With ADF we can simply insert the Same View Object twice. This will create two total different instances and handle them as such in the presentation layer. However, with one Application Module, the out of the box rollback functionality will rollback everything in both tables. But, this is the default functionality and we should treat it as is. On the other hand, if we use two Application Modules, we will be opening two database connections. You can reference documentation regarding Application Module pooling parameters here:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/index-097578.html"&gt;http://www.oracle.com/technetwork/developer-tools/jdev/index-097578.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Overall, from architectural point of view and my personal opinion, it is better to use one Application Module and keep the DB and Weblogic resources as low as possible. But again, this is my opinion..&lt;br /&gt;&lt;br /&gt;6) We will use both cases. We are going to use methods developed in the views and in the Backing Bean. The reason is simple. every action should be done in the appropriate layer.&lt;br /&gt;&lt;br /&gt;7) This is possible yes. Since we will be using one Application Module, all changes will be carried to the other Department. At the bottom line, it is just a change.&lt;br /&gt;&lt;br /&gt;------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;b&gt;IMPORTANT NOTE&lt;/b&gt;: In HR Schema, there is a trigger called UPDATE_JOB_HISTORY&lt;br /&gt;(using SQL Developer ).&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/-tcVbGRqPmh0/TrQ05T7FgmI/AAAAAAAAAZo/A60Hule9Ksc/s1600/update_job_history.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-tcVbGRqPmh0/TrQ05T7FgmI/AAAAAAAAAZo/A60Hule9Ksc/s320/update_job_history.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;This trigger is executed every time an update is done for employee regarding jobid and/or departmentid. As you will see this trigger has many check constraints that will not allow us to update an employee. For instance the pk is a combination of employee Id and the start Date to the new department...&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/-zs42DIdel7o/TrQ1s96l-eI/AAAAAAAAAZw/nP68SxW5QM0/s1600/triggerConstraints.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="228" src="http://2.bp.blogspot.com/-zs42DIdel7o/TrQ1s96l-eI/AAAAAAAAAZw/nP68SxW5QM0/s320/triggerConstraints.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Since in this example we want to demonstrate a back and forth drag and drop along with commit operation, we will disable this trigger. Just right click on the trigger in the SQL Developer and select &lt;b&gt;disable&lt;/b&gt;. Again, this is an example of the drag and drop implementation. In real production&amp;nbsp;environments&amp;nbsp;those issues will be addressed accordingly. In case you dont disable this trigger while running this example, you will not be able to drag and drop the same employee to another department in the same day... the choice is yours!!&lt;br /&gt;-------------------------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;&lt;b&gt;We shall Develop!!&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;So far, we have just created the BC and Shuttle twice the same viewObjects. Departments and Employees. This will give us the freedom to use two total different instances of the same View Object in the same page and keep the cached values visible in both of them. So, every time we update a&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/-hojGuZsRLsk/TqRmT7EiDjI/AAAAAAAAAUk/9vKVsxJYUvs/s1600/TwiceShuttleDepsAndEmps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://4.bp.blogspot.com/-hojGuZsRLsk/TqRmT7EiDjI/AAAAAAAAAUk/9vKVsxJYUvs/s320/TwiceShuttleDepsAndEmps.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;&lt;br /&gt;&lt;br /&gt;The part of the selected rows and their information is already described by Frank Nimphius in the&lt;br /&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/60-table-drag-n-drop-sample-176981.pdf"&gt;ADF Code Corner&lt;/a&gt; . We are going to use that sample code because it is exactly what we need.&lt;br /&gt;&lt;br /&gt;We want to know the selected rows that are going to be updated.&lt;br /&gt;&lt;br /&gt;The difference in this example is that we will be updating table rows in the backend.&lt;br /&gt;We will not commit and the user will have a smooth "administration" of departments and employees.&lt;br /&gt;In other &amp;nbsp;words the user will point and change.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Developing the jspx&lt;/b&gt;&lt;br /&gt;Since we have already created our BC, it is time to develop the jspx.&lt;br /&gt;For that reason, we will create a bounded task flow and a view inside it.&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/-JM2TJzdFcx8/TrAB1gwiFNI/AAAAAAAAAYw/xOOLTdL08W4/s1600/taskFlowWithView.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" src="http://1.bp.blogspot.com/-JM2TJzdFcx8/TrAB1gwiFNI/AAAAAAAAAYw/xOOLTdL08W4/s320/taskFlowWithView.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Then, we double click on the view to create the jspx. For this example we are going to use the three column Oracle template.&lt;br /&gt;The layout of the page is rather simple. We will just drag and drop Departments and Employees, Left and Right, to our jspx with the help of JDeveloper 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/-We4h3Czcgcc/TrFG-K4H_DI/AAAAAAAAAY4/uR3MYCmJ8Ig/s1600/DragAndDropWizard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://3.bp.blogspot.com/-We4h3Czcgcc/TrFG-K4H_DI/AAAAAAAAAY4/uR3MYCmJ8Ig/s320/DragAndDropWizard.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;JDeveloper will create all the needed components along with partial triggers as you see in the screen below:&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/-A5Lw_zuAcpI/TrFG-1V9_NI/AAAAAAAAAZA/IQQAPfAbp3E/s1600/DropREsult.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="158" src="http://1.bp.blogspot.com/-A5Lw_zuAcpI/TrFG-1V9_NI/AAAAAAAAAZA/IQQAPfAbp3E/s320/DropREsult.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Additionally, we change some labels and add Commit and Rollback buttons from the DataControl in the start facet of the template:&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/-zRZaIz3bPlg/TrFHne4CNKI/AAAAAAAAAZI/tZQSAGI0zRY/s1600/operationsDrop.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="127" src="http://2.bp.blogspot.com/-zRZaIz3bPlg/TrFHne4CNKI/AAAAAAAAAZI/tZQSAGI0zRY/s320/operationsDrop.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;When we run our task flow the page will be like this:&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/--850LaUPJM8/TrFH9IE6KXI/AAAAAAAAAZQ/8NAfKZs0qvI/s1600/initialScreen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://3.bp.blogspot.com/--850LaUPJM8/TrFH9IE6KXI/AAAAAAAAAZQ/8NAfKZs0qvI/s320/initialScreen.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;Up to now we have achieved to have two panel boxes with separate functionality in terms of navigation. Commit and Rollback button apply to both panelBoxes since our views belong to the Same Application Module.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Applying Drag and Drop functionality.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;In order to add Drag and Drop functionality, we have to do the following:&lt;br /&gt;Each table will be able to either drag one or more rows to the other table. So, each table will have a &lt;b&gt;drag source &lt;/b&gt;&amp;nbsp;and each table will be a &lt;b&gt;drag target&lt;/b&gt;. We simply insert inside each table the tags &lt;b&gt;dragsource&lt;/b&gt; and &lt;b&gt;droptarget&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DragSource:&lt;/b&gt;&lt;br /&gt;We want to &lt;b&gt;move&lt;/b&gt; one or more rows from a table. For that reason we have to specify the action to be &lt;b&gt;MOVE&lt;/b&gt;:&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/-h032XJ9Y1EI/TrFM0wf3PsI/AAAAAAAAAZY/yHIGsQiSXRc/s1600/dragSource.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="54" src="http://2.bp.blogspot.com/-h032XJ9Y1EI/TrFM0wf3PsI/AAAAAAAAAZY/yHIGsQiSXRc/s320/dragSource.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We do exactly the same for both tables. Now, we have enable both tables to be able to drag rows and move them. We will specify now where those rows can be dropped.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;DropTarget:&lt;/b&gt;&lt;br /&gt;The implementation is similar to dragsource. We write the droptarget tag inside each table and we specify the same action move. Additionally, in the droptarget we have to specify the following:&lt;br /&gt;&lt;b&gt;dataFlavor: &lt;/b&gt;&amp;nbsp;This is an inner tag of droptarget in which have to specify the type of data that are going to be handled and the type of action. In our case we want to move a RowKeySet with discriminatn rowmove.&lt;br /&gt;&lt;b&gt;dropListener: &lt;/b&gt;Without a dropListener we do not achieve much since we want to update our employees with the "accepting" departmentId. The dropListener is a property in the droptarget tag:&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/-wVCyOKOXHZc/TrFPl1VrtPI/AAAAAAAAAZg/pMZxgd0t6P4/s1600/dropTarget.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="79" src="http://1.bp.blogspot.com/-wVCyOKOXHZc/TrFPl1VrtPI/AAAAAAAAAZg/pMZxgd0t6P4/s320/dropTarget.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We set the dropTarget tab to both tables. The difference here is that we have to specify different dropListeners for each droptarget tag. This is because we want to handle the different dropEvents. We could fix our code to be better in terms reusability, but this is not the scope of this example.&lt;br /&gt;&lt;br /&gt;On each drop listener we have to do the following:&lt;br /&gt;We have to gather all rows that are dropped, find the new DepartmentId and update them. Finally we have to &amp;nbsp;show the updated rows under the new department.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;JAVA coding&lt;/b&gt;:&lt;br /&gt;&lt;br /&gt;The coding part is&amp;nbsp;relatively&amp;nbsp;little for this implementation. All we have to code is:&lt;br /&gt;Get the Landing Department (the new Department Id to which the dropped employee will belong),&lt;br /&gt;Get the Selected Rows,&lt;br /&gt;Update each row with the new DepartmentId,&lt;br /&gt;Show the changes to the user. This means executeQuery for the Employees and update the components.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting the Landing Department Id:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-rG_KWGzK3Bw/TrQ8wlyJ82I/AAAAAAAAAZ4/wu_Wr9OAvXw/s1600/getLandingDepartment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://4.bp.blogspot.com/-rG_KWGzK3Bw/TrQ8wlyJ82I/AAAAAAAAAZ4/wu_Wr9OAvXw/s320/getLandingDepartment.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Getting the Selected Rows:&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UcClbRbxuD0/TrQ845nBfoI/AAAAAAAAAaA/PuPpEgSB2yo/s1600/getSelectedRows.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="104" src="http://2.bp.blogspot.com/-UcClbRbxuD0/TrQ845nBfoI/AAAAAAAAAaA/PuPpEgSB2yo/s320/getSelectedRows.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Update Each row with the New DepId:&lt;/b&gt;&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/-A9FsFU3BdB4/TrQ9DJklTFI/AAAAAAAAAaI/ybMxZVPC9TQ/s1600/updateEachRow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="135" src="http://3.bp.blogspot.com/-A9FsFU3BdB4/TrQ9DJklTFI/AAAAAAAAAaI/ybMxZVPC9TQ/s320/updateEachRow.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Refresh UI:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-sIUAlL3SDHo/TrQ9ZiUFOjI/AAAAAAAAAaQ/ZLZmvKx9QhI/s1600/updateBackingChanges.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="28" src="http://4.bp.blogspot.com/-sIUAlL3SDHo/TrQ9ZiUFOjI/AAAAAAAAAaQ/ZLZmvKx9QhI/s320/updateBackingChanges.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;All this code is basically one method: a DropListener 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/-pYJbMDhBkDY/TrQ9p_5M2SI/AAAAAAAAAaY/QA54rzEFa6A/s1600/DopEventMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="240" src="http://4.bp.blogspot.com/-pYJbMDhBkDY/TrQ9p_5M2SI/AAAAAAAAAaY/QA54rzEFa6A/s320/DopEventMethod.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The operationBindings is nothing more than 2 ApplicationModule methods exposed to the client:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ogS2cdeZdk0/TrQ99EFnDCI/AAAAAAAAAag/OpHXYPrtdz4/s1600/executeEmps.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="96" src="http://3.bp.blogspot.com/-ogS2cdeZdk0/TrQ99EFnDCI/AAAAAAAAAag/OpHXYPrtdz4/s320/executeEmps.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-2tA9-Sz9CG8/TrQ99oj7UFI/AAAAAAAAAao/Ykhec3OG4S8/s1600/executeEmpsExposed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="161" src="http://1.bp.blogspot.com/-2tA9-Sz9CG8/TrQ99oj7UFI/AAAAAAAAAao/Ykhec3OG4S8/s320/executeEmpsExposed.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-vc0rUGW4gwI/TrQ9_A4-6WI/AAAAAAAAAaw/knJ06jXLaB4/s1600/pageDef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="117" src="http://2.bp.blogspot.com/-vc0rUGW4gwI/TrQ9_A4-6WI/AAAAAAAAAaw/knJ06jXLaB4/s320/pageDef.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;last but not least, is the panel box bindings which are used to refresh the UI components:&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/-1FkFCjjo9kI/TrQ-tPOwdRI/AAAAAAAAAa4/JKq5YokMaPY/s1600/panelBoxBinding.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="91" src="http://2.bp.blogspot.com/-1FkFCjjo9kI/TrQ-tPOwdRI/AAAAAAAAAa4/JKq5YokMaPY/s320/panelBoxBinding.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And That is it!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/DragAndDropBetweenTablesExample.zip"&gt;&amp;nbsp;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;References:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ADF Code Corner&lt;/b&gt;&lt;br /&gt;&lt;b&gt;60. Table Drag and Drop Sample by Fank Nimphius:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/learnmore/60-table-drag-n-drop-sample-176981.pdf"&gt;http://www.oracle.com/technetwork/developer-tools/adf/learnmore/60-table-drag-n-drop-sample-176981.pdf&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;af:dragsource:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_dragSource.html"&gt;http://download.oracle.com/docs/cd/E15523_01/apirefs.1111/e12419/tagdoc/af_dragSource.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;af:droptarget:&lt;/b&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_dropTarget.html"&gt;http://download.oracle.com/docs/cd/E17904_01/apirefs.1111/e12419/tagdoc/af_dropTarget.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Adding Drag and Drop Functionality&lt;/strong&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_dnd.htm"&gt;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31973/af_dnd.htm&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-7214247635904683781?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7214247635904683781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/drag-and-drop-records-between-tables.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7214247635904683781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7214247635904683781'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/drag-and-drop-records-between-tables.html' title='Drag And Drop Records Between Tables.  ADF BC 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-tcVbGRqPmh0/TrQ05T7FgmI/AAAAAAAAAZo/A60Hule9Ksc/s72-c/update_job_history.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-2977137012858203667</id><published>2011-11-01T05:11:00.000-07:00</published><updated>2011-11-01T05:11:20.888-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@c76e5f19(/LibraryRefs[[CompoundKey: adf.oracle.domain]])</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;If you ever see this exception on your JDeveloper while trying to deploy an application:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: "weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@c76e5f19(/LibraryRefs[[CompoundKey: adf.oracle.domain]])&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;Most probably it is not your fault... what I found out was that my weblogic-application.xml file was somehow, "bigger"... a lot of&amp;nbsp;duplicated values:&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/-ZShUltM7VUg/Tq_fjtt5rVI/AAAAAAAAAYQ/Z_WZfjae3MI/s1600/dublicatedWeblogciApplicationFileEntries2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="227" src="http://4.bp.blogspot.com/-ZShUltM7VUg/Tq_fjtt5rVI/AAAAAAAAAYQ/Z_WZfjae3MI/s320/dublicatedWeblogciApplicationFileEntries2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-eNpEf2h74nA/Tq_fkVaoWgI/AAAAAAAAAYU/0aTkrHt3zhI/s1600/dublicatedWeblogicApplication1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="169" src="http://2.bp.blogspot.com/-eNpEf2h74nA/Tq_fkVaoWgI/AAAAAAAAAYU/0aTkrHt3zhI/s320/dublicatedWeblogicApplication1.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;Well, if you remove all duplicated values, your application will work fine. At least it did for me.&lt;br /&gt;&lt;br /&gt;Why this would happen? Honestly, I am not sure.. sometimes things &amp;nbsp;get messy... Maybe the back and forth between JDeveloper versions... I cannot really say.. But anyway, the solution is simple and fairly easy.&lt;br /&gt;To locate the weblogic-application.xml file, just find the &lt;b&gt;Application Resources section of the Application Navigator.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-fQkGFtOLwf8/Tq_hF9wkqaI/AAAAAAAAAYg/Z-9e2xfPMM8/s1600/applicationResources.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-fQkGFtOLwf8/Tq_hF9wkqaI/AAAAAAAAAYg/Z-9e2xfPMM8/s320/applicationResources.png" width="261" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Double click on the weblogic-application.xml file and correct the mistakes.&lt;br /&gt;&lt;br /&gt;Here is a healthy default weblogic-application.xml file:&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/-iOcuW0oc4mA/Tq_hspl0a9I/AAAAAAAAAYo/GdreQ2YfR-s/s1600/healthyWeblogicFile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="68" src="http://3.bp.blogspot.com/-iOcuW0oc4mA/Tq_hspl0a9I/AAAAAAAAAYo/GdreQ2YfR-s/s320/healthyWeblogicFile.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-2977137012858203667?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/2977137012858203667/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/11/weblogicdescriptorbeanalreadyexistsexce.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2977137012858203667'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2977137012858203667'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/11/weblogicdescriptorbeanalreadyexistsexce.html' title='weblogic.descriptor.BeanAlreadyExistsException: Bean already exists: &quot;weblogic.j2ee.descriptor.wl.LibraryRefBeanImpl@c76e5f19(/LibraryRefs[[CompoundKey: adf.oracle.domain]])'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ZShUltM7VUg/Tq_fjtt5rVI/AAAAAAAAAYQ/Z_WZfjae3MI/s72-c/dublicatedWeblogciApplicationFileEntries2.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-2981955224648563137</id><published>2011-10-24T07:04:00.000-07:00</published><updated>2011-10-24T07:04:37.815-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>PopUp and Esc/Cancel operations. ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;When we create a popup with a dialog inside it. The dialogListener cannot actually capture the Esc or the cancel button. For this case, we are using the popupCancelListener of 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/-hGygoJStGrE/TqVv1u9PLSI/AAAAAAAAAUs/gZufPhe6cyw/s1600/code.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="158" rda="true" src="http://2.bp.blogspot.com/-hGygoJStGrE/TqVv1u9PLSI/AAAAAAAAAUs/gZufPhe6cyw/s320/code.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;This small application has only one button and a popup with a dialog inside. All the default actions with declarative programming.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/DialogListenerExample.zip"&gt;Download sample application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-2981955224648563137?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/2981955224648563137/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/popup-and-esccancel-operations-adf-11g.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2981955224648563137'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2981955224648563137'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/popup-and-esccancel-operations-adf-11g.html' title='PopUp and Esc/Cancel operations. ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-hGygoJStGrE/TqVv1u9PLSI/AAAAAAAAAUs/gZufPhe6cyw/s72-c/code.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-8358799600161945947</id><published>2011-10-20T04:49:00.000-07:00</published><updated>2011-10-20T04:49:28.066-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><title type='text'>Master Detail Data presentation and CRUD Operations. Detail records in an Editable Popup. ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This yet another example of Master Detail data representation. &lt;br /&gt;The difference here is that, the Detail rowsets will be presented in a popup.&lt;br /&gt;We are going to use HR schema of Oracle XE for this example.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailInAPopup.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We are going to use Departments as the Master and Employees as the Details.&lt;br /&gt;Departments will be presented in an table.&lt;br /&gt;The Departments table will have all CRUD operations. Insert, Update, Delete. Additionally there will be a Rollback button.&lt;br /&gt;Every Record in the Departments table will have an additional column where an &lt;strong&gt;edit button&lt;/strong&gt; will reside.&lt;br /&gt;The edit button, when pressed, will show a popup which will present another table, the table of the Employees that work to this Department.&lt;br /&gt;&lt;br /&gt;Using the Generate Business Components From Tables wizard of JDeveloper, we produce all the necessary entities, associations, view objects and viewlinks. It is a very straightforward process.&lt;br /&gt;&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/-crhCuopomDc/Tp_5piPNxtI/AAAAAAAAATM/k5eXB2PfJnw/s1600/initialBC.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" rda="true" src="http://1.bp.blogspot.com/-crhCuopomDc/Tp_5piPNxtI/AAAAAAAAATM/k5eXB2PfJnw/s320/initialBC.JPG" width="258" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After having the BC created along with the Application Module, we proceed in creating the View controller components.&lt;br /&gt;We will create a bounded task flow and within it, we will create our index jspx.&lt;br /&gt;&lt;br /&gt;Inside the Jspx we will drag and drop the Departments iterator and we will choose to select a single row from the Row Selection.&lt;br /&gt;&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/-4yl0690VIO4/Tp_5mKeJRuI/AAAAAAAAATE/btCca7WpPYQ/s1600/dropDepartmentsTable1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" rda="true" src="http://2.bp.blogspot.com/-4yl0690VIO4/Tp_5mKeJRuI/AAAAAAAAATE/btCca7WpPYQ/s320/dropDepartmentsTable1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;and select the single selection&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/-No2U899tGQs/Tp_5rGcASrI/AAAAAAAAATU/IRWerq-3xxU/s1600/singleRowSelection.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="273" rda="true" src="http://1.bp.blogspot.com/-No2U899tGQs/Tp_5rGcASrI/AAAAAAAAATU/IRWerq-3xxU/s320/singleRowSelection.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After creating the table, we will surround it with a &lt;strong&gt;panelCollection&lt;/strong&gt;&amp;nbsp; component. This container will hold the toolbar of the CRUD buttons for this table. Additionally, both in the panelCollectin and table, we set the &lt;strong&gt;AFStretchWidth&amp;nbsp;&lt;/strong&gt;&amp;nbsp; in the styleClass. It is recomended by Oracle in order to have properl full width layout.&lt;br /&gt;&lt;br /&gt;The we drop a toolbar in the panelCollections toolbar facet and then we drop the Department's operation from the DataControl.&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/-AwA_HFSd7bc/Tp_88c_LIBI/AAAAAAAAATc/RiZUWbU19PA/s1600/dragNdropOperationsSample.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" rda="true" src="http://4.bp.blogspot.com/-AwA_HFSd7bc/Tp_88c_LIBI/AAAAAAAAATc/RiZUWbU19PA/s320/dragNdropOperationsSample.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;We will add, createInsert, delete, commit and rollback. Commit and Rollback operations are for the whole datacontrol and not only for the Departments 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/-7hidt3mXxCY/Tp_-PIm-EqI/AAAAAAAAATk/it2Q0mB3qE0/s1600/depOperations.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" rda="true" src="http://3.bp.blogspot.com/-7hidt3mXxCY/Tp_-PIm-EqI/AAAAAAAAATk/it2Q0mB3qE0/s320/depOperations.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next, we have to create a popup. This popup will show the employees of the corresponding Department.&lt;br /&gt;Inside the popup we will add a Dialog. Inside this Dialog we will drag and Drop the Employees iterator and have exactly the same process as we did with Departments.&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/-aNvkGYUIyH8/Tp__a1QUfKI/AAAAAAAAATs/S_Q4mPe7vpw/s1600/dragNDropEmpls.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="181" rda="true" src="http://3.bp.blogspot.com/-aNvkGYUIyH8/Tp__a1QUfKI/AAAAAAAAATs/S_Q4mPe7vpw/s320/dragNDropEmpls.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Eventually, we will have a similar table with Departments.&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/-v79OEcGNa90/TqACWmLt9YI/AAAAAAAAAT0/jq66Qvg-M8A/s1600/empButtons.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" rda="true" src="http://4.bp.blogspot.com/-v79OEcGNa90/TqACWmLt9YI/AAAAAAAAAT0/jq66Qvg-M8A/s320/empButtons.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Popup component by default caches the first data that will be shown. In our case, we do not want that since we want a refreshed view of the employees. This means that we want to execute Query for employees for every Department.&lt;br /&gt;So we have to set &lt;strong&gt;lazyUncached &lt;/strong&gt;the contentDelivery property.&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/-cfCb5K2Sb7Y/TqAJpCaxGaI/AAAAAAAAAUM/N_b2YKikOX8/s1600/lazyncached.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" rda="true" src="http://3.bp.blogspot.com/-cfCb5K2Sb7Y/TqAJpCaxGaI/AAAAAAAAAUM/N_b2YKikOX8/s320/lazyncached.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;NOTE: Since we are using toolbars and toolbar buttons we have to&amp;nbsp; set the appropriate partial triggers. Toolbar buttons by default have the &lt;strong&gt;partialSubmit&lt;/strong&gt;&amp;nbsp; property to&amp;nbsp; &lt;strong&gt;true&lt;/strong&gt;. This means that we have to set the appropriate &lt;strong&gt;partialTriggers&lt;/strong&gt;&amp;nbsp; to the tables.&lt;br /&gt;Each table will be partially triggered by it's toolbar buttons. So in Every table, in the partialTriggers sections we will add the correspoing toolbar button ids.&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/-LAC_d1hMIQY/TqAEwR-R_BI/AAAAAAAAAT8/GJLtPewYs3E/s1600/empTablePartialTriggers.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="243" rda="true" src="http://2.bp.blogspot.com/-LAC_d1hMIQY/TqAEwR-R_BI/AAAAAAAAAT8/GJLtPewYs3E/s320/empTablePartialTriggers.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After setting the appropriate partialTriggers, the only thing left is, the edit button.&lt;br /&gt;&lt;br /&gt;We right click on the table and select insert Column.&lt;br /&gt;Then, we right click on the column and insert ADF faces button.&lt;br /&gt;After that, we right click on the button and insert ADF showPopupBehavior.&lt;br /&gt;In the showPopupBehavior we enter the popupId and the type of action:&lt;br /&gt;&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/-FPDcNlgGH7s/TqAHT5iLEYI/AAAAAAAAAUE/esMJez5H6-s/s1600/editButton.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="52" rda="true" src="http://3.bp.blogspot.com/-FPDcNlgGH7s/TqAHT5iLEYI/AAAAAAAAAUE/esMJez5H6-s/s320/editButton.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And that is it.&lt;br /&gt;When pressing Employees button, ADF will invoke additionally the selectionListener and make the departments current row. So every time we press the edit button, the current Department becomes current and the corresponding employees are fetched.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailInAPopup.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-8358799600161945947?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/8358799600161945947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-data-presentation-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8358799600161945947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8358799600161945947'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-data-presentation-and.html' title='Master Detail Data presentation and CRUD Operations. Detail records in an Editable Popup. ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-crhCuopomDc/Tp_5piPNxtI/AAAAAAAAATM/k5eXB2PfJnw/s72-c/initialBC.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-2877628865457027819</id><published>2011-10-19T16:05:00.000-07:00</published><updated>2011-10-20T00:20:46.159-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF BC Validation'/><title type='text'>Entity Attribute Validation Rule (Business Rule) based on Master View Object Attribute Example ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;Here is an example case of entity attribute validation rule.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ValidationRulesExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This example is using HR Schema of Oracle XE.&lt;br /&gt;The following case uses Employees and Departments Entities and View Objects.&lt;br /&gt;All Business components are created through JDeveloper 11g wizard.&lt;br /&gt;The validation will check if the ManagerId attribute of the Employees Entity has the same value as the ManagerId of the Department.&lt;br /&gt;We consider that there should not be the same Manager of a Department and an Employee.&lt;br /&gt;Just to clarify that this is an example and maybe the logic does not seem very logical....&lt;br /&gt;The point is to present the solution.&lt;br /&gt;So, what do we have so far?&lt;br /&gt;Two Entities (Employees and Departments) with their association (Master is the Departments entity)&lt;br /&gt;Two View Objects( Employees and Departments) with their corresponding entities and the appropriate view Link.&lt;br /&gt;&lt;br /&gt;Now, as we said earlier, we want to prevent the user from setting managerId value, for an Employee, which is the same as the managerId value for the corresponding Department.&lt;br /&gt;&lt;br /&gt;In order to implement this case the declarative way, we are going to create an &lt;b&gt;Entity Attribute Validation Rule &lt;/b&gt;&amp;nbsp;or in other words, &lt;b&gt;Entity Attribute Business Rule&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;We locate the Employees entity and the ManagerId attribute and press the green plus sign:&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/-TamcYj_IsEQ/Tp9A5j2iq0I/AAAAAAAAASE/2e7vvIoeRAw/s1600/addValidationInitialScreen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="209" src="http://3.bp.blogspot.com/-TamcYj_IsEQ/Tp9A5j2iq0I/AAAAAAAAASE/2e7vvIoeRAw/s320/addValidationInitialScreen.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;A new wizard window &amp;nbsp;will appear that will guide us to create the validation we want.&lt;br /&gt;For this scenario, we want to &lt;b&gt;compare&lt;/b&gt;&amp;nbsp;the Employees Entity managerId with the Departments &lt;b&gt;View Object &lt;/b&gt;&amp;nbsp;managerId. For that reason, we will select the value &lt;b&gt;View Object Attribute &lt;/b&gt;&amp;nbsp;value of the &lt;b&gt;Compare With &lt;/b&gt;&amp;nbsp;choice list. Further more we set the &lt;b&gt;Operator &lt;/b&gt;&amp;nbsp;to &lt;b&gt;&amp;nbsp;Not Equals&lt;/b&gt;.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jRLdDqUBUgc/Tp9A7SywasI/AAAAAAAAASY/eWmKk4XcYs8/s1600/selectVOAttribute.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="312" src="http://3.bp.blogspot.com/-jRLdDqUBUgc/Tp9A7SywasI/AAAAAAAAASY/eWmKk4XcYs8/s320/selectVOAttribute.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;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Location of te ManagerId&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-uqHPOY2sfh4/Tp9A6orW5HI/AAAAAAAAASU/kvEj56vz9s0/s1600/selectManagerID.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://3.bp.blogspot.com/-uqHPOY2sfh4/Tp9A6orW5HI/AAAAAAAAASU/kvEj56vz9s0/s320/selectManagerID.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;&lt;div class="separator" style="clear: both; text-align: center;"&gt;Setting the &lt;b&gt;&amp;nbsp;Not Equals&lt;/b&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;a href="http://1.bp.blogspot.com/-C9swrL9hEQg/Tp9C6C-URCI/AAAAAAAAASs/4GQZ3zs5Y0A/s1600/notEquals.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-C9swrL9hEQg/Tp9C6C-URCI/AAAAAAAAASs/4GQZ3zs5Y0A/s320/notEquals.png" width="296" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;The final thing to do is to set an appropriate message that will notify the user that this value cannot be accepted.&lt;br /&gt;&lt;br /&gt;This Rule Definition will be triggered &lt;b&gt;&amp;nbsp;when the Employees managerId attribute is the same as the Departments View Object managerId attribute.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-rQeO3D0TlnM/Tp9A7yCn9YI/AAAAAAAAASg/GQULpmgWJhU/s1600/validationMEssage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://3.bp.blogspot.com/-rQeO3D0TlnM/Tp9A7yCn9YI/AAAAAAAAASg/GQULpmgWJhU/s320/validationMEssage.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In order to test the example, we do not need to &amp;nbsp;create any jspx.. Since this is a BC validation, all we have to do is run the Application Module:&lt;br /&gt;&lt;br /&gt;In the following example: Department has ManagerId of nbr: 200&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-yJMauC_N7xU/Tp9Ej17N3_I/AAAAAAAAAS0/LZD4G6yh52A/s1600/depsMAnagerId.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="241" src="http://3.bp.blogspot.com/-yJMauC_N7xU/Tp9Ej17N3_I/AAAAAAAAAS0/LZD4G6yh52A/s320/depsMAnagerId.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;We double click on the Employees view and change the managerId to 200 and press tab. The result will be the following: (the message is just for fun.. .not an actuall logic message.. or is it? :) )&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/-7_RUVPyPJxw/Tp9EkMp31OI/AAAAAAAAAS8/XaVml34fG8U/s1600/errorMEssage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="208" src="http://2.bp.blogspot.com/-7_RUVPyPJxw/Tp9EkMp31OI/AAAAAAAAAS8/XaVml34fG8U/s320/errorMEssage.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And that is it..&lt;br /&gt;Dont you just feel &amp;nbsp;a little bit more &lt;b&gt;Declarative&lt;/b&gt; now?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ValidationRulesExample.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-2877628865457027819?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/2877628865457027819/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/entity-attribute-validation-business.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2877628865457027819'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2877628865457027819'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/entity-attribute-validation-business.html' title='Entity Attribute Validation Rule (Business Rule) based on Master View Object Attribute Example ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-TamcYj_IsEQ/Tp9A5j2iq0I/AAAAAAAAASE/2e7vvIoeRAw/s72-c/addValidationInitialScreen.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7873137834071526163</id><published>2011-10-17T01:34:00.000-07:00</published><updated>2011-10-17T01:34:51.291-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><title type='text'>Master Detail on separate Pages and Separate Task Flows ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is another small example of how to present Master-Detail information. This example will show to&amp;nbsp;present&amp;nbsp;master detail data&amp;nbsp;over different pages where each page exists in a different task Flow.&lt;br /&gt;Furthermore, you can find a &lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=2298219&amp;amp;tstart=0"&gt;discussion in the forum&lt;/a&gt;, where this post was inspired from.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailOnASeparatePageAndTaskFlowExample.zip"&gt;Download The Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The implementation is almost the same as a previous post:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-jspx.html"&gt;http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-jspx.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The difference here is that, Master Detail pages exist in different task Flows.&lt;br /&gt;This approach has the following differences:&lt;br /&gt;&lt;br /&gt;Create another task flow for the details page.&lt;br /&gt;&lt;br /&gt;In the master task flow, make a call to another task flow (the details task flow that is..) instead of a page.&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/-0WgiQ44ePEk/TpviL0kebzI/AAAAAAAAAR0/X0v9G6WZayw/s1600/masterTaskFlow.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="189" oda="true" src="http://4.bp.blogspot.com/-0WgiQ44ePEk/TpviL0kebzI/AAAAAAAAAR0/X0v9G6WZayw/s320/masterTaskFlow.JPG" 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;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;In the details task flow, make a call to a task flow return instead of the master page. The task flow return will return to the calling task flow.&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3gK9hLC0YlM/TpviLCldKkI/AAAAAAAAARs/ZR1W1Bk4sJw/s1600/detailTaskFlow.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="181" oda="true" src="http://1.bp.blogspot.com/-3gK9hLC0YlM/TpviLCldKkI/AAAAAAAAARs/ZR1W1Bk4sJw/s320/detailTaskFlow.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;And here is the "tricky" part of the implementation. In order to keep the task flows &lt;span style="font-family: &amp;quot;Times New Roman&amp;quot;; font-size: 12pt; mso-ansi-language: EN-GB; mso-bidi-language: AR-SA; mso-fareast-font-family: &amp;quot;Times New Roman&amp;quot;; mso-fareast-language: EN-GB;"&gt;synchronised &lt;/span&gt;with each other in terms of Data Control, we have to share the same Data Control. &lt;/div&gt;&lt;div style="border-bottom: medium none; border-left: medium none; border-right: medium none; border-top: medium none;"&gt;This can be easily done by selecting a check box in the detail task flow that will do just that. It will "get" the Data Control of the calling task Flow.&lt;/div&gt;&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/-w5opmLjiXlA/TpviMenoK5I/AAAAAAAAAR8/RrZDQkfgxig/s1600/taskFlowSetting.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="102" oda="true" src="http://3.bp.blogspot.com/-w5opmLjiXlA/TpviMenoK5I/AAAAAAAAAR8/RrZDQkfgxig/s320/taskFlowSetting.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, every time the master task flow will call the detail task flow, it will delegate the Data Controls. This means that there will be a consistency between Master and Detail task flows in terms of data.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailOnASeparatePageAndTaskFlowExample.zip"&gt;Download The Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-7873137834071526163?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7873137834071526163/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-and.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7873137834071526163'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7873137834071526163'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-and.html' title='Master Detail on separate Pages and Separate Task Flows ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-0WgiQ44ePEk/TpviL0kebzI/AAAAAAAAAR0/X0v9G6WZayw/s72-c/masterTaskFlow.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7436967519624349380</id><published>2011-10-14T04:05:00.000-07:00</published><updated>2011-10-17T01:35:07.647-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><title type='text'>Master Detail on Separate Pages jspx ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;This is an example of using a typical master detail relationship but in different pages.&lt;br /&gt;The master will be in one page and the details will be in another page.&lt;br /&gt;The use case is simple.&lt;br /&gt;Select a master row from a table and then navigate to the details table of this master which are in another page.&lt;br /&gt;For this case we will use the Department and the Employees tables of the HR Schema.&lt;br /&gt;The Departmens will be the master page and the Employees will be the details page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailOnASeparatePageExample.zip"&gt;Download The Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;For starters.&amp;nbsp; We have to create the appropriate ViewLinks between DepartmentView and employeesView.&lt;br /&gt;&lt;br /&gt;The "trick" here is to use the appropriate iterators in the same DataControl.&lt;br /&gt;&lt;br /&gt;This means that, in our case, we will have a task flow with two view inside that will share the same data control.&lt;br /&gt;&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/-gQdvOGIyVWY/TpgP87OkvWI/AAAAAAAAARc/kBOc0xUyi9k/s1600/taskFlow.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" oda="true" src="http://1.bp.blogspot.com/-gQdvOGIyVWY/TpgP87OkvWI/AAAAAAAAARc/kBOc0xUyi9k/s320/taskFlow.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;So, in the first page, we will drag and drop departments iterator as a table. Add a button for the navigation.&lt;br /&gt;&lt;br /&gt;For the second page, we will drag and drop employees iterator, the one that resides inside the Departments tree.&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/-pVALxeuqTKk/TpgQsZwDU3I/AAAAAAAAARk/32SegtURYz8/s1600/dndEmps.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="141" oda="true" src="http://1.bp.blogspot.com/-pVALxeuqTKk/TpgQsZwDU3I/AAAAAAAAARk/32SegtURYz8/s320/dndEmps.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;And that it is.. The framework will take care of the rest. The Binding layer will keep the relationship open between the two iterators since they are sharing the same dataControl.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailOnASeparatePageExample.zip"&gt;Download the sample Application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-7436967519624349380?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7436967519624349380/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-jspx.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7436967519624349380'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7436967519624349380'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/master-detail-on-separate-pages-jspx.html' title='Master Detail on Separate Pages jspx ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-gQdvOGIyVWY/TpgP87OkvWI/AAAAAAAAARc/kBOc0xUyi9k/s72-c/taskFlow.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-6182893201615581198</id><published>2011-10-12T06:15:00.000-07:00</published><updated>2011-10-12T06:15:20.524-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Misc'/><title type='text'>ADF Survey</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today, Grant Roland published a post regarding a goal to improve ADF. There is a survey for ADF that will help Oracle improve, even more, the ADF future.&lt;br /&gt;&lt;br /&gt;Let us all express our opinion and provide feedback for the best possible improvement of ADF.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://blogs.oracle.com/grantronald/entry/your_chance_to_change_the"&gt;http://blogs.oracle.com/grantronald/entry/your_chance_to_change_the&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="https://www.oraclesurveys.com/se.ashx?s=705E3EFC4861B8FE"&gt;https://www.oraclesurveys.com/se.ashx?s=705E3EFC4861B8FE&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Dimitris.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-6182893201615581198?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/6182893201615581198/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/adf-survey.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6182893201615581198'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6182893201615581198'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/adf-survey.html' title='ADF Survey'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3598954793748047659</id><published>2011-10-11T16:13:00.000-07:00</published><updated>2011-10-11T16:13:38.469-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Create Row in a Table after leaving an input Field (ValueChangeListener usage) ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;This is a sample application demonstrating the following case:&lt;br /&gt;We have an af:table with rows from a View Object. What we want is to create a new row right after leaving an input Field.&lt;br /&gt;What we are going to do is to make use of the valueChangeListener.&lt;br /&gt;First we are going to do is to create a simple page.&lt;br /&gt;For this example, the HR schema is used and more specifically the Regions Table.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowWhenLeavingFieldExample.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After creating the appropriate Business components (entities and view objects), we will create a jspx with its pageDefinition. In the jspx we drag and drop the Regions View Object as a table.&lt;br /&gt;In the page Definition, we add the operation binding of CreateInsert.&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/-SVgh31IdRwU/TpTIIeO4oOI/AAAAAAAAAQ8/K074oUEw8cI/s1600/CreateInsertOperation2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="182" src="http://4.bp.blogspot.com/-SVgh31IdRwU/TpTIIeO4oOI/AAAAAAAAAQ8/K074oUEw8cI/s320/CreateInsertOperation2.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After that, we select the input field we want to use for the creation of the new row and we create a valueChangeListener. If no Backing Bean is present the wizard will help us create one on the fly and very easily. Additionally, we have to set this field to autoSubmit=true; &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-avkbO6C_FX8/TpTJ8HSS9cI/AAAAAAAAARE/KPhbOWSwd5Q/s1600/inputSettings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="211" src="http://3.bp.blogspot.com/-avkbO6C_FX8/TpTJ8HSS9cI/AAAAAAAAARE/KPhbOWSwd5Q/s320/inputSettings.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Furthermore, we have to create a binding of the Regions table because we need it in order to refresh the table right after the creation of the row. The refresh is needed because we want to show to the user (actually refresh the UI)&amp;nbsp; that the row is already created and correctly shown.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-wIumr-Y4cbk/TpTMGE0xDRI/AAAAAAAAARM/FavMN6A_WbQ/s1600/TheBinding.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="190" src="http://4.bp.blogspot.com/-wIumr-Y4cbk/TpTMGE0xDRI/AAAAAAAAARM/FavMN6A_WbQ/s320/TheBinding.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The last this left is to write some code in order to actually create the new row right after leaving the input field (via pressing tab lets say)&lt;br /&gt;&lt;br /&gt;The code to write in the ValueChangeListener is fairly small and rather easy. All we have to do is call the CreateInsert operationBinding and then refresh our table.&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/-BAy9Drrd3QY/TpTMGv1U7YI/AAAAAAAAARU/4AAd3gqKdro/s1600/valueChangeListenerScreen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="174" src="http://4.bp.blogspot.com/-BAy9Drrd3QY/TpTMGv1U7YI/AAAAAAAAARU/4AAd3gqKdro/s320/valueChangeListenerScreen.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;And that is it.&lt;br /&gt;When you run the application you will see that after changing a value and pressing tab a new row will appear on the table. Note that this row is not posted in the DB and does not exist there. This sample application has no other operations like commit or rollback included.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowWhenLeavingFieldExample.zip"&gt;Download the sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&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/294172151396534006-3598954793748047659?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3598954793748047659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/create-row-in-table-after-leaving-input.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3598954793748047659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3598954793748047659'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/create-row-in-table-after-leaving-input.html' title='Create Row in a Table after leaving an input Field (ValueChangeListener usage) ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-SVgh31IdRwU/TpTIIeO4oOI/AAAAAAAAAQ8/K074oUEw8cI/s72-c/CreateInsertOperation2.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-2937835621023714136</id><published>2011-10-11T14:16:00.000-07:00</published><updated>2011-10-11T14:16:34.110-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Reusable Code'/><title type='text'>ADFUtils.java And JSFUtils.java</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi this is some kind of personal finder.. I uploaded an Application containing the ADFUtils.java and JSFUtils.java classes create by three ADF Ninjas:&lt;br /&gt;@author Duncan Mills&lt;br /&gt;@author Steve Muench&lt;br /&gt;@author Ric Smith &lt;br /&gt;&lt;br /&gt;I know, at this point I have to say that this is not my code. I did not wrote it. I simply put it up in my blog because I seem to loose track from time to time and I need it somewhere that I can easily find and download. Of course, the code is in the Demo as mentioned here&lt;br /&gt;&lt;br /&gt;&lt;a href="https://forums.oracle.com/forums/thread.jspa?threadID=1105943"&gt;https://forums.oracle.com/forums/thread.jspa?threadID=1105943&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But again, I find it more practical to additionally have it on my own list without claiming any credit for this code.&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_1545913840"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ADFJSFUtilsApplication.zip"&gt;http://adfsampleslist.googlecode.com/files/ADFJSFUtilsApplication.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Dimitris.&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/294172151396534006-2937835621023714136?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/2937835621023714136/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/adfutilsjava-and-jsfutilsjava.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2937835621023714136'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2937835621023714136'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/adfutilsjava-and-jsfutilsjava.html' title='ADFUtils.java And JSFUtils.java'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3466823433737691790</id><published>2011-10-09T13:29:00.000-07:00</published><updated>2011-10-09T13:32:25.396-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Rollback After Validation Error Entity Level. ADF 11g</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;There has been a &lt;a href="https://forums.oracle.com/forums/thread.jspa?messageID=9922931#9922931"&gt;discussion in the OTN forum&lt;/a&gt; regarding how to rollback when an Entity validation error appears..&lt;br /&gt;Well, at first, I thought we could use the refresh(int refMode) method inside a validation method which will reside in EntityImpl java class. This thing is that this approach does not seem to work properly... at least for me.. Or maybe, according to documentation, I cannot place the correct combination of refresh MOdes.. If anyone has a successful example, please&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/Row.html#refresh%28int%29"&gt;http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/Row.html#refresh%28int%29&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The case is rather simple.&lt;br /&gt;We have a validation rule for an attribute. If this validation fails, we have to rollback.&lt;br /&gt;Well, of course the validation rule will be applied in the BC and more specifically in the entity. Since we want to have an additional logic after the validation, we will create a validation method through the wizard.&lt;br /&gt;So, after our validation method, we will rollback, calling the DBTransaction rollback;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;this.getDBTransaction().rollback();&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This example&lt;b&gt; will always rollback&lt;/b&gt;. It is just an example.&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/-zLnE1hk6wwE/TpIA6NKPxKI/AAAAAAAAAQ4/3Ag5s84mSMg/s1600/validationMethodRollback.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="59" src="http://2.bp.blogspot.com/-zLnE1hk6wwE/TpIA6NKPxKI/AAAAAAAAAQ4/3Ag5s84mSMg/s320/validationMethodRollback.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After setting up successfully the validation method to the DepartmentName attribute in the EntityImpl java class, all we have to do is to drag and drop the Departments Iterator in our jspx as a af:table. Last thing is to have the DepartmentName autosubmit=true.&lt;br /&gt;And that's it, it will refresh the value from the db.&lt;br /&gt;&lt;br /&gt;Download the Sample application:&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ValidationRefreshExample.zip"&gt;http://adfsampleslist.googlecode.com/files/ValidationRefreshExample.zip&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;Dimitris.&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/294172151396534006-3466823433737691790?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3466823433737691790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/10/rollback-after-validation-error-entity.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3466823433737691790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3466823433737691790'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/10/rollback-after-validation-error-entity.html' title='Rollback After Validation Error Entity Level. ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-zLnE1hk6wwE/TpIA6NKPxKI/AAAAAAAAAQ4/3Ag5s84mSMg/s72-c/validationMethodRollback.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-6065575793657223545</id><published>2011-07-23T14:50:00.000-07:00</published><updated>2011-07-23T14:50:25.882-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Weblogic Server'/><title type='text'>Insufficient Disk space! Install Oracle Weblogic 10.3.5 on a Mac OS X 10.5</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;After downloading the generic install of Oracle Weblogic Server 10.3.5 (wls1035_generic.jar), I kept trying to install it on my mac OS X 10.5.8. I always got the "Insufficient disk space!" message even though I had sufficient disk space message..&lt;br /&gt;&lt;br /&gt;After quite some time on searching I discovered that I had to place the following command in order to install it properly:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;java -Dos.name=unix -jar wls1035_generic.jar&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Well, that worked for me. Just another post for faster results while searching the internet.&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-6065575793657223545?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/6065575793657223545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/07/insufficient-disk-space-install-oracle.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6065575793657223545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6065575793657223545'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/07/insufficient-disk-space-install-oracle.html' title='Insufficient Disk space! Install Oracle Weblogic 10.3.5 on a Mac OS X 10.5'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-6987287562741191957</id><published>2011-07-14T12:24:00.000-07:00</published><updated>2011-11-10T07:19:24.017-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper 11.1.2.1.0'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Displaying a One To Many Master Detail Relationship In a Row.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;&lt;br /&gt;Here is the scenario based on the HR Schema of Oracle XE.&lt;br /&gt;&lt;br /&gt;UPDATE: Application is updated for 11.1.2.1.0.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;How could we represent a Department with all the employees in an horizontal way. &lt;i&gt;In a row that means&lt;/i&gt;&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;This is a typical master detail representation and can be easily done with tables. With ADF can be done quite fast. But, what if we want to have rows of Departments and the Employees of each Department in a single row?&lt;br /&gt;&lt;br /&gt;Why bother doing it?? Well, why not?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailHorizontal.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailHorizontal21.zip"&gt;Download Sample for 11.1.2.1.0 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Here is a sample implementation to an answer.&lt;br /&gt;Basically what we want is to have a table and, in each row, we want to have cells of the Department and a couple of cells for each employee of the corresponding Department. &lt;br /&gt;This solution (I am sure there will be others) takes advantage of the tree binding of the page definition.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Ingredients:&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Entities&lt;/b&gt;: Departments, Employees&lt;br /&gt;&lt;b&gt;Entity Associations&lt;/b&gt;: Departments and Employees&lt;br /&gt;&lt;b&gt;Views&lt;/b&gt;: Departments, Employees&lt;br /&gt;&lt;b&gt;View Links&lt;/b&gt;: Departments and Employees from the above mentioned Entity Association.&lt;br /&gt;&lt;br /&gt;a jspx with a page definition&lt;br /&gt;&lt;br /&gt;and some manual coding in the jspx.&lt;br /&gt;&lt;br /&gt;For the Business Components creation, we use the wizard and we produce the bc we want. Actually, there are only two tables, Departments and Employees.&lt;br /&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/-5QeOpG0Fmrk/Th4XUkzJKtI/AAAAAAAAAQA/6uhdREXO5jQ/s1600/bc_apmodule.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="93" src="http://4.bp.blogspot.com/-5QeOpG0Fmrk/Th4XUkzJKtI/AAAAAAAAAQA/6uhdREXO5jQ/s320/bc_apmodule.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then, we create a jspx and a page Definition.&lt;br /&gt;In the page Definition, we add a tree component:&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/-iaZX08VSAhI/Th4ZSSB5_8I/AAAAAAAAAQE/VoHsgYIpIUQ/s1600/createTree.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://4.bp.blogspot.com/-iaZX08VSAhI/Th4ZSSB5_8I/AAAAAAAAAQE/VoHsgYIpIUQ/s320/createTree.png" width="320" /&gt;&amp;nbsp;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;after pressing ok, we select the root data source. In our case is the DepartmentsView. &lt;/div&gt;&lt;br /&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/-TrD0Z__f2c0/Th4Z97CHMUI/AAAAAAAAAQI/O87B20UJ4XY/s1600/rootDataSource.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" src="http://4.bp.blogspot.com/-TrD0Z__f2c0/Th4Z97CHMUI/AAAAAAAAAQI/O87B20UJ4XY/s320/rootDataSource.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After pressing ok, we shuttle the DepartmentName attribute on the right:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-k5OJ9QZgkZ8/Th4cDOm_jII/AAAAAAAAAQM/D8C84VuVrmc/s1600/shuttleDepName.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-k5OJ9QZgkZ8/Th4cDOm_jII/AAAAAAAAAQM/D8C84VuVrmc/s320/shuttleDepName.png" width="270" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then, again, add another rule, the one of the employees and shuttle the FirstName and the LastName (the same as we did with Departments):&lt;br /&gt;&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/-CKwTwq2zz94/Th4cwpidlcI/AAAAAAAAAQQ/AH1QyZefTdc/s1600/shuttleFnLn.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-CKwTwq2zz94/Th4cwpidlcI/AAAAAAAAAQQ/AH1QyZefTdc/s320/shuttleFnLn.png" width="272" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, basically, we are done with our bindings. That's it. All we have to do is "paint" our page.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;We are going to manually construct our table. We are going to use the simple html table, for this example, and the af:iterator component.&lt;br /&gt;What we are going to do is to iterate the Depts and for each dept we are going to iterate the employees.&lt;br /&gt;&lt;br /&gt;At that time we are going to create our table.&lt;br /&gt;&lt;br /&gt;So, for every  we will place 2  for the information for every department&lt;br /&gt;Inside the same  we will start a new iterator.&lt;br /&gt;The employees iterator.&lt;br /&gt;&lt;b&gt;In order to fetch the correct employees all we have to do is to get the children of&lt;/b&gt;&lt;br /&gt;&lt;b&gt;the var of the master iterator&lt;/b&gt;&lt;br /&gt;Since we want to be represented as a "table" &lt;br /&gt;&lt;br /&gt;Eventually our table will look something like the following:&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/-faF3wITBpWI/Th88cW0mxpI/AAAAAAAAAQU/JZF_Gu6g4WU/s1600/lookLine.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="147" src="http://1.bp.blogspot.com/-faF3wITBpWI/Th88cW0mxpI/AAAAAAAAAQU/JZF_Gu6g4WU/s320/lookLine.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see from the picture above the number of the employees is not standard. This is quite logical since every Department might have different number of employees. For the sake of the example, we limited the number of rows of the employees iterator to 2.&amp;nbsp; So what we see is maximum 2 employees&amp;nbsp; of every Department. Of course one can easily change this number to a more dynamic one.&lt;br /&gt;Below are the screens of the code of the jspx:&lt;br /&gt;&lt;br /&gt;For the Labels:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Bk6WV8pOBHs/Th9AerDCMCI/AAAAAAAAAQY/BXpMOaqdvpw/s1600/labelsIteration.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="261" src="http://1.bp.blogspot.com/-Bk6WV8pOBHs/Th9AerDCMCI/AAAAAAAAAQY/BXpMOaqdvpw/s320/labelsIteration.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;For the actual Data:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/--qZRdLKEQtg/Th9Ak5_TlVI/AAAAAAAAAQc/Qhq3g4p6zWk/s1600/dataCode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="250" src="http://2.bp.blogspot.com/--qZRdLKEQtg/Th9Ak5_TlVI/AAAAAAAAAQc/Qhq3g4p6zWk/s320/dataCode.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As you can see, it is fairly easy to present horizontally a one to many relationship..&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailHorizontal.zip"&gt;Download the sample application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/MasterDetailHorizontal21.zip"&gt;Download Sample for 11.1.2.1.0 &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-6987287562741191957?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/6987287562741191957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/07/displaying-one-to-many-master-detail.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6987287562741191957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/6987287562741191957'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/07/displaying-one-to-many-master-detail.html' title='Displaying a One To Many Master Detail Relationship In a Row.'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-5QeOpG0Fmrk/Th4XUkzJKtI/AAAAAAAAAQA/6uhdREXO5jQ/s72-c/bc_apmodule.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-1127192370620229849</id><published>2011-05-18T00:37:00.000-07:00</published><updated>2011-05-18T00:37:33.904-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>JDeveloper 11.1.1.5 severe bug</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Michael Koniotakis&lt;/b&gt; &lt;a href="http://adfbugs.blogspot.com/2011/05/jdeveloper-11115-serius-bug.html"&gt;posted in his blog a very severe problem regarding JDeveloper 11.1.1.5&lt;/a&gt;.&lt;br /&gt;The problem is related to the Rollback button and the immediate property.&lt;br /&gt;It is also mentioned in the forums : &lt;a href="http://forums.oracle.com/forums/thread.jspa?messageID=9587923#9587923"&gt;http://forums.oracle.com/forums/thread.jspa?messageID=9587923#9587923&lt;/a&gt; &lt;br /&gt;&lt;br /&gt;In the forum, it is mentioned by Didier Laurent ( &lt;a href="http://blogs.oracle.com/Didier/"&gt;http://blogs.oracle.com/Didier/&lt;/a&gt; ) that an Alert is raised&amp;nbsp; in&amp;nbsp; "My Oracle Support" .&lt;br /&gt;&lt;br /&gt;I am sure a patch will come out soon to fix the major issue.&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/294172151396534006-1127192370620229849?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/1127192370620229849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/05/jdeveloper-11115-severe-bug.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/1127192370620229849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/1127192370620229849'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/05/jdeveloper-11115-severe-bug.html' title='JDeveloper 11.1.1.5 severe bug'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-9188792763868310982</id><published>2011-04-28T13:45:00.000-07:00</published><updated>2011-04-28T14:15:42.348-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>ViewObjectImpl findByKey(Key key, int i) example</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;This is a small sample application demonstrating the findByKey(Key key,int i) method.&lt;br /&gt;According to the API:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#findByKey_oracle_jbo_Key__int_"&gt;http://download.oracle.com/docs/cd/B14099_19/web.1012/b14022/oracle/jbo/server/ViewObjectImpl.html#findByKey_oracle_jbo_Key__int_&lt;/a&gt;&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/-hsMyRHgpImI/TbnRyRCKgPI/AAAAAAAAAPo/PtSt-YR_APY/s1600/api.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://1.bp.blogspot.com/-hsMyRHgpImI/TbnRyRCKgPI/AAAAAAAAAPo/PtSt-YR_APY/s320/api.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;h3&gt;&lt;span class="Apple-style-span" style="font-size: small; font-weight: normal;"&gt;&lt;br /&gt;&lt;dl&gt;&lt;dd&gt;&lt;dl&gt;&lt;dd&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;This can be useful when we want to navigate to a page for instance displaying a given row and not actually filtering the dataset retrieved from the query.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/FindByKeyExample.rar"&gt;Download the Sample Application&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The test case is fairly simple. Lets use the HR schema.&lt;/div&gt;&lt;div&gt;We create an Application and produced the Business Components of the Employees and EmployessDetailsView tables. Just using the JDeveloper Wizard.&lt;/div&gt;&lt;div&gt;The result is to have, among others, the following views:&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;EmployeesView&lt;/div&gt;&lt;div&gt;EmpDetailsViewView&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-u5Ck0ESPcU8/TbnKms4wqjI/AAAAAAAAAPQ/lTIlgLzJaUI/s1600/JDevWizard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="245" src="http://3.bp.blogspot.com/-u5Ck0ESPcU8/TbnKms4wqjI/AAAAAAAAAPQ/lTIlgLzJaUI/s320/JDevWizard.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The findByKey method as we saw in the API accepts a parameter of type Key.&lt;/div&gt;&lt;div&gt;The case for this example is to use the key for one VO object and call the findByKey method to find a row in the other VO and make it current.&lt;/div&gt;&lt;div&gt;So we have to alter the EmpDetailsView entity Object a bit. We need to set the primary to point to EmployeeId and remove the RowId, smartly, produced by JDeveloper wizard.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-607y7GD7AdE/TbnL5eIW8XI/AAAAAAAAAPU/GEF4uNugYK8/s1600/EntityDetailPKChange.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="209" src="http://1.bp.blogspot.com/-607y7GD7AdE/TbnL5eIW8XI/AAAAAAAAAPU/GEF4uNugYK8/s320/EntityDetailPKChange.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;&lt;div class="separator" style="clear: both; text-align: center;"&gt;and the View Object should be like the following:&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-XECUOZHTHBU/TbnL56SrYUI/AAAAAAAAAPY/JWyTuxVVdZk/s1600/ViewDetailPk.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="224" src="http://3.bp.blogspot.com/-XECUOZHTHBU/TbnL56SrYUI/AAAAAAAAAPY/JWyTuxVVdZk/s320/ViewDetailPk.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Note here that we are not creating any ViewLinks. This will simply filter our data and we wont be able to see all other data.&lt;/div&gt;&lt;div&gt;Furthermore, we will create two separate pages for each VO and we will navigate from one page to another.&lt;/div&gt;&lt;div&gt;We will create a form in each page with navigation buttons. Additionally we will move from one page to another and see the appropriate information.&amp;nbsp;&lt;/div&gt;&lt;div&gt;For example, while in page of Employees, we will navigate to record with EmployeeId=107 and then press the button to go to EmpDetails. The same operation will be done from EmpDetails to Employees.&lt;/div&gt;&lt;div&gt;The goal is to have consistent data according the employeeId.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;As you understood by now, we will use the findByKey method...&lt;/div&gt;&lt;div&gt;Simply, we will create two separate methods in the Application Module Implementation class that will do the work.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cWVx20B2rK8/TbnNnuUmRTI/AAAAAAAAAPc/qPxoOlaNNpo/s1600/FindByKeyMethods_001.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="216" src="http://1.bp.blogspot.com/-cWVx20B2rK8/TbnNnuUmRTI/AAAAAAAAAPc/qPxoOlaNNpo/s320/FindByKeyMethods_001.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;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;What we do here is to get the Key from the One's VO current Row and find by key to another.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Now, we need to call these methods.&amp;nbsp;&lt;/div&gt;&lt;div&gt;We will expose them in the client interface of the Application Module&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-h7K3MZ_f7ns/TbnOVXRusbI/AAAAAAAAAPg/8KFt5KF0pXg/s1600/exposed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="146" src="http://4.bp.blogspot.com/-h7K3MZ_f7ns/TbnOVXRusbI/AAAAAAAAAPg/8KFt5KF0pXg/s320/exposed.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Next we will create a task Flow of three (3) pages.&lt;/div&gt;&lt;div&gt;Index: from which we will navigate to Employees or EmpDetails pages&lt;/div&gt;&lt;div&gt;Emps: from which we will navigate either to EmpDetails or &amp;nbsp;Index pages&lt;/div&gt;&lt;div&gt;EmpDetails: from which we will navigate to either Emps or Index pages.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;The trick here is to&amp;nbsp;interfere the calls from Emps to EmpDetails and vice versa in order to call the findByKey methods.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Since we have them exposed, we will simply drag and drop them to our taskFlow and have to be called before going to the page we want.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-3qOhBPJurSA/TbnPswsj3aI/AAAAAAAAAPk/sfLN_Taj8t0/s1600/dndMethods.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" src="http://3.bp.blogspot.com/-3qOhBPJurSA/TbnPswsj3aI/AAAAAAAAAPk/sfLN_Taj8t0/s320/dndMethods.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&amp;nbsp;&amp;nbsp;&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;dl&gt;&lt;dd&gt;&lt;dl&gt;&lt;div&gt;And that is about it..&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;Every time we navigate from one page to another, the corresponding findByKey will be called and we will see the data set according the EmployeeId.&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/FindByKeyExample.rar"&gt;Download the Sample Application&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;/div&gt;&lt;div&gt;cheers.&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div dir="rtl" style="text-align: right;"&gt;&lt;/div&gt;&lt;div style="text-align: left;"&gt;&lt;/div&gt;&lt;/dl&gt;&lt;/dd&gt;&lt;/dl&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-9188792763868310982?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/9188792763868310982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2011/04/viewobjectimpl-findbykeykey-key-int-i.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/9188792763868310982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/9188792763868310982'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2011/04/viewobjectimpl-findbykeykey-key-int-i.html' title='ViewObjectImpl findByKey(Key key, int i) example'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-hsMyRHgpImI/TbnRyRCKgPI/AAAAAAAAAPo/PtSt-YR_APY/s72-c/api.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7501947426720093694</id><published>2010-12-21T04:34:00.000-08:00</published><updated>2010-12-21T04:36:36.841-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='JDeveloper'/><title type='text'>Restore Deleted files in JDeveloper (No SVN)</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;I accidentally deleted some files of a project of mine. I could not revert anything because I did not have any version control on them.. I searched everywere, in recycle bin in file System of my windows.. nothing.. &lt;br /&gt;However, I managed to discover them under the following path:&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;C:\Documents and Settings\DStasino\Application Data\JDeveloper\system11.1.1.3.37.56.60\.history&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;There are many folders with numbers, every folder holds a history of a file with a date modifed.&lt;br /&gt;&lt;br /&gt;The files inside the folder are in raw format. I you open it with some editor you will see the file you might be looking for. So, what I did is to rename and change the file extension and place it back to my project!&lt;br /&gt;&lt;br /&gt;That was a great relief...&lt;br /&gt;&lt;br /&gt;If anyone knows any more declarative way, please share.&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-7501947426720093694?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7501947426720093694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/12/restore-deleted-files-in-jdeveloper-no.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7501947426720093694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7501947426720093694'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/12/restore-deleted-files-in-jdeveloper-no.html' title='Restore Deleted files in JDeveloper (No SVN)'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5838325687721035098</id><published>2010-11-17T05:09:00.000-08:00</published><updated>2010-11-17T05:09:07.040-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Entity Inheritance And Passivation-Activation Possible Problem in ADF 11g</title><content type='html'>&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;Hi,&lt;br /&gt;&lt;br /&gt;It seems to be a very strange behavior when it comes to Entity Inheritance and Passivation-Activation.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/InheritancePassivationProblem.zip"&gt;Download the Sample Application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Lets Say that we want to create an application that wants to do the following:&lt;br /&gt;&lt;br /&gt;1) Use Entity Inheritance&lt;br /&gt;&lt;br /&gt;2) Have one View Object and interact with it, leaving the inheritance do the magic&lt;br /&gt;&lt;br /&gt;3) Create an insert Operation to the subtype. The method will reside in the AM and exposed to the client interface.&lt;br /&gt;&lt;br /&gt;4) Create a sample jspx and drop a Form of the View Object.&lt;br /&gt;&lt;br /&gt;5) Drop the insert operation onto the jspx&amp;nbsp; sample page.&lt;br /&gt;&lt;br /&gt;6) Have our application tested with and without&amp;nbsp;the AM pooling.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Implementation&lt;/strong&gt;:&lt;br /&gt;&lt;br /&gt;Lets take those steps one by one:&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt;As Far as the Entity Inheritance, we will follow the ADF documentation that describes us how to do it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadveo.htm#sm0327"&gt;http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadveo.htm#sm0327&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;First we create the Employees entity.&lt;br /&gt;In the Employees Entity, we set the attribute &lt;strong&gt;JobId&lt;/strong&gt; as the &lt;strong&gt;discriminator&lt;/strong&gt; Attribute. We do not set any Default Value in this attribute since we want to handle all case that are not included in the subtype.&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/_YtJHabtSoq8/TOOygzJyi_I/AAAAAAAAAOA/x4NW_n3IHOI/s1600/BaseEntityEmployeesDiscr.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="186" px="true" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TOOygzJyi_I/AAAAAAAAAOA/x4NW_n3IHOI/s320/BaseEntityEmployeesDiscr.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Next, we create another Entity that extends the Employees entity. The name is &lt;strong&gt;EmployeesAC_ACCOUNT&lt;/strong&gt;&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/_YtJHabtSoq8/TOOyef64ZcI/AAAAAAAAAN8/FbG45eXiPrk/s1600/extends.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" px="true" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TOOyef64ZcI/AAAAAAAAAN8/FbG45eXiPrk/s320/extends.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the EmployeesAC_ACCOUNT we have set a Default Value in the Discriminator Attribute: "&lt;strong&gt;AC_ACCOUNT"&lt;/strong&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPCaDdwFmI/AAAAAAAAAOQ/mkfIFzG8W8U/s1600/ac_accountDescriDefaultValue.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="185" px="true" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPCaDdwFmI/AAAAAAAAAOQ/mkfIFzG8W8U/s320/ac_accountDescriDefaultValue.PNG" width="320" /&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;br /&gt;2)&lt;br /&gt;To create a View Object with prolymorphic entities, we follow the ADF documentation that describes how to do it:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvvo.htm#sm0515"&gt;http://download.oracle.com/docs/cd/E15523_01/web.1111/b31974/bcadvvo.htm#sm0515&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This means that we create a viewObject based on the entity, and then add the subtypes&lt;br /&gt;&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/_YtJHabtSoq8/TOOytwz_ClI/AAAAAAAAAOM/gMy-pFP3bMQ/s1600/subtypes.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" px="true" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TOOytwz_ClI/AAAAAAAAAOM/gMy-pFP3bMQ/s320/subtypes.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3) In Order to create a row in the subtype, we follow the documentation of the step 2) and specifically the chapter:&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;strong&gt;39.6.4.3 Creating New Rows With the Desired Entity Subtype&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;So we created a method in the Application Module that does the following:&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/_YtJHabtSoq8/TOPEX_B9bQI/AAAAAAAAAOU/g3NY0CCwSUU/s1600/AMCode.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" px="true" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPEX_B9bQI/AAAAAAAAAOU/g3NY0CCwSUU/s320/AMCode.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;4) Next, we create a simple page with a Form of the Employees View Object. &lt;br /&gt;A Drag n Drop in the ADF world..&lt;br /&gt;&lt;br /&gt;5) We expose the AM method in the client interface and we drop it as button in the Form&lt;br /&gt;&lt;br /&gt;In Result we have the following layout:&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/_YtJHabtSoq8/TOPF32cFNVI/AAAAAAAAAOY/t5dCVQ0u3gE/s1600/formLayout.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" px="true" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TOPF32cFNVI/AAAAAAAAAOY/t5dCVQ0u3gE/s320/formLayout.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;If we run the application and press the create button we will see the following:&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/_YtJHabtSoq8/TOPGq02qcBI/AAAAAAAAAOc/VCi0NcZYVFs/s1600/createSCreenShot.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="177" px="true" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPGq02qcBI/AAAAAAAAAOc/VCi0NcZYVFs/s320/createSCreenShot.PNG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;As you can see, the discriminator value has the value passed from the create method.&lt;br /&gt;&lt;br /&gt;If we set values to all fields and then press submit, the form is submited correctly.&lt;br /&gt;&lt;br /&gt;This functionality works very well.&lt;br /&gt;&lt;br /&gt;5) But according to decoumentation:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#CHDGAIFA"&gt;http://download.oracle.com/docs/cd/E12839_01/web.1111/b31974/bcstatemgmt.htm#CHDGAIFA&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have to test our application with the Inheritance we did, without the Application Module pooling.&lt;br /&gt;Note: for a detailed explaination of how to remove it you can check a blog post:&lt;br /&gt;&lt;a href="http://jdeveloperfaq.blogspot.com/2010/02/faq-14-how-to-test-application-module.html"&gt;http://jdeveloperfaq.blogspot.com/2010/02/faq-14-how-to-test-application-module.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;After we uncheck the pooling in the Application Module. we run the page again.&lt;br /&gt;&lt;br /&gt;We press the create button and we insert data. But when we press submit, where the passivation and the activation takes place we have error messages on the page that the required attributes have no values!!&lt;br /&gt;&lt;br /&gt;so, from this state:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPQJwZ4KWI/AAAAAAAAAOg/EzRdKinoSSU/s1600/newStateWithFullData.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" px="true" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TOPQJwZ4KWI/AAAAAAAAAOg/EzRdKinoSSU/s320/newStateWithFullData.PNG" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;we press submit we end up to this state:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/TOPQMBWXeiI/AAAAAAAAAOk/n6zW1egziio/s1600/afterSubmitProblem.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" px="true" src="http://4.bp.blogspot.com/_YtJHabtSoq8/TOPQMBWXeiI/AAAAAAAAAOk/n6zW1egziio/s320/afterSubmitProblem.PNG" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Am I missing something here?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/InheritancePassivationProblem.zip"&gt;Download the Sample Application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5838325687721035098?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5838325687721035098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/11/entity-inheritance-and-passivation.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5838325687721035098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5838325687721035098'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/11/entity-inheritance-and-passivation.html' title='Entity Inheritance And Passivation-Activation Possible Problem in ADF 11g'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YtJHabtSoq8/TOOygzJyi_I/AAAAAAAAAOA/x4NW_n3IHOI/s72-c/BaseEntityEmployeesDiscr.PNG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-4853580571598084511</id><published>2010-09-16T13:30:00.000-07:00</published><updated>2010-09-16T13:30:11.090-07:00</updated><title type='text'>Search Page To Edit Page And Back to Search Page With Refreshed Data</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Here is a way of doing the following scenario:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/SearchEditAndBackWithRefreshedData.zip"&gt;Download the Sample Application&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We have a search page with a Criteria and a result Table. The criteria have Query Automatically to &lt;b&gt;false&lt;/b&gt;. This is to prevent from fetching any data on the page.&lt;br /&gt;&lt;br /&gt;We have another page that edits the selected row from the table. This is called the Edit page.&lt;br /&gt;&lt;br /&gt;There is a navigation from Search Page to Edit page.&lt;br /&gt;&lt;br /&gt;Finally we want when to&amp;nbsp; navigate back from the Edit page to Search page, to have the new data refreshed on the search table.&lt;br /&gt;&lt;br /&gt;First we create a View object with View Criteria.&amp;nbsp; This example uses the Countries Table from HR schema.&lt;br /&gt;&lt;br /&gt;In the View Criteria we add the CountryId in the Criteria.&lt;br /&gt;Then we create a bindVariable to hold the value.&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/_YtJHabtSoq8/TJJtxUc5M3I/AAAAAAAAAKA/3oXsJ7Kioj0/s1600/createViewCriteria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJtxUc5M3I/AAAAAAAAAKA/3oXsJ7Kioj0/s320/createViewCriteria.png" /&gt;&lt;/a&gt;&lt;/div&gt;We make sure that the attribue and the Bind Variable are of the same type.&lt;br /&gt;&lt;br /&gt;By default the wizard sets the View Criteria to NOT query Automatically, which is what we want for this example. Query Automatically false means that no data will be displayed on the page until a search is issued:&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/_YtJHabtSoq8/TJJwgEf9K-I/AAAAAAAAAKw/2NY7HVfLU9M/s1600/queryAutoFalse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJwgEf9K-I/AAAAAAAAAKw/2NY7HVfLU9M/s320/queryAutoFalse.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Then we set the bind Variable to be hidden while the View Criteria will be rendered on the jspx.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJt77CiTrI/AAAAAAAAAKQ/rYtFtn2j19I/s1600/hideBindVariableFromCriteria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJt77CiTrI/AAAAAAAAAKQ/rYtFtn2j19I/s320/hideBindVariableFromCriteria.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Finally, we have a view Object with a view Criteria:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJt3FK-BoI/AAAAAAAAAKI/TO1NiCLOol8/s1600/viewObjectWithCriteria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJt3FK-BoI/AAAAAAAAAKI/TO1NiCLOol8/s320/viewObjectWithCriteria.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next, we create a page for the search page:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/TJJvCxCU3kI/AAAAAAAAAKY/-1aJNBsN3H0/s1600/dragNDropCriteria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/TJJvCxCU3kI/AAAAAAAAAKY/-1aJNBsN3H0/s320/dragNDropCriteria.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;On the wizard, check the row Selection checkBox:&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/_YtJHabtSoq8/TJJvi59WQrI/AAAAAAAAAKo/TA2nPzxbCdE/s1600/checkRowSelection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJvi59WQrI/AAAAAAAAAKo/TA2nPzxbCdE/s320/checkRowSelection.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp;The result of it the following screen:&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/_YtJHabtSoq8/TJJvNKNQnEI/AAAAAAAAAKg/185AAkdNuYo/s1600/resultOfDragAnDropCriteria.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJvNKNQnEI/AAAAAAAAAKg/185AAkdNuYo/s320/resultOfDragAnDropCriteria.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We surround the table with a panel Collection layout and drop a Button from the pallete:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJxEeZrFMI/AAAAAAAAAK4/JtGvvm4EvvU/s1600/surroundWithPanelCollection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJxEeZrFMI/AAAAAAAAAK4/JtGvvm4EvvU/s320/surroundWithPanelCollection.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJxMUKI5mI/AAAAAAAAALA/Mt_Qdgpk9Lw/s1600/panelCollectionSurround.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJxMUKI5mI/AAAAAAAAALA/Mt_Qdgpk9Lw/s320/panelCollectionSurround.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The Edit button will be included in the toolbar facet of the panel collection:&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/_YtJHabtSoq8/TJJxmTmG7UI/AAAAAAAAALI/gUlGMMv0X50/s1600/insertButtonOnPanelCollection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/TJJxmTmG7UI/AAAAAAAAALI/gUlGMMv0X50/s320/insertButtonOnPanelCollection.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;For now, we dont have any navigation set.&lt;br /&gt;&lt;br /&gt;First we have to create the edit page. Is the same process as the search page. Instead of droping the criteria, this time we will drop the iterator as a form:&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/_YtJHabtSoq8/TJJyk7grhgI/AAAAAAAAALQ/98UM0xvdtd0/s1600/dropEditPage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJyk7grhgI/AAAAAAAAALQ/98UM0xvdtd0/s320/dropEditPage.png" /&gt;&lt;/a&gt;&lt;/div&gt;&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/_YtJHabtSoq8/TJJy-W3B7NI/AAAAAAAAALY/1VjQ8sT0U3Q/s1600/editPageDropForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJy-W3B7NI/AAAAAAAAALY/1VjQ8sT0U3Q/s320/editPageDropForm.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We drag and drop the commit operation on the footer of the form in order to save any data changed:&lt;br /&gt;&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/_YtJHabtSoq8/TJJz8HiVEdI/AAAAAAAAALg/WOUsYhdMJEE/s1600/DropCommitOperation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJz8HiVEdI/AAAAAAAAALg/WOUsYhdMJEE/s320/DropCommitOperation.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;For the simplicity of the example remove the disabled condition of the commit button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also, we create a button below the commit button that will navigate us back&amp;nbsp; to the search page:&lt;br /&gt;&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/_YtJHabtSoq8/TJJ0QTKZpoI/AAAAAAAAALo/gTyF-xAZv5c/s1600/DropBackButton.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJ0QTKZpoI/AAAAAAAAALo/gTyF-xAZv5c/s320/DropBackButton.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Then we drop a navigation flow from Search page to Edit page.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJ1PfbDAMI/AAAAAAAAALw/fsbgjSY1LyY/s1600/ControlFlowOnEdit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJ1PfbDAMI/AAAAAAAAALw/fsbgjSY1LyY/s320/ControlFlowOnEdit.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;Now, we go back on the Main(search) page and locate the edit button(it is in the toolbar facet of the panelCollection) and set the action that points to edit page:&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/_YtJHabtSoq8/TJJ23Iu84QI/AAAAAAAAAL4/xuKBfPH3l1g/s1600/setEditButtonAction.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJ23Iu84QI/AAAAAAAAAL4/xuKBfPH3l1g/s320/setEditButtonAction.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If we run the main page we will have a search page with no data.&lt;br /&gt;&lt;br /&gt;If we press search button, all data will be fetched.&lt;br /&gt;Then we press the edit button and we navigate to to the edit page we will see that the record we choosed is displayed in the edit form&lt;br /&gt;&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/_YtJHabtSoq8/TJJ6eb7cIpI/AAAAAAAAAMA/6MwJE8m0dXw/s1600/emptySearchForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TJJ6eb7cIpI/AAAAAAAAAMA/6MwJE8m0dXw/s320/emptySearchForm.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&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/_YtJHabtSoq8/TJJ6hk5OaMI/AAAAAAAAAMI/QiRCWHmiwyw/s1600/afterSearchPressed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJ6hk5OaMI/AAAAAAAAAMI/QiRCWHmiwyw/s320/afterSearchPressed.png" /&gt;&lt;/a&gt;&lt;/div&gt;&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/_YtJHabtSoq8/TJJ6tE4QgfI/AAAAAAAAAMQ/uSbxc0OryvE/s1600/sameRecordOnEdit.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TJJ6tE4QgfI/AAAAAAAAAMQ/uSbxc0OryvE/s320/sameRecordOnEdit.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;At this point we do not have any functionality on the Back button:&lt;br /&gt;&lt;br /&gt;What we want is to navigate back&amp;nbsp; and reflect the data..&lt;br /&gt;&lt;br /&gt;All we have to do is to create another navigation flow back from edit page to search page:&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/_YtJHabtSoq8/TJJ87_yjM9I/AAAAAAAAAMY/2WfbvrvCW3k/s1600/navigateBackToSearch.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJ87_yjM9I/AAAAAAAAAMY/2WfbvrvCW3k/s320/navigateBackToSearch.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Then, we have to assign the correct action to the back button:&lt;br /&gt;Back in the edit page we locate the back button and set the back action to it:&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/_YtJHabtSoq8/TJJ9L8WD_0I/AAAAAAAAAMg/Ydyt2PtmaIw/s1600/setBackACtion.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TJJ9L8WD_0I/AAAAAAAAAMg/Ydyt2PtmaIw/s320/setBackACtion.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;And thats it!&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/SearchEditAndBackWithRefreshedData.zip"&gt;Download the Sample Application&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-4853580571598084511?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/4853580571598084511/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/09/search-page-to-edit-page-and-back-to.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4853580571598084511'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4853580571598084511'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/09/search-page-to-edit-page-and-back-to.html' title='Search Page To Edit Page And Back to Search Page With Refreshed Data'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YtJHabtSoq8/TJJtxUc5M3I/AAAAAAAAAKA/3oXsJ7Kioj0/s72-c/createViewCriteria.png' height='72' width='72'/><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3885253874841998032</id><published>2010-09-05T14:59:00.000-07:00</published><updated>2010-09-05T14:59:12.745-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>ADF 11g methodAction and invokeAction in the pageDef</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Here is a small example focusing on how to create a methodAction and an invokeAction in a pageDef. Those properties in a pageDef can be very helpful especially when we want to do things more declaratively or have automated actions for your page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/methodActionInvokeAction.zip"&gt;Download The Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;What we are going to do here is a slight difference of a previous post.&lt;br /&gt;In the previous post we entered a page in insert mode.&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_313153795"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dstas.blogspot.com/2010/09/open-jspx-page-in-insert-mode-in-adf.html"&gt;http://dstas.blogspot.com/2010/09/open-jspx-page-in-insert-mode-in-adf.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, we are not going to use the feature of methodCall.&lt;br /&gt;We are going to have the logic in our pageDef.&lt;br /&gt;We are going to use the methodAction and the invokeAction.&lt;br /&gt;&lt;br /&gt;First, we create the model, for this example we are going to use the HR schema in the ORACLE XE.&lt;br /&gt;&lt;br /&gt;We create BC(entities and views) for employees table.&lt;br /&gt;&lt;br /&gt;We generate the Application module as well.&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/_YtJHabtSoq8/TIQEpueY5AI/AAAAAAAAAH0/9wGM6fjDNJY/s1600/generateAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIQEpueY5AI/AAAAAAAAAH0/9wGM6fjDNJY/s320/generateAM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We create the method in the application Module as in the previous post &lt;a href="http://dstas.blogspot.com/2010/09/open-jspx-page-in-insert-mode-in-adf.html"&gt;here&amp;nbsp;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;We create the java class for our Applciation Module (AM).&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/_YtJHabtSoq8/TIQHA5Xl6-I/AAAAAAAAAIM/I0eOes8Dd2M/s1600/generateAMJavaClass.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQHA5Xl6-I/AAAAAAAAAIM/I0eOes8Dd2M/s320/generateAMJavaClass.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;We create the java classes for Employees View the same as we did for the AM.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQH8PdIorI/AAAAAAAAAIU/MYG0vNHdXjU/s1600/EmployeesJava.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQH8PdIorI/AAAAAAAAAIU/MYG0vNHdXjU/s320/EmployeesJava.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the java class of the AM we create the method that creates and inserts a new row in the Employees View.&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/_YtJHabtSoq8/TIQIwNZAzqI/AAAAAAAAAIc/UVkMIkVwF-M/s1600/createInserMethodInAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQIwNZAzqI/AAAAAAAAAIc/UVkMIkVwF-M/s320/createInserMethodInAM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We will now expose the method in the client interface of the AM&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/_YtJHabtSoq8/TIQJhCaB5PI/AAAAAAAAAIk/cJcJ9S5GmJ4/s1600/exposeMethodInAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/TIQJhCaB5PI/AAAAAAAAAIk/cJcJ9S5GmJ4/s320/exposeMethodInAM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;with result:&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/_YtJHabtSoq8/TIQKHpiRQCI/AAAAAAAAAIs/w-AuhfdVwLQ/s1600/resultOfExposeinAM.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TIQKHpiRQCI/AAAAAAAAAIs/w-AuhfdVwLQ/s320/resultOfExposeinAM.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;After exposing the Method from AM, we will create a methodAction pointing to method exposed. &lt;br /&gt;&lt;br /&gt;NOTE: we have to create a jspx page&amp;nbsp; with a pageDef. To create a pageDef simply drag a drop on the jspx or right click on the jspx and select create page Definition.&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/_YtJHabtSoq8/TIQFYRAicgI/AAAAAAAAAH8/14mvlkZ-UgY/s1600/generatePageDef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TIQFYRAicgI/AAAAAAAAAH8/14mvlkZ-UgY/s320/generatePageDef.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;1) Open the pageDef of the jspx.&amp;nbsp; and in the Bindings Column add a new binding of type &lt;b&gt;methodAction&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQLCiFOMnI/AAAAAAAAAI0/sB1UIyDkHrs/s1600/addMethodActionInPageDef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQLCiFOMnI/AAAAAAAAAI0/sB1UIyDkHrs/s320/addMethodActionInPageDef.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On the second screen:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQLotRicaI/AAAAAAAAAI8/7Xnfxi2smx8/s1600/declaringTheMethodAction..png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQLotRicaI/AAAAAAAAAI8/7Xnfxi2smx8/s320/declaringTheMethodAction..png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;With the result:&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/_YtJHabtSoq8/TIQMIuzaUjI/AAAAAAAAAJE/zfOMVyn9TLQ/s1600/finalMethodAction.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQMIuzaUjI/AAAAAAAAAJE/zfOMVyn9TLQ/s320/finalMethodAction.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, this methodAction can be called as any other operation in the bindings.&lt;br /&gt;&lt;br /&gt;In our case, we want to call this method every time we enter the jspx.&lt;br /&gt;&lt;br /&gt;In the previous post, we did it with a separate methodCall.&lt;br /&gt;In this case we will create an InvokeAction tha calls this methodAction&lt;br /&gt;&lt;br /&gt;In our pageDef again, we will create an invokeAction.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQNeYhXDHI/AAAAAAAAAJM/Nbudl4NXCGs/s1600/invokeActionCreation.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQNeYhXDHI/AAAAAAAAAJM/Nbudl4NXCGs/s320/invokeActionCreation.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After ok is pressed:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQOJsIS-kI/AAAAAAAAAJU/oxSpdv_Kayk/s1600/selectMethodActionToBind.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQOJsIS-kI/AAAAAAAAAJU/oxSpdv_Kayk/s320/selectMethodActionToBind.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The result to this is:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/TIQOWKaWxzI/AAAAAAAAAJc/1vIxpJlFdrU/s1600/invokActionDone..png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIQOWKaWxzI/AAAAAAAAAJc/1vIxpJlFdrU/s320/invokActionDone..png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We are not just done yet.&lt;br /&gt;&lt;br /&gt;We need to set when this invokeAction will be invoked.&lt;br /&gt;We go on the property Inspector of this executable and change the refresh condition&lt;br /&gt;to prepareModel:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/TIQO6cbi5OI/AAAAAAAAAJk/lSc9aleIPlM/s1600/invokeOnPrepareMOdel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TIQO6cbi5OI/AAAAAAAAAJk/lSc9aleIPlM/s320/invokeOnPrepareMOdel.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;At this point we have created an invokeAction that binds a methodAction and it will be invoked everytime the prepareModel is invoked.&lt;br /&gt;&lt;br /&gt;For more details on the refresh property, please refer to the documentation:&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_313153849"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sthref837"&gt;http://download.oracle.com/docs/html/B25947_01/bcdcpal005.htm#sthref837&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The last thing to do is to drop the Employees form into the page.&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/_YtJHabtSoq8/TIQQjPLvA4I/AAAAAAAAAJs/yXVpjlb2kH0/s1600/createEmployeesForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TIQQjPLvA4I/AAAAAAAAAJs/yXVpjlb2kH0/s320/createEmployeesForm.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;On the wizard window check the navigation buttons check Box.&lt;br /&gt;As a final, also drag an drop the Commit operation onto the jspx.&lt;br /&gt;&lt;br /&gt;Thats about it.&lt;br /&gt;&lt;br /&gt;When we run the page:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQRyuaufKI/AAAAAAAAAJ0/2WR6Lv47UbY/s1600/finalResult.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIQRyuaufKI/AAAAAAAAAJ0/2WR6Lv47UbY/s320/finalResult.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.blogger.com/goog_313153857"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/methodActionInvokeAction.zip"&gt;Download the sample Application.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-3885253874841998032?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3885253874841998032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/09/adf-11g-methodaction-and-invokeaction.html#comment-form' title='7 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3885253874841998032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3885253874841998032'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/09/adf-11g-methodaction-and-invokeaction.html' title='ADF 11g methodAction and invokeAction in the pageDef'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_YtJHabtSoq8/TIQEpueY5AI/AAAAAAAAAH0/9wGM6fjDNJY/s72-c/generateAM.png' height='72' width='72'/><thr:total>7</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-2677235321185645923</id><published>2010-09-05T05:04:00.000-07:00</published><updated>2010-10-09T15:33:35.495-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Open jspx Page in Insert Mode  in ADF 11g How To</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;This is an example of how to enter a form in insert mode.&lt;br /&gt;By default, the ADF queries for data when the user enters a page.&lt;br /&gt;&lt;br /&gt;To bypass this, we have to enter the page without quering for any data.&lt;br /&gt;&lt;br /&gt;To do this, we have to &lt;b&gt;executeEmptyRowSet()&lt;/b&gt; on our View Object before entering the page.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/EnterPageInInsertModeNoCache.zip"&gt;Download the Sample Application. &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;The &lt;b&gt;before entering the page&lt;/b&gt; is easier than you might think &lt;/blockquote&gt;The goal here is to have the page intact with it's default functionality.&lt;br /&gt;&lt;br /&gt;The fact that we want to enter the page in insert mode might change at some point. So it is better to have this functionality in a different place.&lt;br /&gt;&lt;br /&gt;Besides, the insert mode, affects the model and eventually the page through the bindings.&lt;br /&gt;&lt;br /&gt;So, by changing the status of the VO we eventually changing the status of the jspx through the magic bindings.&lt;br /&gt;&lt;br /&gt;What we need is this:&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/TIOCD-ISzJI/AAAAAAAAAHE/iKGaPfuMfB4/s1600/enterInsertModeTaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="96" src="http://3.bp.blogspot.com/_YtJHabtSoq8/TIOCD-ISzJI/AAAAAAAAAHE/iKGaPfuMfB4/s320/enterInsertModeTaskFlow.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;As you can see, in our task flow we have a method call as the default activity.&lt;br /&gt;&lt;br /&gt;This methodCall calls a method in the Application Module.&lt;br /&gt;&lt;br /&gt;The method in the AM is very simple:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;b&gt;/**&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * creates a new record in the Employees View Object.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; * Also executesEmptyRowSet in order not to fetch Data.&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; */&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public void enterEmpsInInsertMode(){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; EmployeesViewImpl emps=(EmployeesViewImpl)this.getEmployeesView1();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emps.executeEmptyRowSet(); // &lt;/b&gt;executeEmpty RowSet not to fetch Data.&lt;b&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Row newRow=emps.createRow();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emps.insertRow(newRow);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; emps.setCurrentRow(newRow);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This method gets the EmployeesView and does the following:&lt;br /&gt;&lt;br /&gt;1) executes empty row set. This will not bring any data to the iterator.&lt;br /&gt;2) creates , inserts and sets it as current in the View Object, which eventually through the bindings will be the current row in the iterator on the page.&lt;br /&gt;&lt;br /&gt;This method is exposed in the client Interface of the AM.&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/_YtJHabtSoq8/TIOHOnedZmI/AAAAAAAAAHs/unwq2YBMPOw/s1600/applMOduleOpenClient.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIOHOnedZmI/AAAAAAAAAHs/unwq2YBMPOw/s320/applMOduleOpenClient.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/TIOGcrABvNI/AAAAAAAAAHc/VBUr3_byOM8/s1600/exposeMethodInTheClientInterface.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIOGcrABvNI/AAAAAAAAAHc/VBUr3_byOM8/s320/exposeMethodInTheClientInterface.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The result is this:&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/_YtJHabtSoq8/TIOGk3EsJ0I/AAAAAAAAAHk/Ey3hBkWUyYE/s1600/resultOfExposure.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIOGk3EsJ0I/AAAAAAAAAHk/Ey3hBkWUyYE/s320/resultOfExposure.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;If we drag and Drop from our Data Control this method in our taskFlow, it will create a methodCall with its own pageDef and added the method from the AM.&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/_YtJHabtSoq8/TIOFy7V0NCI/AAAAAAAAAHU/_ZD1nxXpPcE/s1600/dragAndDropmethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TIOFy7V0NCI/AAAAAAAAAHU/_ZD1nxXpPcE/s320/dragAndDropmethod.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Make sure that the method call is set to be the default activity of your task flow.&lt;br /&gt;Thats it!&lt;br /&gt;It might not be out of the box implementation, but it is a very clear approach.&lt;br /&gt;&lt;br /&gt;Here is a screenShot of the result page:&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/_YtJHabtSoq8/TIOD0k62UuI/AAAAAAAAAHM/jFcb2KTEvvk/s1600/insertModePage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/TIOD0k62UuI/AAAAAAAAAHM/jFcb2KTEvvk/s320/insertModePage.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/EnterPageInInsertModeNoCache.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Update: After FetishCode comment, I have to say that the scope of the example is for the user to be able to rollback and be able to see all the records of the View Object. To achieve this, we must change the property &lt;b&gt;cacheResults of the Iterator in the pageDef of our page to false.&lt;/b&gt;&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/_YtJHabtSoq8/TLDtgEvXFzI/AAAAAAAAAMo/9lWg3dc4ewE/s1600/doNotCacheResults.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="172" src="http://1.bp.blogspot.com/_YtJHabtSoq8/TLDtgEvXFzI/AAAAAAAAAMo/9lWg3dc4ewE/s320/doNotCacheResults.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&amp;nbsp;&lt;/b&gt; &lt;br /&gt;I double checked the application and changed to the correct one. Mistakes happen..&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-2677235321185645923?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/2677235321185645923/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/09/open-jspx-page-in-insert-mode-in-adf.html#comment-form' title='6 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2677235321185645923'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/2677235321185645923'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/09/open-jspx-page-in-insert-mode-in-adf.html' title='Open jspx Page in Insert Mode  in ADF 11g How To'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YtJHabtSoq8/TIOCD-ISzJI/AAAAAAAAAHE/iKGaPfuMfB4/s72-c/enterInsertModeTaskFlow.png' height='72' width='72'/><thr:total>6</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7108691140672576305</id><published>2010-08-29T12:48:00.000-07:00</published><updated>2010-08-29T12:48:57.742-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Press Edit Button to make Table Row Editable.</title><content type='html'>It seems very logical to have a button in a table row that will change the state of the row from read only to editable.&lt;br /&gt;ADF supports this in a diferent way, The table has a property called &lt;b&gt;EditingMode&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;If you set the value clickToEdit, then, each time you click a record, it will become editable.&lt;br /&gt;&lt;br /&gt;Here is&amp;nbsp; way of doing the same thing but with a button.&lt;br /&gt;So instead of clicking on the row to edit, we ll have to click on the button and make the row editable.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ButtonToMakeRowEditable.zip"&gt;Download the sample application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;This is what we want to have as functionality:&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/_YtJHabtSoq8/THqysFP996I/AAAAAAAAAGM/NDRfBT7vpcg/s1600/WhenItWorks.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/THqysFP996I/AAAAAAAAAGM/NDRfBT7vpcg/s320/WhenItWorks.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;First we will create a transient attribute in our Entity Object&lt;br /&gt;This attribute will be called &lt;b&gt;editable&lt;/b&gt; and will have type of &lt;b&gt;Boolean&lt;/b&gt;&lt;br /&gt;We will add this attribute in the VO.&lt;br /&gt;&lt;br /&gt;In the VO Row Impl java class, we will override the &lt;b&gt;isAttributeUpdatable&lt;/b&gt; method.&lt;br /&gt;&lt;br /&gt;Now, if the editable transient attribute has value &lt;b&gt;true,&lt;/b&gt; we will return the super method, else we will return false.&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/_YtJHabtSoq8/THqx39oI2cI/AAAAAAAAAGE/to6dtGHPYJE/s1600/isAttributeUpdatableOverride.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/THqx39oI2cI/AAAAAAAAAGE/to6dtGHPYJE/s320/isAttributeUpdatableOverride.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Well, this means that every time we fetch data from the View Object, cached or not, this check will be done and according the value, the attribute will be updatable or not.&lt;br /&gt;&lt;br /&gt;How to set value to this attribute: &lt;br /&gt;We want this to happen when we press the button.&lt;br /&gt;So, first we create another column,&lt;br /&gt;&lt;br /&gt;add a button with partialSubmit=true,&lt;br /&gt;&amp;nbsp;Inside the button we add a setPropertyListener (Recomended instead of setActionListener)&lt;br /&gt;&lt;br /&gt;Type: action&lt;br /&gt;From: #{true}&lt;br /&gt;To: #{binding.editable.inputValue} &amp;lt;--- we have to add the binding on our pageDef&lt;br /&gt;e.g&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/THqzx3PT6AI/AAAAAAAAAGU/3bQUnSr9RCg/s1600/editableOnPageDef.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/THqzx3PT6AI/AAAAAAAAAGU/3bQUnSr9RCg/s320/editableOnPageDef.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This will represent the editable value on the current record.&lt;br /&gt;&lt;br /&gt;Last, place partialTrigger on the table from the Button&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/_YtJHabtSoq8/THq0IMnC4bI/AAAAAAAAAGc/_h8VA7npEIE/s1600/tablePartialTrigger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/THq0IMnC4bI/AAAAAAAAAGc/_h8VA7npEIE/s320/tablePartialTrigger.png" /&gt;&lt;/a&gt;&lt;/div&gt;The other partialTrigger you see on the screenshot is from create insert button.&lt;br /&gt;So, if you run your application you will see that when you press edit button on a row it will become editable.&lt;br /&gt;&lt;br /&gt;Infact, you can make more than one row editable, simply by clicking the corresponding button...&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/_YtJHabtSoq8/THq3_ZQIPOI/AAAAAAAAAG0/zuIiyIRqG3k/s1600/manyEditable.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/THq3_ZQIPOI/AAAAAAAAAG0/zuIiyIRqG3k/s320/manyEditable.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;But what happens when we commit??&lt;br /&gt;We need to set the value back to false.. &lt;br /&gt;So,&lt;br /&gt;Back in the EntityObject impl java class, override The doDML method, and before super, set the attribute to false.&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/_YtJHabtSoq8/THq1IDffAvI/AAAAAAAAAGk/zQ3Brv-o25A/s1600/doDML.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/THq1IDffAvI/AAAAAAAAAGk/zQ3Brv-o25A/s320/doDML.png" /&gt;&lt;/a&gt;&lt;/div&gt;This will post the false attribute and after the commit it will have value false.&lt;br /&gt;So all the rows will be read Only.&lt;br /&gt;&lt;br /&gt;As far as the createInsert operation:&lt;br /&gt;We could do the same on the createInsert button, as the edit button.&lt;br /&gt;Just for the difference, we can do it somwhere else in the model.&lt;br /&gt;&lt;br /&gt;In VORowImpl java class, Override the &lt;b&gt;create&lt;/b&gt; method and set value true to the editable attribute.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/THq2uiGpaNI/AAAAAAAAAGs/cxyVof2ZHhA/s1600/onCreate.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/THq2uiGpaNI/AAAAAAAAAGs/cxyVof2ZHhA/s320/onCreate.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Thats about it...&lt;br /&gt;&lt;br /&gt;So now, we have a table we readOnly behavior and an edit button that enables that row.&lt;br /&gt;After commit, the row(s) become readOnly again.&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ButtonToMakeRowEditable.zip"&gt;Download the Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-7108691140672576305?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7108691140672576305/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/08/press-edit-button-to-make-table-row.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7108691140672576305'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7108691140672576305'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/08/press-edit-button-to-make-table-row.html' title='Press Edit Button to make Table Row Editable.'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YtJHabtSoq8/THqysFP996I/AAAAAAAAAGM/NDRfBT7vpcg/s72-c/WhenItWorks.png' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-338467583064553840</id><published>2010-08-29T11:06:00.000-07:00</published><updated>2010-08-29T12:51:42.714-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Column button in a read only table. Edit in a Popup and return values.</title><content type='html'>Hi,&lt;br /&gt;Here a simple example of how to add a button in a read only af:table and show a popup with an editable form of the current row.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/THqcfbVp7kI/AAAAAAAAAFM/npLhgDziCJ0/s1600/mainPage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/THqcfbVp7kI/AAAAAAAAAFM/npLhgDziCJ0/s320/mainPage.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ButtonOnTableToEditWithPopUp.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The first page can be done rather easy.&lt;br /&gt;Simply drag and drop the iterator from the Data Control into the page and choose read only table.&lt;br /&gt;Then, in the table add a column.&lt;br /&gt;Inside the column add a commandButton.&lt;br /&gt;&lt;br /&gt;This commandButton will show the popup.&lt;br /&gt;&lt;br /&gt;Create a popup that will include a Dialog inside. The Dialog type will be ok/cancel.&lt;br /&gt;Inside the dialog drag and drop the same iterator as previously but this time choose form.&lt;br /&gt;The submit button is not necessary in our case.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Here is the generated code from JDeveloper&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/_YtJHabtSoq8/THqeEDdlzdI/AAAAAAAAAFU/DcTfDpG1J-s/s1600/popUpCode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/THqeEDdlzdI/AAAAAAAAAFU/DcTfDpG1J-s/s320/popUpCode.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;We are not just done yet.&lt;br /&gt;In the button we have to add a showPopupBehavior and point the id of popup.&lt;br /&gt;When the button will be pressed the popup will be shown with the current record ready to be edited.&lt;br /&gt;Here is the code of the 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/_YtJHabtSoq8/THqempJVZoI/AAAAAAAAAFc/oQzmoxldtbw/s1600/buttonCodeWithShowPopUpBehavior.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/THqempJVZoI/AAAAAAAAAFc/oQzmoxldtbw/s320/buttonCodeWithShowPopUpBehavior.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&amp;nbsp;At this point, if you test it, you will find that no matter which edit button you ll press, you ll still see the first record in the popup.&lt;br /&gt;&lt;br /&gt;This is simply because the popup by default caches it's results.&lt;br /&gt;To change that, just change the contentDelivery to lazyUncached:&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/_YtJHabtSoq8/THqfSDVQSEI/AAAAAAAAAFk/wra52kSi4Is/s1600/contentDeliveryLazyUncached.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/_YtJHabtSoq8/THqfSDVQSEI/AAAAAAAAAFk/wra52kSi4Is/s320/contentDeliveryLazyUncached.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;With this way, the data are always refresh upon the show of the popup.&lt;br /&gt;&lt;br /&gt;In order to&amp;nbsp; refresh the data of the table in the back ground, we need to add a partialtrigger to the table.&lt;br /&gt;The &lt;b&gt;partialtrigger&lt;/b&gt; will be the id of the &lt;b&gt;dialog&lt;/b&gt; which is inside the popup.&lt;br /&gt;So when the user presses the ok button the table will be refreshed and show the new data.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/THqgMrZlGQI/AAAAAAAAAFs/-La9kKEw3AA/s1600/tablePartialTrigger.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/_YtJHabtSoq8/THqgMrZlGQI/AAAAAAAAAFs/-La9kKEw3AA/s320/tablePartialTrigger.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;At this point we are good to go..&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/THqgX7Q7OjI/AAAAAAAAAF0/PEKW07Yl1NI/s1600/editPopUp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/THqgX7Q7OjI/AAAAAAAAAF0/PEKW07Yl1NI/s320/editPopUp.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;after ok pressed.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/_YtJHabtSoq8/THqgeppIoqI/AAAAAAAAAF8/cwAeLhUjwxo/s1600/afterOkPressed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/_YtJHabtSoq8/THqgeppIoqI/AAAAAAAAAF8/cwAeLhUjwxo/s320/afterOkPressed.png" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;a href="http://www.blogger.com/goog_882832720"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ButtonOnTableToEditWithPopUp.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-338467583064553840?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/338467583064553840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/08/column-button-in-read-only-table-edit.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/338467583064553840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/338467583064553840'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/08/column-button-in-read-only-table-edit.html' title='Column button in a read only table. Edit in a Popup and return values.'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_YtJHabtSoq8/THqcfbVp7kI/AAAAAAAAAFM/npLhgDziCJ0/s72-c/mainPage.png' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5220222514544926336</id><published>2010-07-29T00:43:00.000-07:00</published><updated>2010-07-29T00:43:21.518-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Tools'/><title type='text'>All the Information about XML artifacts of ADF</title><content type='html'>ADF is based on XML files for entities, views, ApplicationModules etc.&amp;nbsp; &lt;br /&gt;All these files can be used in order to produce a very useful information for Developers and Designers of ADF applications.&lt;br /&gt;Serafeim Karapatis (&lt;a href="http://serafeimk.blogspot.com/"&gt;http://serafeimk.blogspot.com/&lt;/a&gt;) has introduced this concept and the creation of&amp;nbsp; a tool that will be easy to use and will produce very usefull information about ADF applications has started.&lt;br /&gt;&lt;br /&gt;For more information, check Serafeim Karapatis's post&amp;nbsp;&lt;a href="http://serafeimk.blogspot.com/2010/07/xml-artifacts-adf.html"&gt;http://serafeimk.blogspot.com/2010/07/xml-artifacts-adf.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Stay tuned for upcoming releases.&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5220222514544926336?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5220222514544926336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/07/all-information-about-xml-artifacts-of.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5220222514544926336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5220222514544926336'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/07/all-information-about-xml-artifacts-of.html' title='All the Information about XML artifacts of ADF'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-8245329588124039495</id><published>2010-05-25T12:15:00.000-07:00</published><updated>2010-05-25T12:15:15.374-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Oracle-XE'/><title type='text'>Oracle-XE on Ubuntu 10.4 Swap File Problem.</title><content type='html'>Hi,&lt;br /&gt;&lt;br /&gt;Here is the official link from Oracle on how to install oracle-xe on Ubuntu.&lt;br /&gt;I just tried it on my Virtual Box machine with Ubuntu 10.4 .&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html"&gt;http://www.oracle.com/technology/tech/linux/install/xe-on-kubuntu.html&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;But since I am not familiar with Linux.. And I am sort of forced to use it if i still want to work on my Mac and on oracle-xe..&lt;br /&gt;I made a mistake on swap file size... I left it default.. Everythin ok until i tried to install oracle-xe. It was complaining that the swap file was too small for the installation..&lt;br /&gt;&lt;br /&gt;Here is the link on how to increase the swap file on ubuntu:&lt;br /&gt;&lt;br /&gt;&lt;a href="https://help.ubuntu.com/community/SwapFaq"&gt;https://help.ubuntu.com/community/SwapFaq&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;It is the official site of ubuntu..&lt;br /&gt;I would like to share it with everyone cause it troubled me for sometime.&lt;br /&gt;&lt;br /&gt;Regards.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-8245329588124039495?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/8245329588124039495/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/05/oracle-xe-on-ubuntu-104-swap-file.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8245329588124039495'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/8245329588124039495'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/05/oracle-xe-on-ubuntu-104-swap-file.html' title='Oracle-XE on Ubuntu 10.4 Swap File Problem.'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5395757888297680888</id><published>2010-05-25T02:48:00.000-07:00</published><updated>2011-10-17T01:37:42.349-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF Master Detail'/><title type='text'>Master View Search Form .Display Only Results in Detail View Objects</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Hi,&lt;br /&gt;There is a very easy way to&amp;nbsp; keep your Search Form in find mode all the time.&lt;br /&gt;Consider this:&lt;br /&gt;Lets say that we have a Master View Object (e.g. Employees) and a Detail View Object( e.g Departments).&lt;br /&gt;We want to Use the Master as a Search Form and the Detail as a result table.&lt;br /&gt;&lt;br /&gt;The structure of our page is the following:&lt;br /&gt;1) Master as a search form(always entering in find mode.)&lt;br /&gt;2) Detail as a readOnly detail table.&lt;br /&gt;&lt;br /&gt;We want our page to show something like this:&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/_YtJHabtSoq8/S_ua_nx5dzI/AAAAAAAAAE8/smqvvVoQYlE/s1600/SearchMode.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" gu="true" src="http://1.bp.blogspot.com/_YtJHabtSoq8/S_ua_nx5dzI/AAAAAAAAAE8/smqvvVoQYlE/s320/SearchMode.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;and we want to show like this:&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/S_ubVQb2a-I/AAAAAAAAAFE/nOdb6WB2-lE/s1600/searchFormResult.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" gu="true" src="http://1.bp.blogspot.com/_YtJHabtSoq8/S_ubVQb2a-I/AAAAAAAAAFE/nOdb6WB2-lE/s320/searchFormResult.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;a) First of All we frag and drop the Master view object as a search form into our page.&lt;br /&gt;&lt;br /&gt;b) Second we remove the find button but we keep the operation in the pageDef.&lt;br /&gt;&lt;br /&gt;c) In the pageDef, we create an invokeAction in the executables. This invokeAction will invoke the Find operation. The refresh condition will be "&lt;strong&gt;prepareModel&lt;/strong&gt;" We want this because it will be invoked when initializing the iterators.&lt;br /&gt;&lt;br /&gt;d) In the page, we set the "&lt;strong&gt;Execute&lt;/strong&gt;" button to &lt;strong&gt;partialSubmit=true&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;e) In the read Only detail table, we set the following &lt;strong&gt;partialTriggers&lt;/strong&gt;:&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the execute button, and the searchForm. We do this because we do want&amp;nbsp; the Detail&amp;nbsp;show data at the first place.&amp;nbsp;And, we want it to be refreshed after the&amp;nbsp;button is shown.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Donwside&lt;/strong&gt;:&lt;br /&gt;If we will execute with empty criteria or with criteria that will fetche more than one row in the Master.. the detail will show rows only for the first fetched Master row.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/SearchFormApp.zip"&gt;download sample application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5395757888297680888?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5395757888297680888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/05/master-view-search-form-display-only.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5395757888297680888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5395757888297680888'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/05/master-view-search-form-display-only.html' title='Master View Search Form .Display Only Results in Detail View Objects'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_YtJHabtSoq8/S_ua_nx5dzI/AAAAAAAAAE8/smqvvVoQYlE/s72-c/SearchMode.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5801631737506607992</id><published>2010-04-09T02:49:00.000-07:00</published><updated>2010-04-09T02:50:16.001-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Convert java.lang.String to oracle.jbo.domain.Date</title><content type='html'>This is a way of converting a given date&amp;nbsp; as a string to oracle.jbo.domain.Date.&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;*Converts a String to oracle.jbo.domain.Date&lt;br /&gt;* @param aDate&lt;br /&gt;* @return oracle.jbo.domain.Date or null.&lt;br /&gt;*/&lt;br /&gt;public oracle.jbo.domain.Date castToJBODate(String aDate){&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DateFormat formatter;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;java.util.Date date; &lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if(aDate!=null){&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;formatter = new SimpleDateFormat("dd/MM/yyyy");&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;date = formatter.parse(aDate);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;java.sql.Date sqlDate = new java.sql.Date(date.getTime());&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;oracle.jbo.domain.Date jboDate = new oracle.jbo.domain.Date(sqlDate);&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return jboDate;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;} catch (ParseException e) {&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; e.printStackTrace();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;}&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return null;&lt;br /&gt;}&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5801631737506607992?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5801631737506607992/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/04/convert-javalangstring-to.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5801631737506607992'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5801631737506607992'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/04/convert-javalangstring-to.html' title='Convert java.lang.String to oracle.jbo.domain.Date'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-892132772183893713</id><published>2010-04-08T04:18:00.000-07:00</published><updated>2010-04-08T04:20:14.837-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>ViewObject.createRow(); Or ViewObject.createAndInitRow(AttributeList);   ?</title><content type='html'>There are many posts over the internet regarding how to open a page in Insert Mode.&lt;br /&gt;Invoke Insert operation that is. &lt;br /&gt;There are also many ways of doing this.&lt;br /&gt;In this post I would like to show you a small, but very big, difference between VO.createRow() and VO.createAndInitRow(AttributeList attrList) methods.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowVSCreateAndInitRowApp.zip"&gt;Download Sample Application.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;The difference can be found in this specific and yet very common case:&lt;br /&gt;In the form to be created we have an LOV which besides the codeId returns also another value to another Attribute of the ViewObject: see the following Image:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/_YtJHabtSoq8/S72zqJymrcI/AAAAAAAAAEU/OorU3IegAl0/s1600/LOV.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/_YtJHabtSoq8/S72zqJymrcI/AAAAAAAAAEU/OorU3IegAl0/s320/LOV.bmp" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Yes, it is a common case in every day programming... &lt;br /&gt;&lt;br /&gt;In the sample application I have implemented 3 Different methods with the same result (not quite the same result as you will see...).&lt;br /&gt;&lt;br /&gt;1)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/S725VKo4uOI/AAAAAAAAAEc/JzMrubuaflQ/s1600/method1.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="117" src="http://4.bp.blogspot.com/_YtJHabtSoq8/S725VKo4uOI/AAAAAAAAAEc/JzMrubuaflQ/s400/method1.bmp" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;2)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/_YtJHabtSoq8/S725me2bz6I/AAAAAAAAAEk/DMS_PxhKbjE/s1600/method2.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="167" src="http://4.bp.blogspot.com/_YtJHabtSoq8/S725me2bz6I/AAAAAAAAAEk/DMS_PxhKbjE/s400/method2.bmp" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;3)&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/_YtJHabtSoq8/S72520ICX1I/AAAAAAAAAEs/_uM5Ccn6KhA/s1600/method3.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="182" src="http://1.bp.blogspot.com/_YtJHabtSoq8/S72520ICX1I/AAAAAAAAAEs/_uM5Ccn6KhA/s400/method3.bmp" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The Whole purpose is those methods to be called before entering the page. se the flow below:&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/_YtJHabtSoq8/S726FoOoDUI/AAAAAAAAAE0/cvr7FwFc6pw/s1600/flow.bmp" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="178" src="http://2.bp.blogspot.com/_YtJHabtSoq8/S726FoOoDUI/AAAAAAAAAE0/cvr7FwFc6pw/s400/flow.bmp" width="400" wt="true" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;On the main.jspx I have placed 3 buttons for each action. The result to this is the following:&lt;br /&gt;&lt;br /&gt;For the first two (2) methods the result is the same and as expected: the second attribute of the LOV is returned correctly.&lt;br /&gt;&lt;br /&gt;For the third (3d) method, the result is not as expected: The New Row is created but the second attribute is not returned at all!&lt;br /&gt;&lt;br /&gt;Actually I did a bit more of investigation.&lt;br /&gt;&lt;br /&gt;I created another 3 button with the same actions for a different page. This page does not have the LOV case as the previous one.&lt;br /&gt;It has an attribute from a referenced Entity.&lt;br /&gt;So when the LOV has a value the referenced attribute will have value.&lt;br /&gt;After testing, I saw that all actions have exactly the same correct behaviour: Referenced Attribute is calculated correctly. &lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/CreateRowVSCreateAndInitRowApp.zip"&gt;Download Sample Application&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;According to the API:&lt;br /&gt;-&lt;strong&gt;createRow()&lt;/strong&gt; : Creates a new Row object, but does not insert it into the Row Set. &lt;br /&gt;Returns: a new Row object..&lt;br /&gt;Source: &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/RowIterator.html#createRow()"&gt;http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/RowIterator.html#createRow()&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;-&lt;strong&gt;createAndInitRow(AttributeList nvp):&lt;/strong&gt; Creates and initializes a new Row object, but does not insert it into the Row Set. This method differs from createRow() mainly in that this method allows the user to pass in a list of name-value pairs with which row attributes are initialized. &lt;br /&gt;nvp is a named value pair. When building an nvp from scratch, use NameValuePairs to build a new nvp. Here is an example: &lt;br /&gt;NameValuePairs nvp = new NameValuePairs();&lt;br /&gt;nvp.setAttribute("EmpTyp", "C");&lt;br /&gt;&lt;br /&gt;Row row = voEmp.createAndInitRow(nvp);&lt;br /&gt;&lt;br /&gt;This method is particularly useful when creating a subclass View Row or Entity Row. You can include polymorphic discriminator attribute values in nvp and correct subclass row object will be created. &lt;br /&gt;When this method is called, underlying entities are created. After the new entities are created, a new view row is created. After that ViewRowImpl.create(oracle.jbo.AttributeList) is called with this nvp. ViewRowImpl.create(AttributeList) walks thru the list of entities and calls EntityImpl.create(AttributeList) with the same nvp for each entity in the view row. &lt;br /&gt;Parameters: nvp - a list of name-value pairs. &lt;br /&gt;Returns: a new Row object.&lt;br /&gt;Source: &lt;a href="http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/RowIterator.html#createAndInitRow(oracle.jbo.AttributeList)"&gt;http://download.oracle.com/docs/cd/E12839_01/apirefs.1111/e10653/oracle/jbo/RowIterator.html#createAndInitRow(oracle.jbo.AttributeList)&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Conclusion: createAndInitRow method does not have expected behaviour when it comes to LOV or Choice List attributes that return more than one attributes.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-892132772183893713?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/892132772183893713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/04/viewobjectcreaterow-or.html#comment-form' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/892132772183893713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/892132772183893713'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/04/viewobjectcreaterow-or.html' title='ViewObject.createRow(); Or ViewObject.createAndInitRow(AttributeList);   ?'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_YtJHabtSoq8/S72zqJymrcI/AAAAAAAAAEU/OorU3IegAl0/s72-c/LOV.bmp' height='72' width='72'/><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5215968411488702231</id><published>2010-03-31T04:23:00.000-07:00</published><updated>2010-03-31T08:05:14.733-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Set Queryable Property on Attribute Programmatically</title><content type='html'>Have you ever thought of programmatically changing the Queryable property of an Attribute in your View Object??&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/QueryableAttrsSample.zip"&gt;Download the sample application&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;Lets say that we have the following case:&lt;br /&gt;&lt;br /&gt;We have a View Object (VO) with one view Criteria (VC). All attributes have by default set the 'Queryable' property to true. We are fine so far.&lt;br /&gt;&lt;br /&gt;Then, the rain comes... We thought that attribute 'A' should become queryable only if an external parameter 'paramA' has value to 'true'.&lt;br /&gt;&lt;br /&gt;Well, it is fairly easy to change the property..&lt;br /&gt;In the sample application i have placed the following code in the VO Impl java class.&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt;* Changes the value of the Queryable property of an Attribute of this ViewObject.&lt;br /&gt;* @param attrName String the name of the attribute.&lt;br /&gt;* @param isQueryable Boolean the value to be set.&lt;br /&gt;*/&lt;br /&gt;public void changeQueryableProperty(String attrName, Boolean isQueryable){&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;ViewAttributeDefImpl[] vAttrDefImpls=this.getViewAttributeDefImpls();&lt;br /&gt;int attrIndex=this.getAttributeIndexOf(attrName);&lt;br /&gt;vAttrDefImpls[attrIndex].setQueriable(isQueryable); &lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;//&lt;strong&gt;UPDATE&lt;/strong&gt;:&lt;br /&gt;// For those of you that have noticed &lt;br /&gt;//that getViewAttributeDefImpls() is &lt;br /&gt;//for internal use only.&lt;br /&gt;//use the following code:&lt;br /&gt;&lt;br /&gt; //  AttributeDef[] attrs = this.getAttributeDefs();      &lt;br /&gt; //  int attrIndex=this.getAttributeIndexOf(attrName);       &lt;br /&gt; //  ViewAttributeDefImpl vida=(ViewAttributeDefImpl)attrs[attrIndex];&lt;br /&gt; //  vida.setQueriable(isQueryable);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;In the example as you will see, i have placed two pages&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;NOTE&lt;/strong&gt;: this is just an example of doing things in order to illustrate the less code to be written... The Declarative way.... You spin my head round round... :D&lt;br /&gt;&lt;br /&gt;1) Main&lt;br /&gt;2) Second&lt;br /&gt;&lt;br /&gt;When we are navigating from Main to Second page we pass a pageFlowScope parameter and we are actually declaring whith attribute will be queryable or not.&lt;br /&gt;&lt;br /&gt;I have exposed the method above in the client interface and created a methodAction in the page Defintion&lt;br /&gt;&lt;br /&gt;Then I placed an InvokeAction in the Executables section of Seconds' pageDef, which will invoke changeQueryableProperty. As a refresh condition i placed 'prepareModel' option in order to be invoked during the initialisation of the iterators.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/QueryableAttrsSample.zip"&gt;Download the sample application &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Enjoy Life the way you Wantd!&lt;br /&gt;Declarativelly!&lt;br /&gt;cheers.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5215968411488702231?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5215968411488702231/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2010/03/set-queryable-property-on-attribute.html#comment-form' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5215968411488702231'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5215968411488702231'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2010/03/set-queryable-property-on-attribute.html' title='Set Queryable Property on Attribute Programmatically'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-7113347509442442028</id><published>2009-06-19T03:20:00.000-07:00</published><updated>2010-04-19T02:45:31.607-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>lock is owned by another session Embedded WebLogic</title><content type='html'>&lt;span style="font-weight: bold;"&gt;UPDATE &lt;/span&gt;for new Release of JDeveloper:&lt;br /&gt;&lt;br /&gt;the file now exists in:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: Arial; font-size: 85%;"&gt;&lt;span lang="EN-US" style="font-family: Arial; font-size: 10pt;"&gt;C:\Documents and Settings\user\Application Data\JDeveloper\system11.1.1.1.33.54.07&lt;/span&gt;&lt;/span&gt;\DefaultDomain&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;remove the &lt;span style="font-weight: bold;"&gt;edit.lok&lt;/span&gt; from there.&lt;br /&gt;&lt;br /&gt;---------------------------------------------------------------------------------&lt;br /&gt;&lt;br /&gt;In JDeveloper 11.1.1.0.1, there is often some problem with Lock session:&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;jun&gt;&lt;warning&gt;&lt;deployer&gt;&lt;bea-149124&gt;&lt;failures&gt;&lt;/failures&gt;&lt;/bea-149124&gt;&lt;/deployer&gt;&lt;/warning&gt;&lt;/jun&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;weblogic.management.ManagementException: [Deployer:149164]The domain edit lock is owned by another session in exclusive mode - hence this deployment operation cannot proceed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Simple solutions like restarting JDev, redeploying, clean , recompile and redeploy.. The problem persists.&lt;br /&gt;&lt;br /&gt;Someone could easily suggest to remove system folder and restart JDev... But this will take time to reset your enviroment..&lt;br /&gt;&lt;br /&gt;The session Lock is kept under Weblogic and in the following folder&lt;br /&gt;&lt;br /&gt;C:\Oracle\Middleware\jdeveloper\system\system11.1.1.0.31.51.88\DefaultDomain&lt;br /&gt;&lt;br /&gt;and is the file &lt;span style="font-weight: bold;"&gt;edit.lok&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;rename it or remove it and start your application again. Weblogic will recreate the .lok file.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-7113347509442442028?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/7113347509442442028/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2009/06/lock-is-owned-by-another-session.html#comment-form' title='11 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7113347509442442028'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/7113347509442442028'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2009/06/lock-is-owned-by-another-session.html' title='lock is owned by another session Embedded WebLogic'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>11</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-3296859128907445591</id><published>2009-03-29T04:24:00.000-07:00</published><updated>2009-03-29T04:42:22.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='OpenOffice and ADF'/><title type='text'>Starting OpenOffice 2.4 as a Service in Ubuntu</title><content type='html'>This yet another post of how to start OpenOffice as headless Service:&lt;br /&gt;After you have installed your OpenOffice.&lt;br /&gt;&lt;br /&gt;navigate to the executables directory. this is under:&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;&lt;br /&gt;usr/lib/openoffice/program&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;and type the following command:&lt;br /&gt;&lt;br /&gt;soffice -headless -accept="socket,host=127.0.0.1,port=8100;urp;StarOffice.ServiceManager;" -nofirststartwizard&lt;br /&gt;&lt;br /&gt;For More information regarding this topic refer to the following links&lt;br /&gt;&lt;br /&gt;&lt;a href="http://wiki.services.openoffice.org/wiki/Uno/FAQ"&gt;http://wiki.services.openoffice.org/wiki/Uno/FAQ&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://udk.openoffice.org/common/man/spec/uno-url.html"&gt;http://udk.openoffice.org/common/man/spec/uno-url.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-3296859128907445591?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/3296859128907445591/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2009/03/starting-openoffice-24-as-service-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3296859128907445591'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/3296859128907445591'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2009/03/starting-openoffice-24-as-service-in.html' title='Starting OpenOffice 2.4 as a Service in Ubuntu'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-4871152852507379736</id><published>2009-03-17T13:45:00.000-07:00</published><updated>2009-03-23T01:29:32.412-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Adding different ActionListeners Programmatically</title><content type='html'>Here are some sample codes that anyone can use for adding different types of ActionListeners&lt;br /&gt;to a &lt;span style="font-weight: bold;"&gt;RichCommandButton&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;RichCommandMenuItem&lt;/span&gt; or &lt;span style="font-weight: bold;"&gt;RichCommandToolbarButton&lt;/span&gt;  &lt;span style="font-weight: bold;"&gt;Programmatically&lt;/span&gt;.&lt;br /&gt;&lt;br /&gt;There might be cases that you need to add actions to some buttons programmatically; This means that you will need to search through the API to find out the appropriate java class of what you need. This Class saves you from this trouble and most of all saves you time!&lt;br /&gt;&lt;br /&gt;I came across to this requirement and i think it might be very useful to others.&lt;br /&gt;&lt;br /&gt;Also check &lt;a href="http://biemond.blogspot.com/2009/03/some-handy-code-for-backing-beans-adf.html"&gt;Edwin Biemond's&lt;/a&gt; post for some handy code you might need.&lt;br /&gt;&lt;br /&gt;Basically is a Utils Class called &lt;span style="font-weight: bold;"&gt;RichCommandComponentUtils&lt;/span&gt;.java and adds programmatically the following methods:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;ActionListener&lt;br /&gt;&lt;/li&gt;&lt;li&gt;Action&lt;/li&gt;&lt;li&gt;ResetActionListener&lt;/li&gt;&lt;li&gt;FileDownLoadActionListener&lt;/li&gt;&lt;li&gt;ReturnListener&lt;br /&gt;&lt;/li&gt;&lt;/ol&gt;&lt;br /&gt;Each method has it's own MethodExpression method in order to be suitable for the component.&lt;br /&gt;This can be very handy and useful in cases of &lt;span style="font-weight: bold;"&gt;Dynamically Generating Buttons as &lt;/span&gt;&lt;a style="font-weight: bold;" href="http://andrejusb.blogspot.com/2008/06/dynamic-buttons-in-oracle-adf.html"&gt;Andrej's post.&lt;/a&gt;&lt;br /&gt;Of course it can be used where ever you think it is suitable&lt;br /&gt;&lt;br /&gt;In a few words the process is this:&lt;br /&gt;&lt;br /&gt;In order to have an ActionListener to , lets say a commandButton, porgrammatically  we need to do the following steps:&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Binding of the Button to a bean e.g. &lt;span style="font-weight: bold;"&gt;myActionListenerButton&lt;/span&gt;.&lt;br /&gt;&lt;/li&gt;&lt;li&gt;The ActionListener method which must have the following structure&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;public void anActionListener(ActionEvent  anActionEvent) { ... }&lt;/span&gt;&lt;/li&gt;&lt;li&gt;And the Usage of the RichCommandComponent class as follows:&lt;br /&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt; RichCommandComponentUtils.addActionListener( this.getMyActionListenerButton(),"#{main_Backing.&lt;/span&gt;&lt;span style="font-weight: bold;"&gt;anActionListener&lt;/span&gt;&lt;/span&gt;&lt;span style="font-size:85%;"&gt;&lt;span style="font-weight: bold;"&gt;}");&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ol&gt;And this is it.&lt;br /&gt;&lt;br /&gt;Your button now has another ActionListener.&lt;br /&gt;&lt;a href="http://adfsampleslist.googlecode.com/files/ComponentsUtilsApplication.zip"&gt;Here is a sample application&lt;/a&gt; that adds different types of listeners to some buttons.&lt;br /&gt;&lt;br /&gt;In this sample application Listeners are added to the Buttons on Main and Second pages.&lt;br /&gt;This happens on &lt;span style="font-weight: bold;"&gt;RenderResponce&lt;/span&gt; phase of each page.&lt;br /&gt;&lt;br /&gt;NOTE: In the sample application I clear all actionListeners before adding some. This happens because  actionListener are &lt;span style="font-weight: bold;"&gt;added&lt;/span&gt; which means that  with this sample every time the page is rendered the Buttons will have plus one actionListener.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Feel free to update, fix, improve this Utils class. It is very usefull to me and other improved versions will come.  Let me Know of what you think&lt;br /&gt;&lt;br /&gt;regards!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-4871152852507379736?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/4871152852507379736/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2009/03/adding-different-actionlisteners.html#comment-form' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4871152852507379736'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/4871152852507379736'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2009/03/adding-different-actionlisteners.html' title='Adding different ActionListeners Programmatically'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-294172151396534006.post-5152604471780880689</id><published>2009-02-07T07:05:00.000-08:00</published><updated>2009-03-23T01:29:32.412-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ADF'/><title type='text'>Dependent LOV's in Query Criteria and View Accessor Workaround</title><content type='html'>&lt;style type="text/css"&gt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;p style="margin-bottom: 0in;"&gt;Cascade LOVs is a very common request in many applications (refer to &lt;span style="font-weight: bold;"&gt;Andrejus Baranovskis's&lt;/span&gt; post for how to implement &lt;span style="color: rgb(0, 0, 128);"&gt;&lt;u&gt;&lt;a href="http://andrejusb.blogspot.com/2008/12/cascading-lovs-in-oracle-adf-11g-update.html"&gt;here &lt;/a&gt;&lt;/u&gt;&lt;/span&gt;)&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Also the usage of Query Criteria component(af:Query) in pages is a very good practice when Complex search is needed.&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;      &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;There is always the ability to add more fields and set operators as desired in order to make your search fit to your needs.  &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_YtJHabtSoq8/SY2jubPQkzI/AAAAAAAAAAM/VyLf6CnxBik/s1600-h/queryCriteria_screen.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 116px;" src="http://1.bp.blogspot.com/_YtJHabtSoq8/SY2jubPQkzI/AAAAAAAAAAM/VyLf6CnxBik/s320/queryCriteria_screen.png" alt="" id="BLOGGER_PHOTO_ID_5300072354466009906" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;There is a problem when trying to add second time the same  LOV attribute that has bind variable(either in SQL or via ViewCriteria)  in Query Criteria component(through &lt;b&gt;Advanced feature)&lt;/b&gt;. When trying to add the same LOV for second time the application crashes...&lt;/p&gt;   &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;The Test Case:&lt;/b&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;In order to follow the test case we run this sample &lt;a href="http://adfsampleslist.googlecode.com/files/QueryCriteria_WorkAround.zip"&gt;application&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;span style="font-weight: bold;"&gt;NOTE&lt;/span&gt;: to following test case is simple and does not reflect real conditions  for real Design of cascade LOVs, it is an example.&lt;/p&gt;    &lt;p style="margin-bottom: 0in;"&gt;Lets say that we want to make a search by &lt;b&gt;EmployeeId =any valu&lt;/b&gt;e and have the following case about ManagerId.  &lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;ManagerId must be &lt;b&gt;greater&lt;/b&gt; than &lt;b&gt;1&lt;/b&gt; AND must &lt;b&gt;NOT&lt;/b&gt; be equal to &lt;b&gt;2&lt;/b&gt;.  &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;ManagerId produces LOV from &lt;b&gt;ManagersView(a second Employees View Object)&lt;/b&gt; with View Criteria defined and a bind Variable.&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2kOEpYJmI/AAAAAAAAAAU/F451E3jonJI/s1600-h/ManagersView_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 178px;" src="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2kOEpYJmI/AAAAAAAAAAU/F451E3jonJI/s320/ManagersView_small.png" alt="" id="BLOGGER_PHOTO_ID_5300072898157356642" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;         &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;   &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;This bind variable accepts value from EmployeeId in EmployeesView Object through View Accessor.This is a typical  filtering process. &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_YtJHabtSoq8/SY2lB4vInwI/AAAAAAAAAAc/e_PuQcMCeuY/s1600-h/ViewEmployeesAccessorScreen_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 227px;" src="http://3.bp.blogspot.com/_YtJHabtSoq8/SY2lB4vInwI/AAAAAAAAAAc/e_PuQcMCeuY/s320/ViewEmployeesAccessorScreen_small.png" alt="" id="BLOGGER_PHOTO_ID_5300073788313476866" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;         &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;In order to follow our test case we run this sample &lt;a href="http://adfsampleslist.googlecode.com/files/QueryCriteria_WorkAround.zip"&gt;application &lt;/a&gt;&lt;br /&gt;&lt;/p&gt; &lt;ol&gt;&lt;li&gt;Press Advanced in Query Criteria,&lt;/li&gt;&lt;li&gt;Press Add Fields,&lt;/li&gt;&lt;li&gt;Click on Manager Id field.&lt;/li&gt;&lt;li&gt;Press Again Add Fields,&lt;/li&gt;&lt;li&gt;Click on Manager Id field again.&lt;/li&gt;&lt;/ol&gt;       &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;The Problem:&lt;/b&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;After pressing second time the ManagerId the following &lt;/span&gt;&lt;b&gt;error &lt;/b&gt;&lt;span style=""&gt;appears:&lt;/span&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;Table is gone! You might get a 500 error page as well.&lt;br /&gt;&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;       &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2lm3Bd-fI/AAAAAAAAAAk/20hXuilnmuA/s1600-h/erroPage_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 256px;" src="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2lm3Bd-fI/AAAAAAAAAAk/20hXuilnmuA/s320/erroPage_small.png" alt="" id="BLOGGER_PHOTO_ID_5300074423508662770" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;Stack Trace:&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2mQ68NK3I/AAAAAAAAAAs/vcUnhKKimTM/s1600-h/stackTrace_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 219px;" src="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2mQ68NK3I/AAAAAAAAAAs/vcUnhKKimTM/s320/stackTrace_small.png" alt="" id="BLOGGER_PHOTO_ID_5300075146114837362" border="0" /&gt;&lt;/a&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;     &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;Stack Trace indicates that the second time the field is added, the Attribute EmployeeId cannot be evaluated. The problem is reproduced only for LOV fields that use bind variables. Any other fields can be added without a problem...&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;No matter if it is a &lt;span style="font-weight: bold;"&gt;feature or a bug&lt;/span&gt;, the problem persists and to bring your application  back to working state a restart on the server is required!!.&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;b&gt;The Work Around:&lt;/b&gt;&lt;/p&gt;  &lt;p style="margin-bottom: 0in;"&gt;&lt;span style=""&gt;The solution to this problem is simple. A single line of code actually! Here is where &lt;/span&gt;&lt;b&gt;Groovy&lt;/b&gt;&lt;span style=""&gt; comes to play. After reading &lt;a style="font-weight: bold;" href="http://radio.weblogs.com/0118231/stories/2007/05/08/jdeveloperadf11gTechnicalPreviewTipsAndTricks.html"&gt;Steve Muench's Tips and Tricks&lt;/a&gt;, i applied a very simple script. As you saw while running the application; the first time the LOV is added, the EmployeeId is evaluated correctly. The second time though, is not. For some reason, userData cannot find the attribute (and yet the question remains: is it a feature or a bug???).&lt;/span&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;Simply add the following Groovy script in the View Accessors of the View Object.&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2nx2kxieI/AAAAAAAAAA0/E7Q2hzcwYMY/s1600-h/solution_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 223px;" src="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2nx2kxieI/AAAAAAAAAA0/E7Q2hzcwYMY/s320/solution_small.png" alt="" id="BLOGGER_PHOTO_ID_5300076811390126562" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;    &lt;style type="text/css"&gt;  &lt;!--   @page { size: 8.5in 11in; margin: 0.79in }   P { margin-bottom: 0.08in }  --&gt;  &lt;/style&gt;  &lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;And Everything will work fine.&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt;It is a simple check if the Attribute exists in UserData; if not, set value to null..&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt; &lt;p&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2ufbAThDI/AAAAAAAAAA8/IUfQDwzbbXQ/s1600-h/solutionPresented_small.png"&gt;&lt;img style="margin: 0pt 10px 10px 0pt; float: left; cursor: pointer; width: 320px; height: 218px;" src="http://4.bp.blogspot.com/_YtJHabtSoq8/SY2ufbAThDI/AAAAAAAAAA8/IUfQDwzbbXQ/s320/solutionPresented_small.png" alt="" id="BLOGGER_PHOTO_ID_5300084191333155890" border="0" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p style="margin-bottom: 0in;"&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt; &lt;p style="margin-bottom: 0in;"&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;&lt;br /&gt;&lt;!-- AddThis Button BEGIN --&gt;&lt;br /&gt;&lt;script type="text/javascript"&gt;var addthis_pub="mox8iro";&lt;/script&gt;&lt;br /&gt;&lt;a href="http://www.addthis.com/bookmark.php?v=20" onmouseover="return addthis_open(this, '', '[URL]', '[TITLE]')" onmouseout="addthis_close()" onclick="return addthis_sendto()"&gt;&lt;img src="http://s7.addthis.com/static/btn/lg-addthis-en.gif" width="125" height="16" alt="Bookmark and Share" style="border:0"/&gt;&lt;/a&gt;&lt;script type="text/javascript" src="http://s7.addthis.com/js/200/addthis_widget.js"&gt;&lt;/script&gt;&lt;br /&gt;&lt;!-- AddThis Button END --&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/294172151396534006-5152604471780880689?l=dstas.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://dstas.blogspot.com/feeds/5152604471780880689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://dstas.blogspot.com/2009/02/dependent-lovs-in-query-criteria-and.html#comment-form' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5152604471780880689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/294172151396534006/posts/default/5152604471780880689'/><link rel='alternate' type='text/html' href='http://dstas.blogspot.com/2009/02/dependent-lovs-in-query-criteria-and.html' title='Dependent LOV&apos;s in Query Criteria and View Accessor Workaround'/><author><name>Dimitrios Stasinopoulos</name><uri>http://www.blogger.com/profile/03186199307026201300</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='24' src='http://1.bp.blogspot.com/_YtJHabtSoq8/SY26ITEYGRI/AAAAAAAAABI/fUK1P0E8PHk/S220/DSCN0472.JPG'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_YtJHabtSoq8/SY2jubPQkzI/AAAAAAAAAAM/VyLf6CnxBik/s72-c/queryCriteria_screen.png' height='72' width='72'/><thr:total>2</thr:total></entry></feed>
