<?xml version='1.0' encoding='UTF-8'?><rss xmlns:atom='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:blogger='http://schemas.google.com/blogger/2008' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0' version='2.0'><channel><atom:id>tag:blogger.com,1999:blog-3873906122160366310</atom:id><lastBuildDate>Wed, 22 May 2013 14:50:52 +0000</lastBuildDate><category>NamedQuery</category><category>JavaClient</category><category>JPA</category><category>PreferencesPage</category><category>Dynamic Table</category><category>ADF Mobile</category><category>DVT</category><category>Declarative SQL</category><category>AccessorIterator</category><category>Navigation</category><category>SQLite</category><category>JPA Dynamic Query</category><category>af:query</category><category>Regions</category><category>DataSource</category><category>EJB</category><category>NavigationHandler</category><category>JNDI</category><category>Springboard</category><category>Compare</category><category>Entity</category><category>BackingBean</category><category>AttributeDef</category><category>SolrJ</category><category>ADF Form</category><category>Apache</category><category>JSON</category><category>InClause</category><category>EJB DataControl</category><category>Android</category><category>SessionFacade</category><category>Jersey</category><category>Transaction</category><category>ViewObject</category><category>Inheritance</category><category>LOV</category><category>Shuttle</category><category>Transient</category><category>REST WebServices</category><category>ViewScope</category><category>table</category><category>EntityManager</category><category>NamedCriteria</category><category>AutoSuggest</category><category>JavaBean</category><category>DataControl</category><category>Oracle ADF Essentials</category><category>Managed Bean</category><category>ViewCriteria</category><category>SequenceImpl</category><category>Bean DataControl</category><category>Android Emulator</category><category>NativeQuery</category><category>DeviceBackButton</category><category>Adapter DataControl</category><category>RowSelection</category><category>ADF</category><category>Entities</category><category>BC4J</category><category>Tomcat</category><category>DataControlFrame</category><category>BindVariable</category><category>AM</category><category>SQL Query</category><category>Tree</category><category>JoinFetch</category><category>ShuttleComponent</category><category>Display Hint</category><category>Bindings</category><category>SingleTable</category><category>ActionEvent</category><category>Taskflow</category><category>createInsert</category><category>OracleDB</category><category>ADF Faces</category><category>Glassfish</category><category>selectManyCheckbox</category><category>DCDataVo</category><category>Solr</category><category>EntityImpl</category><category>RowKey</category><title>Unwinding ADF</title><description>Oracle ADF is an end-to-end Java EE framework that simplifies and speed up application development.This blog discusses technical discovery on Oracle Application Development Framework using Jdeveloper.
&lt;br&gt;&lt;br&gt;
The views expressed on this blog are my own and do not necessarily reflect the views of Oracle.</description><link>http://deepakcs.blogspot.com/</link><managingEditor>noreply@blogger.com (Deepak Siddappa)</managingEditor><generator>Blogger</generator><openSearch:totalResults>48</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-85678950450606373</guid><pubDate>Sun, 19 May 2013 11:18:00 +0000</pubDate><atom:updated>2013-05-19T04:18:18.809-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>REST WebServices</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Jersey</category><category domain='http://www.blogger.com/atom/ns#'>Taskflow</category><category domain='http://www.blogger.com/atom/ns#'>EJB DataControl</category><category domain='http://www.blogger.com/atom/ns#'>JPA</category><title>ADF Mobile With EJB Restful Web Service</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This article is the continuation of my previous article on &lt;a href="http://deepakcs.blogspot.in/2013/04/configuring-ejb-with-restful-web.html"&gt;Configuring EJB with Restful Web Service in ADF&lt;/a&gt;. Here will see how to integrate EJB Restful Web Service with ADF mobile.&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it is deployed and run on the Android Device/Emulator. In the below screen Department list will be displayed.&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/-bxl5LSYLKLU/UZh7mHYJSMI/AAAAAAAACyk/I0068zZkgEo/s1600/Department+List.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-bxl5LSYLKLU/UZh7mHYJSMI/AAAAAAAACyk/I0068zZkgEo/s400/Department+List.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Clicking on any department will take you to the selected Department details page, edit the details and click on the Save button to submit the data. Clicking on delete button will delete the current department.&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/-ZAmzZfbSXH4/UZh8ANw2tTI/AAAAAAAACys/1IpNHSuwIgo/s1600/Edit+Dept.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-ZAmzZfbSXH4/UZh8ANw2tTI/AAAAAAAACys/1IpNHSuwIgo/s400/Edit+Dept.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;From Department List screen, click on add button to add the new record. Enter the details and click on Save button to submit the data.&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/-lLR9wZ8VFSs/UZh8dMy0P1I/AAAAAAAACy0/jHnSW8bW6GM/s1600/Add+Dept.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-lLR9wZ8VFSs/UZh8dMy0P1I/AAAAAAAACy0/jHnSW8bW6GM/s400/Add+Dept.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;After the below actions, updated department result page will be displayed as shown 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/-DMuM04U-yWQ/UZh9WYM94lI/AAAAAAAACzE/mepnd4WQF94/s1600/Updated+Result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-DMuM04U-yWQ/UZh9WYM94lI/AAAAAAAACzE/mepnd4WQF94/s400/Updated+Result.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/EJBRestFulServiceMobileApp.zip"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.4.0 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl.&lt;br /&gt;&lt;br /&gt;In Application Controller project, create a Departments.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Departments {&lt;br /&gt;    private BigDecimal departmentId;&lt;br /&gt;    private String departmentName;&lt;br /&gt;    private BigDecimal locationId;&lt;br /&gt;    private BigDecimal managerId;&lt;br /&gt;&lt;br /&gt;    public Departments() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Departments(BigDecimal departmentId, String departmentName, BigDecimal locationId, BigDecimal managerId) {&lt;br /&gt;        this.departmentId = departmentId;&lt;br /&gt;        this.departmentName = departmentName;&lt;br /&gt;        this.locationId = locationId;&lt;br /&gt;        this.managerId = managerId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDepartmentId(BigDecimal departmentId) {&lt;br /&gt;        this.departmentId = departmentId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public BigDecimal getDepartmentId() {&lt;br /&gt;        return departmentId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDepartmentName(String departmentName) {&lt;br /&gt;        this.departmentName = departmentName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDepartmentName() {&lt;br /&gt;        return departmentName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLocationId(BigDecimal locationId) {&lt;br /&gt;        this.locationId = locationId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public BigDecimal getLocationId() {&lt;br /&gt;        return locationId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setManagerId(BigDecimal managerId) {&lt;br /&gt;        this.managerId = managerId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public BigDecimal getManagerId() {&lt;br /&gt;        return managerId;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create DepartmentsDC.java file and add the below code, create DataControl based on DepartmentsDC file&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class DepartmentsDC {&lt;br /&gt;    public DepartmentsDC() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Departments ediDepartment(BigDecimal departmentId, String departmentName, BigDecimal locationId,&lt;br /&gt;                                     BigDecimal managerId) {&lt;br /&gt;        return new Departments(departmentId, departmentName, locationId, managerId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Departments addDepartment() {&lt;br /&gt;        BigDecimal defaultVal = new BigDecimal("0");&lt;br /&gt;        return new Departments(defaultVal, "", defaultVal, defaultVal);&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;In the New Gallery expand the General - XML nodes and select XML Schema and click OK, enter Departments.xsd in File Name field and the following attributes as shown in below image.&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/-PVPtJLi8ufs/UZiKj69UyII/AAAAAAAACz8/_HluXU75LUU/s1600/departmentsXSD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="323" src="http://3.bp.blogspot.com/-PVPtJLi8ufs/UZiKj69UyII/AAAAAAAACz8/_HluXU75LUU/s400/departmentsXSD.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the New Gallery expand the General - Connection nodes and select URL Connection and click OK, enter the URL Endpoint details, You can download &lt;a href="http://deepakcs.blogspot.in/2013/04/configuring-ejb-with-restful-web.html"&gt;Configuring EJB with Restful Web Service&lt;/a&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=3873906122160366310"&gt; in ADF&lt;/a&gt; from my previous article.&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/-YiimVCW9psc/UZiKyasG0KI/AAAAAAAAC0E/rCdI_uAe3kw/s1600/Connection.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-YiimVCW9psc/UZiKyasG0KI/AAAAAAAAC0E/rCdI_uAe3kw/s400/Connection.png" width="328" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;Note: - Next create a URL Service Data Control from - http://IpAddress:7101/EJBRestService/jersey/EJBRESTService api with HTTP Methods: GET, PUT, POST, DELETE. &lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In the New Gallery expand the General - Data Control nodes and select URL Service Data Control and click OK and enter the details to create the &lt;b&gt;GET &lt;/b&gt;method&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/-Xtu6oghQ0yM/UZiP9veBGyI/AAAAAAAAC0U/dn_iNPJpONc/s1600/RestFulWebserviceGetMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://2.bp.blogspot.com/-Xtu6oghQ0yM/UZiP9veBGyI/AAAAAAAAC0U/dn_iNPJpONc/s400/RestFulWebserviceGetMethod.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the New Gallery expand the General - Data Control nodes and select  URL Service Data Control and click OK and enter the details to create  the &lt;b&gt;POST &lt;/b&gt;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/-k2u3uw-fpU0/UZiQVU9EhSI/AAAAAAAAC0c/Q_RM_LKifQo/s1600/RestFulWebservicePostMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://4.bp.blogspot.com/-k2u3uw-fpU0/UZiQVU9EhSI/AAAAAAAAC0c/Q_RM_LKifQo/s400/RestFulWebservicePostMethod.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In Create URL Service Data Control wizard - step 3 of 5, specify the XSD url which we created earlier.&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/-qN4L9cf-64U/UZiQ1i8Gt7I/AAAAAAAAC0k/tIcJgPTDL9c/s1600/RestFulWebservicePostMethodXSD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="301" src="http://1.bp.blogspot.com/-qN4L9cf-64U/UZiQ1i8Gt7I/AAAAAAAAC0k/tIcJgPTDL9c/s400/RestFulWebservicePostMethodXSD.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the New Gallery expand the General - Data Control nodes and select  URL Service Data Control and click OK and enter the details to create  the &lt;b&gt;PUT&lt;/b&gt; 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/-3SEy-YEoJ7Y/UZiRDTzIt1I/AAAAAAAAC0s/NoyvWywSClA/s1600/RestFulWebservicePutMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://1.bp.blogspot.com/-3SEy-YEoJ7Y/UZiRDTzIt1I/AAAAAAAAC0s/NoyvWywSClA/s400/RestFulWebservicePutMethod.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In Create URL Service Data Control wizard - step 3 of 5, specify the XSD url which we created earlier.&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/-qN4L9cf-64U/UZiQ1i8Gt7I/AAAAAAAAC0k/tIcJgPTDL9c/s1600/RestFulWebservicePostMethodXSD.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="301" src="http://1.bp.blogspot.com/-qN4L9cf-64U/UZiQ1i8Gt7I/AAAAAAAAC0k/tIcJgPTDL9c/s400/RestFulWebservicePostMethodXSD.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the New Gallery expand the General - Data Control nodes and select  URL Service Data Control and click OK and enter the details to create  the &lt;b&gt;DELETE&lt;/b&gt; 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/-GkSkxSctgmk/UZiRbtD02VI/AAAAAAAAC00/Ud6k3pX6Sh8/s1600/RestFulWebserviceDeleteMethod.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://4.bp.blogspot.com/-GkSkxSctgmk/UZiRbtD02VI/AAAAAAAAC00/Ud6k3pX6Sh8/s400/RestFulWebserviceDeleteMethod.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In Create URL Service Data Control wizard - step 3 of 5, enter the departmentId value as 0.&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/-v3KQB0r87Kg/UZiRtpf9RLI/AAAAAAAAC08/HGRnmtupAYs/s1600/RestFulWebserviceDeleteMethodParameters.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="300" src="http://3.bp.blogspot.com/-v3KQB0r87Kg/UZiRtpf9RLI/AAAAAAAAC08/HGRnmtupAYs/s400/RestFulWebserviceDeleteMethodParameters.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next open the DataControls.dcx file and change the Definition id values to looks like below.&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/-wDfrGN_9kU8/UZiSGLqMNPI/AAAAAAAAC1E/OoByH2GmjHQ/s1600/DataControl.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="143" src="http://4.bp.blogspot.com/-wDfrGN_9kU8/UZiSGLqMNPI/AAAAAAAAC1E/OoByH2GmjHQ/s320/DataControl.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In ViewController project. Locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will launch the new Create ADF Mobile Feature dialog, modify the values as shown 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/-mz8iNZ9uX6I/UZiCdMHGWdI/AAAAAAAACzU/mTrkxqopz7A/s1600/DepartmentsFeature.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="103" src="http://2.bp.blogspot.com/-mz8iNZ9uX6I/UZiCdMHGWdI/AAAAAAAACzU/mTrkxqopz7A/s400/DepartmentsFeature.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Features table, select the newly created feature Departments. Under the Features table, click the Content tab, and locate the Content table. Notice that the content item Departments.1 is created by default. Next add a new file by clicking the green plus sign and select taskflow option, this will launch the new Create ADF Mobile Task Flow dialog, modify the value as shown below.&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/-p20gGS34duk/UZiCpCpB9OI/AAAAAAAACzc/Hyd9SWONS-A/s1600/DepartmentsTaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://3.bp.blogspot.com/-p20gGS34duk/UZiCpCpB9OI/AAAAAAAACzc/Hyd9SWONS-A/s400/DepartmentsTaskFlow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Click on the DepartmentsTaskflow.xml to open the file in taskflow editor and follow the below steps.&lt;/span&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Create three views and name them as deptList, deptAdd and deptEdit respectively&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Draw the control flow case from deptList to addDept and Outcome as "add"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Draw the control flow case from deptList to editDept and Outcome as "edit"&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;From DataControl palette drag and drop getDepartmentsFindAll and drop as method-call&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Draw the control flow case from &lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;getDepartmentsFindAll method-call to &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;deptList and Outcome as "getDepartmentsFindAll"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Draw the control flow case from addDept to &lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;getDepartmentsFindAll &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;method-call &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;and Outcome as "list"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Draw the control flow case from &lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;editDept &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;to &lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;getDepartmentsFindAll &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;method-call &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;/span&gt;and Outcome as "list"&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DepartmentsTaskflow.xml will looks as shown below diagram.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;a href="http://1.bp.blogspot.com/-gDVqQI6nf2A/UZiEDLCvzoI/AAAAAAAACzs/eOVKRMmDBDA/s1600/DepartmentTaskFlowDiagram.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="350" src="http://1.bp.blogspot.com/-gDVqQI6nf2A/UZiEDLCvzoI/AAAAAAAACzs/eOVKRMmDBDA/s400/DepartmentTaskFlowDiagram.png" width="400" /&gt;&lt;/a&gt;&lt;/span&gt;&lt;/div&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Double click on deptList view will launch Create ADF Mobile AMX Page dialog, in page facets select Header and Secondary Action. Go to source tab and follow the below steps:&lt;/span&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Header facet, amx:outputText set the value as "Dept List"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Secondary Action facet, for amx:commandButton modify the values text: Add, action: add&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;From DC palette drag and drop EJBService-&amp;gt;getDepartmentsFindAll()-&amp;gt;Return-&amp;gt;departmentss-&amp;gt;departments-&amp;gt;ADF Mobile List View and select the default options&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;amx:Item, set the action as "edit"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Inside amx:Item set the setPropertyListener as shown below&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-cm3p93nHgwU/UZioSobBdyI/AAAAAAAAC1U/YpwZVcApR4U/s1600/Departments+PageFlowScope.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="122" src="http://4.bp.blogspot.com/-cm3p93nHgwU/UZioSobBdyI/AAAAAAAAC1U/YpwZVcApR4U/s400/Departments+PageFlowScope.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;Note:- Created the DataControl &lt;/i&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;i&gt;DepartmentsDC with addDepartment and editDepartment methods, so that the type casting the ADF form values to departments object will be easy.&lt;/i&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Double  click on deptAdd view will launch Create ADF Mobile AMX Page dialog,  in page facets select Header, Primary Action. Go to source tab and  follow the below steps:&lt;/span&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Header facet, amx:outputText set the value as "Add Dept"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Primary Action facet, for amx:commandButton modify the values text: Back, action: __back&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;From &lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DC palette drag and drop DepartmentsDC-&amp;gt;addDepartment-&amp;gt;Departments-&amp;gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Form as ADF Mobile Form.&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Go to bindings and add the following attributesValues, departmentId, departmentName, locationId, managerId as shown below. &lt;/span&gt;&lt;/li&gt;&lt;/ul&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/-yymvLWiPdzw/UZisS6mt2cI/AAAAAAAAC1k/fACouYtaac0/s1600/attributeValues.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="143" src="http://1.bp.blogspot.com/-yymvLWiPdzw/UZisS6mt2cI/AAAAAAAAC1k/fACouYtaac0/s400/attributeValues.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;From &lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DC palette drag and drop postDepartments-&amp;gt;Method as ADF Mobile Button, set name as "Save", action as "list" and &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;set the setPropertyListener as shown below&amp;nbsp;&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-LZOVnTK1hHY/UZitaONIcmI/AAAAAAAAC1w/hkh2kk6WAcc/s1600/setPropertyListener.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" src="http://4.bp.blogspot.com/-LZOVnTK1hHY/UZitaONIcmI/AAAAAAAAC1w/hkh2kk6WAcc/s400/setPropertyListener.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Double  click on deptAdd view will launch Create ADF Mobile AMX Page dialog,  in page facets select Header, Primary, &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Secondary &lt;/span&gt; Action. Go to source tab and  follow the below steps:&lt;/span&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Header facet, amx:outputText set the value as "Edit Dept"&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Primary Action facet, for amx:commandButton modify the values text: Back, action: __back&lt;/span&gt;&lt;/span&gt;&lt;/li&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;In Secondary Action facet,&amp;nbsp; &lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;from &lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DC palette drag and drop &lt;/span&gt;&lt;/span&gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;EJBService-&amp;gt;deleteDepartments&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;-&amp;gt;Method as ADF Mobile Button, &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;set action as "list". In Edit Action Binding wizard mention the parameter for departmentId as #{pageFlowScope.departmentId}&lt;/span&gt;&lt;/li&gt;&lt;li&gt;From &lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DC palette drag and drop DepartmentsDC-&amp;gt;editDepartment-&amp;gt;Departments-&amp;gt;&lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Form as ADF Mobile Form and in edit action binding wizard &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;mention the parameters as shown below &lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-IlvpxZPBj-I/UZivfzDwEZI/AAAAAAAAC2A/jdyXnZUedzo/s1600/editDepartment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="347" src="http://2.bp.blogspot.com/-IlvpxZPBj-I/UZivfzDwEZI/AAAAAAAAC2A/jdyXnZUedzo/s400/editDepartment.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;Go to bindings and add the following attributesValues, departmentId, departmentName, locationId, managerId as shown below.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-yymvLWiPdzw/UZisS6mt2cI/AAAAAAAAC1k/fACouYtaac0/s1600/attributeValues.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="143" src="http://1.bp.blogspot.com/-yymvLWiPdzw/UZisS6mt2cI/AAAAAAAAC1k/fACouYtaac0/s400/attributeValues.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;From &lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;DC palette drag and drop putDepartments-&amp;gt;Method as ADF Mobile Button, set &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;name as "Save", &lt;/span&gt;action as "list" and &lt;/span&gt;&lt;span style="-webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: white; color: black; display: inline !important; float: none; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: auto; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px;"&gt;set the setPropertyListener as shown below.&lt;/span&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-9yOt1A9BudU/UZiwMYwnBrI/AAAAAAAAC2I/N5iE_GQpujY/s1600/putDepartment.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="97" src="http://3.bp.blogspot.com/-9yOt1A9BudU/UZiwMYwnBrI/AAAAAAAAC2I/N5iE_GQpujY/s400/putDepartment.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/05/adf-mobile-with-ejb-restful-web-service.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-bxl5LSYLKLU/UZh7mHYJSMI/AAAAAAAACyk/I0068zZkgEo/s72-c/Department+List.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5759285336080291113</guid><pubDate>Thu, 18 Apr 2013 15:01:00 +0000</pubDate><atom:updated>2013-04-18T08:01:06.381-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>REST WebServices</category><category domain='http://www.blogger.com/atom/ns#'>EJB</category><category domain='http://www.blogger.com/atom/ns#'>SessionFacade</category><category domain='http://www.blogger.com/atom/ns#'>Jersey</category><title>Configuring EJB with Restful Web Service in ADF </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In current JDeveloper we can expose EJB's as Web Service, however this will be a SOAP based web service. In this article will discuss on configuring EJB with restful web service using jersey support.&amp;nbsp;This article provides an example of building a complete RESTful API using the different HTTP methods: &lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;GET to retrieve data&lt;/li&gt;&lt;li&gt;POST to add data&lt;/li&gt;&lt;li&gt;PUT to update data&lt;/li&gt;&lt;li&gt;DELETE to delete data&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/EJBRestService.zip"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.3.0 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps:-&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create a EJB project, then create the DEPARTMENT JPA/EJB 3.0 Entity using the"Entities from tables" EJB wizard, create a&amp;nbsp;Stateless&amp;nbsp;Session bean and select Departments JPA Entity to generates&amp;nbsp;façade&amp;nbsp;methods.&lt;br /&gt;&lt;br /&gt;Open the Departments entity and annotate with&amp;nbsp;@XmlRootElement, when a top level class or an enum type is annotated with the @XmlRootElement annotation, then its value is represented as XML element in an XML document.&amp;nbsp;Basically this allow ADF to convert this object&amp;nbsp;directly&amp;nbsp;to XML.JSON.&lt;br /&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/-xsGLBGkMtLc/UW_KVUnwB0I/AAAAAAAACx0/41Op4KuhiAk/s1600/XmlRootElement.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="123" src="http://1.bp.blogspot.com/-xsGLBGkMtLc/UW_KVUnwB0I/AAAAAAAACx0/41Op4KuhiAk/s640/XmlRootElement.png" width="550" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;Add a new project ('REST Web Service Project') in the application and mention the name as WebService. Go to 'Project properties' &amp;gt; 'Dependencies' and add the Model project as a dependency.&lt;br /&gt;&lt;br /&gt;Next add the supporting libraries to the Rest Web Service project, go to 'Project properties' &amp;gt; 'Libraries and Classpath'. Libraries are listed in the below screen shot, you can find the libraries in &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/EJBRestService.zip"&gt;EJBRestService&lt;/a&gt;/libs folder.&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/-NbZsbFLQNOE/UW_XtwT6H2I/AAAAAAAACx8/l-psZ47_vJI/s1600/Libs.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="286" src="http://4.bp.blogspot.com/-NbZsbFLQNOE/UW_XtwT6H2I/AAAAAAAACx8/l-psZ47_vJI/s400/Libs.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Create and open EJBRestService java class, annotate with @Path("EJBRESTService") on class level. Click on the @Path notice on the left side yellow bulb will be appeared and click on the bulb to "Configure web.xml for jersey JAX-RS web services" as shown in below.&lt;br /&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://4.bp.blogspot.com/-KEKZ903Q0VY/UW_ZVqrwCII/AAAAAAAACyE/yi51N8_nN3o/s1600/JAX-RS.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="150" src="http://4.bp.blogspot.com/-KEKZ903Q0VY/UW_ZVqrwCII/AAAAAAAACyE/yi51N8_nN3o/s400/JAX-RS.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now web.xml is created under WEB-INF folder. Open the file and replace with the below xml code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 280px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;?xml version = '1.0' encoding = 'windows-1252'?&amp;gt;&lt;br /&gt;&amp;lt;web-app xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&lt;br /&gt;         xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"&lt;br /&gt;         version="2.5"&amp;gt;&lt;br /&gt;    &amp;lt;filter&amp;gt;&lt;br /&gt;        &amp;lt;filter-name&amp;gt;JpsFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;        &amp;lt;filter-class&amp;gt;oracle.security.jps.ee.http.JpsFilter&amp;lt;/filter-class&amp;gt;&lt;br /&gt;        &amp;lt;init-param&amp;gt;&lt;br /&gt;            &amp;lt;param-name&amp;gt;enable.anonymous&amp;lt;/param-name&amp;gt;&lt;br /&gt;            &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt;&lt;br /&gt;        &amp;lt;/init-param&amp;gt;&lt;br /&gt;    &amp;lt;/filter&amp;gt;&lt;br /&gt;    &amp;lt;filter-mapping&amp;gt;&lt;br /&gt;        &amp;lt;filter-name&amp;gt;JpsFilter&amp;lt;/filter-name&amp;gt;&lt;br /&gt;        &amp;lt;url-pattern&amp;gt;/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;        &amp;lt;dispatcher&amp;gt;FORWARD&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;        &amp;lt;dispatcher&amp;gt;REQUEST&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;        &amp;lt;dispatcher&amp;gt;INCLUDE&amp;lt;/dispatcher&amp;gt;&lt;br /&gt;    &amp;lt;/filter-mapping&amp;gt;&lt;br /&gt;    &amp;lt;servlet&amp;gt;&lt;br /&gt;        &amp;lt;servlet-name&amp;gt;jersey&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;        &amp;lt;servlet-class&amp;gt;com.sun.jersey.spi.container.servlet.ServletContainer&amp;lt;/servlet-class&amp;gt;&lt;br /&gt;        &amp;lt;init-param&amp;gt;&lt;br /&gt;            &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.resourceConfigClass&amp;lt;/param-name&amp;gt;&lt;br /&gt;            &amp;lt;param-value&amp;gt;com.sun.jersey.api.core.PackagesResourceConfig&amp;lt;/param-value&amp;gt;&lt;br /&gt;        &amp;lt;/init-param&amp;gt;&lt;br /&gt;        &amp;lt;init-param&amp;gt;&lt;br /&gt;            &amp;lt;param-name&amp;gt;com.sun.jersey.config.property.packages&amp;lt;/param-name&amp;gt;&lt;br /&gt;            &amp;lt;param-value&amp;gt;webservice&amp;lt;/param-value&amp;gt;&lt;br /&gt;        &amp;lt;/init-param&amp;gt;&lt;br /&gt;        &amp;lt;init-param&amp;gt;&lt;br /&gt;            &amp;lt;param-name&amp;gt;com.sun.jersey.api.json.POJOMappingFeature&amp;lt;/param-name&amp;gt;&lt;br /&gt;            &amp;lt;param-value&amp;gt;true&amp;lt;/param-value&amp;gt;&lt;br /&gt;        &amp;lt;/init-param&amp;gt;&lt;br /&gt;        &amp;lt;!--load-on-startup&amp;gt;1&amp;lt;/load-on-startup--&amp;gt;&lt;br /&gt;    &amp;lt;/servlet&amp;gt;&lt;br /&gt;    &amp;lt;servlet-mapping&amp;gt;&lt;br /&gt;        &amp;lt;servlet-name&amp;gt;jersey&amp;lt;/servlet-name&amp;gt;&lt;br /&gt;        &amp;lt;url-pattern&amp;gt;/jersey/*&amp;lt;/url-pattern&amp;gt;&lt;br /&gt;    &amp;lt;/servlet-mapping&amp;gt;&lt;br /&gt;    &amp;lt;ejb-local-ref&amp;gt;&lt;br /&gt;        &amp;lt;ejb-ref-name&amp;gt;ejb/SessionEJBBean&amp;lt;/ejb-ref-name&amp;gt;&lt;br /&gt;        &amp;lt;ejb-ref-type&amp;gt;Session&amp;lt;/ejb-ref-type&amp;gt;&lt;br /&gt;        &amp;lt;local&amp;gt;model.SessionEJBLocal&amp;lt;/local&amp;gt;&lt;br /&gt;        &amp;lt;ejb-link&amp;gt;SessionEJB&amp;lt;/ejb-link&amp;gt;&lt;br /&gt;    &amp;lt;/ejb-local-ref&amp;gt;&lt;br /&gt;&amp;lt;/web-app&amp;gt;&lt;/code&gt;&lt;/pre&gt;Points to be noticed from the above xml code are :&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;param-value under com.sun.jersey.config.property.packages tag - change the package name by your own package name&amp;nbsp;used in the application.&lt;/li&gt;&lt;li&gt;Add the Ejb References&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;Open the EJBRestService.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 280px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;@Path("EJBRESTService")&lt;br /&gt;public class EJBRestService {&lt;br /&gt;    public EJBRestService() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @GET&lt;br /&gt;    @Produces(MediaType.APPLICATION_XML)&lt;br /&gt;    public List&lt;departments&gt; getAllDepts() {&lt;br /&gt;        List&lt;departments&gt; list = new ArrayList&lt;departments&gt;();&lt;br /&gt;        try {&lt;br /&gt;            Context ic = getInitialContext();&lt;br /&gt;            SessionEJBLocal sessionEJB = (SessionEJBLocal)ic.lookup("java:comp/env/ejb/SessionEJBBean");&lt;br /&gt;            for (Departments departments : (List&lt;departments&gt;)sessionEJB.getDepartmentsFindAll()) {&lt;br /&gt;                list.add(departments);&lt;br /&gt;            }&lt;br /&gt;            ic.close();&lt;br /&gt;        } catch (NamingException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        return list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @POST&lt;br /&gt;    @Consumes(MediaType.APPLICATION_XML)&lt;br /&gt;    public void persistDept(Departments departments) {&lt;br /&gt;        try {&lt;br /&gt;            Context ic = getInitialContext();&lt;br /&gt;            SessionEJBLocal sessionEJB = (SessionEJBLocal)ic.lookup("java:comp/env/ejb/SessionEJBBean");&lt;br /&gt;            sessionEJB.persistDepartments(departments);&lt;br /&gt;            ic.close();&lt;br /&gt;        } catch (NamingException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @PUT&lt;br /&gt;    @Consumes(MediaType.APPLICATION_XML)&lt;br /&gt;    public void mergeDept(Departments departments) {&lt;br /&gt;        try {&lt;br /&gt;            Context ic = getInitialContext();&lt;br /&gt;            SessionEJBLocal sessionEJB = (SessionEJBLocal)ic.lookup("java:comp/env/ejb/SessionEJBBean");&lt;br /&gt;            sessionEJB.mergeDepartments(departments);&lt;br /&gt;            ic.close();&lt;br /&gt;        } catch (NamingException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    @DELETE&lt;br /&gt;    @Path("{departmentId}")&lt;br /&gt;    public void removeDept(@PathParam("departmentId")&lt;br /&gt;        BigDecimal departmentId) {&lt;br /&gt;        try {&lt;br /&gt;            Context ic = getInitialContext();&lt;br /&gt;            SessionEJBLocal sessionEJB = (SessionEJBLocal)ic.lookup("java:comp/env/ejb/SessionEJBBean");&lt;br /&gt;            Departments departments = new Departments();&lt;br /&gt;            departments.setDepartmentId(departmentId);&lt;br /&gt;            sessionEJB.removeDepartments(departments);&lt;br /&gt;            ic.close();&lt;br /&gt;        } catch (NamingException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    private static Context getInitialContext() throws NamingException {&lt;br /&gt;        InitialContext ic = new InitialContext(); // WebLogic Server 10.x connection details&lt;br /&gt;        return ic;&lt;br /&gt;    }&lt;br /&gt;}&lt;/departments&gt;&lt;/departments&gt;&lt;/departments&gt;&lt;/departments&gt;&lt;/code&gt;&lt;/pre&gt;Now deploy/run the EJBRestService.java client in the Integrated Weblogic Server to test. Once client runs it will provide the&amp;nbsp;Target Application WADL/Target URL in JDeveloper console, click on any link to run the service in HTTP Analyzer. Below screen shows the GET method accessed in HTTP Analyzer with result.&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/-DOJIOPHFnNk/UW_euf8PFTI/AAAAAAAACyM/ay5Nt8krItQ/s1600/result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="308" src="http://4.bp.blogspot.com/-DOJIOPHFnNk/UW_euf8PFTI/AAAAAAAACyM/ay5Nt8krItQ/s640/result.png" width="550" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Note:- &lt;/b&gt;Put and Post method are not working with HTTP Analyzer, you might need to create java client/ADF application to test these methods.&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/04/configuring-ejb-with-restful-web.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-xsGLBGkMtLc/UW_KVUnwB0I/AAAAAAAACx0/41Op4KuhiAk/s72-c/XmlRootElement.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-2624368066191201245</guid><pubDate>Tue, 02 Apr 2013 17:36:00 +0000</pubDate><atom:updated>2013-04-02T10:45:17.017-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Android Emulator</category><category domain='http://www.blogger.com/atom/ns#'>Navigation</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Android</category><category domain='http://www.blogger.com/atom/ns#'>DeviceBackButton</category><title>Sync Device Back Button With ADF Mobile App's Back Button In TaskFlows</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This article is the continuation of my previous article on&amp;nbsp;&lt;a href="http://deepakcs.blogspot.in/2013/03/handling-device-back-button-in-adf.html"&gt;Handling the Device Back button in ADF Mobile Application&lt;/a&gt;. Scenario in this article is to use the&amp;nbsp;device back button to go back to previous page within taskflows,&amp;nbsp;Android device has a back button and our apps should take an advantage of that.&lt;br /&gt;&lt;br /&gt;Thanks for &lt;b&gt;&lt;i&gt;Bryan Laipple&lt;/i&gt;&lt;/b&gt;, in his forum reply he provided the solution on how to programmatically&amp;nbsp;navigate within task flows.&amp;nbsp;Application screen looks like below when it is deployed and run on the Android Device/Emulator.&amp;nbsp;In the below screen Employee list will be displayed.&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/-Cuj4Ok6_qoA/UVrxWWu4ihI/AAAAAAAACxM/DME1NbnaxyY/s1600/EmployeeList.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-Cuj4Ok6_qoA/UVrxWWu4ihI/AAAAAAAACxM/DME1NbnaxyY/s400/EmployeeList.png" width="241" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Clicking on any employee will take you to the selected Employee details page. Notice in the below screen there is no back button provided explicitly, here we can take an&amp;nbsp;advantage of device back button to navigate back to previous page. Now click on the device back button to go back to previous 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/-TyHbaISFeSI/UVrxesntHBI/AAAAAAAACxU/ud7_fsphsxA/s1600/DeviceBackButton.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-TyHbaISFeSI/UVrxesntHBI/AAAAAAAACxU/ud7_fsphsxA/s400/DeviceBackButton.png" width="355" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/HandleDeviceBackButtonInTaskFlow.zip"&gt;download the sample workspace from here&lt;/a&gt;. I have checked in Android Device/Emulator and it's working fine.&lt;br /&gt;&lt;br /&gt;In below section I will not provide all the steps to create the application from&amp;nbsp;scratch,&amp;nbsp;only key ones are shown. Created&amp;nbsp;DeviceBackButtonTaskFlow.xml&amp;nbsp;taskflow in this application looks like 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/-Vd0g1ejMNow/UVsE950e8mI/AAAAAAAACxk/ZdJD4DohzOU/s1600/TaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://1.bp.blogspot.com/-Vd0g1ejMNow/UVsE950e8mI/AAAAAAAACxk/ZdJD4DohzOU/s400/TaskFlow.png" width="400" /&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;b&gt;&lt;i&gt;Programmatically navigate within task flows in two ways: -&lt;/i&gt;&lt;/b&gt;&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;Javascript &lt;/b&gt;-&amp;nbsp;Create Javascript file under the feature and add the below code which catches the event that fires when the user presses the device back button.&amp;nbsp;In Javascript function directly call adf.mf.api.amx.doNavigation(outcome), here outcome is the variable that represents the navigation string corresponding to the control flow case.&lt;/li&gt;&lt;/ul&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 280px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;//This is an event that fires when the user presses the device back button&lt;br /&gt;document.addEventListener("deviceready", onDeviceReady, false);&lt;br /&gt;&lt;br /&gt;function onDeviceReady() {&lt;br /&gt;    document.addEventListener("backbutton", backKeyDown, true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function backKeyDown() {&lt;br /&gt;    //Check the device back button action happened in Employee.amx&lt;br /&gt;    if ($('#EmployeeId').length) {&lt;br /&gt;  //Navigate within taskflows using javascript&lt;br /&gt;  adf.mf.api.amx.doNavigation("backToEmployeeList");&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;b&gt;Java &lt;/b&gt;- Create Javascript file under the feature and add the below code which catches the event that fires when the user presses the device back button.&lt;/li&gt;&lt;/ul&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 450px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;//This is an event that fires when the user presses the device back button&lt;br /&gt;document.addEventListener("deviceready", onDeviceReady, false);&lt;br /&gt;&lt;br /&gt;function onDeviceReady() {&lt;br /&gt;    document.addEventListener("backbutton", backKeyDown, true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function backKeyDown() {&lt;br /&gt;    //Check the device back button action happened in Employee.amx&lt;br /&gt;    if ($('#EmployeeId').length) {&lt;br /&gt;        //Call the java method in managed bean&lt;br /&gt;        adf.mf.api.invokeMethod("mobile.EmployeeManagedBean", "handleNavigation", onInvokeSuccess, onFail);&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function onInvokeSuccess(param) {&lt;br /&gt;    //To do code after success&lt;br /&gt;};&lt;br /&gt;&lt;br /&gt;function onFail() {&lt;br /&gt;    //To do code after failure&lt;br /&gt;};&lt;/code&gt;&lt;/pre&gt;Next create a EmployeeManagedBean class under DeviceBackButtonTaskFlow. Add the below code to navigate within the taskflow. This method will be called from javascript function. &lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 140px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public void handleNavigation() {&lt;br /&gt;        //Code to naviagte within task flows programmatically&lt;br /&gt;        AdfmfContainerUtilities.invokeContainerJavaScriptFunction(AdfmfJavaUtilities.getFeatureName(),&lt;br /&gt;                                                                  "adf.mf.api.amx.doNavigation",&lt;br /&gt;                                                                  new Object[] { "backToEmployeeList" });&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/04/sync-device-back-button-with-adf-mobile.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Cuj4Ok6_qoA/UVrxWWu4ihI/AAAAAAAACxM/DME1NbnaxyY/s72-c/EmployeeList.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-7470989569823506189</guid><pubDate>Tue, 02 Apr 2013 14:46:00 +0000</pubDate><atom:updated>2013-04-02T07:46:38.004-07:00</atom:updated><title>Oracle JDeveloper and Oracle ADF 11g Release 1 (11.1.1.7.0) released</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;span style="background-color: white; font-family: Arial, Helvetica, sans-serif; font-size: 12px; line-height: 16px;"&gt;The 11g Release 1 (11.1.1.7.0) version of JDeveloper and ADF is a minor update release, download &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/downloads/jdeveloper11117-1917330.html"&gt;here&lt;/a&gt;. It contains many bug fixes as well as a few &lt;a href="http://www.oracle.com/technetwork/developer-tools/jdev/index-088099.html"&gt;new features&lt;/a&gt; to enjoy.&lt;/span&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/04/oracle-jdeveloper-and-oracle-adf-11g.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-4098885753614658234</guid><pubDate>Mon, 01 Apr 2013 05:04:00 +0000</pubDate><atom:updated>2013-04-02T09:34:21.460-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Android Emulator</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Android</category><title>Handling the Device Back button in ADF Mobile Application</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;While developing an ADF Mobile application for Android/IOS,&amp;nbsp;you may require to capture the device back button on user click. Here we will add little logic to exit the application once the user clicks on device back button.&lt;br /&gt;&lt;br /&gt;We can directly use the phone gap &lt;a href="http://docs.phonegap.com/en/2.5.0/cordova_events_events.md.html#backbutton"&gt;backbutton&lt;/a&gt; api to override the default back button behaviour, you can register an event listener for the 'backbutton' event. It is no longer necessary to call any other method to over ride the back button behaviour. Now, you only need to register an event listener for 'backbutton'.&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it is deployed and run on the Android  Device/Emulator. Click on the device back button will&amp;nbsp;launch&amp;nbsp;the confirm dialog, user can click OK to exit the&amp;nbsp;application.&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/-_5a6w1yYt3w/UVhowpWafrI/AAAAAAAACww/IBjagOcqHYQ/s1600/DeviceBackButton.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-_5a6w1yYt3w/UVhowpWafrI/AAAAAAAACww/IBjagOcqHYQ/s400/DeviceBackButton.png" width="355" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/HandleDeviceBackButton.zip"&gt;download the sample workspace from here&lt;/a&gt;. I have checked in&amp;nbsp;Android Device/Emulator and it's working fine, not sure in IOS device.&lt;br /&gt;&lt;br /&gt;&lt;b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl. &lt;br /&gt;&lt;br /&gt;Right click on the ViewController project and in New Gallery window, select Web Tier-&amp;gt; HTML -&amp;gt; JavaScript File and name as "index.js". Next locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will launch the new Create ADF Mobile Feature dialog, leave the default values and click ok.&lt;br /&gt;&lt;br /&gt;In the Features table, select the newly created feature "feature1". Under the Features table, click the Content tab, and locate the Content table. Notice that the content item feature1.1 is created by default. Next add a new file by clicking the green plus sign and select ADF Mobile AMX Page, this will launch the new Create ADF Mobile AMX Page dialog, modify the File Name as index.amx.&lt;br /&gt;&lt;br /&gt;Next in Includes section, click the green plus sign and Insert Include the javascript file as shown below.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-RpTg5yqH93E/UVhtCzbUvAI/AAAAAAAACw4/0TVkw0SN6NA/s1600/Javascript.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://3.bp.blogspot.com/-RpTg5yqH93E/UVhtCzbUvAI/AAAAAAAACw4/0TVkw0SN6NA/s400/Javascript.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Open the index.js file and below code catches the event that fires when the user presses the device back button.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 250px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;//This is an event that fires when the user presses the device back button&lt;br /&gt;document.addEventListener("deviceready", onDeviceReady, false);&lt;br /&gt;&lt;br /&gt;function onDeviceReady() {&lt;br /&gt;    document.addEventListener("backbutton", backKeyDown, true);&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;function backKeyDown() {&lt;br /&gt;    var cFirm = confirm("Are you sure you want to exit the application?");&lt;br /&gt;    if (cFirm == true) {&lt;br /&gt;        //Code to exit the application&lt;br /&gt;        navigator.app.exitApp();&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/03/handling-device-back-button-in-adf.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-_5a6w1yYt3w/UVhowpWafrI/AAAAAAAACww/IBjagOcqHYQ/s72-c/DeviceBackButton.png' height='72' width='72'/><thr:total>6</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-6582168591137540316</guid><pubDate>Tue, 26 Mar 2013 07:33:00 +0000</pubDate><atom:updated>2013-04-02T05:05:24.425-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Springboard</category><category domain='http://www.blogger.com/atom/ns#'>Navigation</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><title>ADF Mobile : Display Custom Springboard layout with  3 * 3 matrix</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Scenario here is to display 3 * 3 matrix dynamic table in custom springboard amx page using ApplicationFeatures data control with Features data collection.&lt;br /&gt;&lt;br /&gt;Using amx:tableLayout only we might not be able to get the required structure. We need to use&amp;nbsp;amx:panelGroupLayout with inlineStyle to&amp;nbsp;achieve&amp;nbsp;the above scenario. Credit goes to &lt;b&gt;&lt;i&gt;Matt Cooper&lt;/i&gt;&lt;/b&gt;, I have extracted the idea based on one of his forum reply. Here is the code below.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 300px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;amx:tableLayout id="tl1" shortDesc="features-table" inlineStyle="width:100%;"&amp;gt;&lt;br /&gt;  &amp;lt;amx:rowLayout id="rl1"&amp;gt;&lt;br /&gt; &amp;lt;amx:cellFormat id="cf1" shortDesc="features-column" inlineStyle="width:100%;"&amp;gt;&lt;br /&gt;   &amp;lt;amx:panelGroupLayout id="pgl1" layout="wrap"&amp;gt;&lt;br /&gt;  &amp;lt;amx:iterator var="row" value="#{bindings.features.collectionModel}" id="i1"&amp;gt;&lt;br /&gt;    &amp;lt;amx:panelGroupLayout id="plam2" inlineStyle="width:33%;display:inline-block;" halign="center"&lt;br /&gt;        valign="middle"&amp;gt;&lt;br /&gt;   &amp;lt;amx:tableLayout id="tl2"&amp;gt;&lt;br /&gt;     &amp;lt;amx:rowLayout id="rl2"&amp;gt;&lt;br /&gt;    &amp;lt;amx:cellFormat id="cf2" halign="center" valign="middle"&amp;gt;&lt;br /&gt;      &amp;lt;amx:commandLink id="cl1" actionListener="#{bindings.gotoFeature.execute}"&amp;gt;&lt;br /&gt;     &amp;lt;amx:image id="i2" source="/images/#{row.name}-springboard.png"&lt;br /&gt;          inlineStyle="width:36px;height:36px"/&amp;gt;&lt;br /&gt;     &amp;lt;amx:setPropertyListener from="#{row.id}" to="#{pageFlowScope.FeatureId}" type="action"/&amp;gt;&lt;br /&gt;      &amp;lt;/amx:commandLink&amp;gt;&lt;br /&gt;    &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;     &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;     &amp;lt;amx:rowLayout id="rl3"&amp;gt;&lt;br /&gt;    &amp;lt;amx:cellFormat id="cf3" halign="center" valign="middle"&amp;gt;&lt;br /&gt;      &amp;lt;amx:commandLink id="cl2" actionListener="#{bindings.gotoFeature.execute}"&amp;gt;&lt;br /&gt;     &amp;lt;amx:outputText value="#{row.name}" id="ot2"/&amp;gt;&lt;br /&gt;     &amp;lt;amx:setPropertyListener from="#{row.id}" to="#{pageFlowScope.FeatureId}" type="action"/&amp;gt;&lt;br /&gt;      &amp;lt;/amx:commandLink&amp;gt;&lt;br /&gt;    &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;     &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;   &amp;lt;/amx:tableLayout&amp;gt;&lt;br /&gt;   &amp;lt;amx:spacer id="s2" height="25"/&amp;gt;&lt;br /&gt;    &amp;lt;/amx:panelGroupLayout&amp;gt;&lt;br /&gt;  &amp;lt;/amx:iterator&amp;gt;&lt;br /&gt;   &amp;lt;/amx:panelGroupLayout&amp;gt;&lt;br /&gt; &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;  &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;&amp;lt;/amx:tableLayout&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;i&gt;Notice: - In panelGroupLayout, I have set the width to 33%, since I need 3 columns per row. &amp;nbsp;Adjust the width as desired to fit the number of features Items per row based on our requirements.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it deployed and run on Android Device/Emulator. Click on any image/link will take you to the respective feature tab.&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/-De0W1WuKND8/UVFT5g2SQAI/AAAAAAAACwg/RK4YL1wGTj4/s1600/Springboard.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-De0W1WuKND8/UVFT5g2SQAI/AAAAAAAACwg/RK4YL1wGTj4/s400/Springboard.png" width="267" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/SpringboardDemo.zip"&gt;download the sample workspace from here&lt;/a&gt;. You can get more details on &lt;a href="http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/define_features.htm#CIHGJJGD"&gt;Configuring the custom Springboard and Navigation Bar Behavior&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/03/adf-mobile-display-custom-springboard.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-De0W1WuKND8/UVFT5g2SQAI/AAAAAAAACwg/RK4YL1wGTj4/s72-c/Springboard.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-6468997459083855210</guid><pubDate>Mon, 11 Mar 2013 14:57:00 +0000</pubDate><atom:updated>2013-03-11T07:57:31.767-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>AccessorIterator</category><category domain='http://www.blogger.com/atom/ns#'>Android Emulator</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Android</category><title>Get ADF Mobile Form values in managed bean using Accessor Iterator</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Scenario is how to get the ADF Mobile form values in managed bean programmatically. Accessor Iterator can be used with&amp;nbsp;AdfmfJavaUtilities.getValueExpression() method to get values. &amp;nbsp;getValueExpression method is for expressions that refer to values, this method should perform syntactic validation of the expression.&lt;br /&gt;&lt;br /&gt;Below is one of the way to access from values, here is the code below.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;ValueExpression ve =&lt;br /&gt;            AdfmfJavaUtilities.getValueExpression("#{bindings.editEmployeeIterator.currentRow.dataProvider}",&lt;br /&gt;                                                  Object.class);&lt;br /&gt;        Object obj = ve.getValue(AdfmfJavaUtilities.getAdfELContext());&lt;br /&gt;        Employee empRes = new Employee(); &lt;br /&gt;        if (obj instanceof ConcreteJavaBeanObject) {&lt;br /&gt;            ConcreteJavaBeanObject cjbo = (ConcreteJavaBeanObject)obj;&lt;br /&gt;            empRes = (Employee)cjbo.getInstance();&lt;br /&gt;        }&lt;br /&gt;        System.out.println(empRes.getId());&lt;br /&gt;        System.out.println(empRes.getEmail());&lt;br /&gt;        System.out.println(empRes.getFirstName());&lt;br /&gt;        System.out.println(empRes.getLastName());&lt;/code&gt;&lt;/pre&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/MobileADFForm.zip"&gt;download the sample workspace from here&lt;/a&gt;. Application screen looks like below when it deployed and run on Android Device/Emulator. In first screen Employee list will be displayed, Next click on Add button to navigate for Employee form and looks like 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/-IryPmvboj90/UT3qeKXNtOI/AAAAAAAACwA/wFUxewTVhTY/s1600/AddForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-IryPmvboj90/UT3qeKXNtOI/AAAAAAAACwA/wFUxewTVhTY/s320/AddForm.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on the Save button, check the employee form values by enabling debugger mode as shown below. You can check on how to&amp;nbsp;&lt;a href="https://blogs.oracle.com/shay/entry/debugging_adf_mobile_apps_on"&gt;Debugging ADF Mobile Apps on Android&lt;/a&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/-dv2SCGgjBuY/UT3q3jGtoWI/AAAAAAAACwI/TuJNcqKK14w/s1600/DebuggerData.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="100" src="http://2.bp.blogspot.com/-dv2SCGgjBuY/UT3q3jGtoWI/AAAAAAAACwI/TuJNcqKK14w/s400/DebuggerData.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/03/get-adf-mobile-form-values-in-managed.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-IryPmvboj90/UT3qeKXNtOI/AAAAAAAACwA/wFUxewTVhTY/s72-c/AddForm.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-8792085091100168018</guid><pubDate>Tue, 05 Mar 2013 13:57:00 +0000</pubDate><atom:updated>2013-03-05T06:05:11.175-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>REST WebServices</category><category domain='http://www.blogger.com/atom/ns#'>JSON</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><title>Integrating Open Weather Map in ADF Mobile Application</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I tried&amp;nbsp;implementing&amp;nbsp;demo weather application using JSON-REST. &lt;a href="http://openweathermap.org/"&gt;OpenWeatherMap&lt;/a&gt; is a web service that provides free weather data and forecast API suitable for any cartographic services including web and smartphones applications. Ideology is inspired by OpenStreetMap and Wikipedia that make information free and available for everybody. OpenWeatherMap wide range of weather data - map with current weather, week forecast, precipitation, wind, clouds, data from weather stations, data from radars. Weather data is&amp;nbsp;received&amp;nbsp;from global&amp;nbsp;meteorological&amp;nbsp;broadcast services and more than 40000 weather stations, OpenWeatherMap provides response data as JSON string.&lt;br /&gt;&lt;br /&gt;Few articles on JSON-REST - &lt;a href="http://biemond.blogspot.in/2012/10/using-json-rest-in-adf-mobile.html"&gt;Using JSON-REST in ADF Mobile&lt;/a&gt;,&amp;nbsp;&lt;a href="https://blogs.oracle.com/mobile/entry/adf_mobile_rest_json_xml"&gt; ADF Mobile REST JSON/XML&lt;/a&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;Application screen looks like below when it deployed and run on Android Device/Emulator. Displays the blank screen. Click on the Add button to added the cities.&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/-j-bQXXTUH9o/UTV5j5rFxiI/AAAAAAAACss/z2NYIA8ldsU/s1600/BlankScreen.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-j-bQXXTUH9o/UTV5j5rFxiI/AAAAAAAACss/z2NYIA8ldsU/s400/BlankScreen.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Enter and search the city name which you want to see weather information, this will internally call the Open Weather api to get the information about the city and also similar cities will be displayed as list items like shown in below screen. Now click on the City which you want to add it for the main screen, this will save the city details to the local SQLite database. You can add multiple cities to the main screen.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&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/-3fyox--klyY/UTV5tIao94I/AAAAAAAACs0/Ssq-_YBBlhI/s1600/Add.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-3fyox--klyY/UTV5tIao94I/AAAAAAAACs0/Ssq-_YBBlhI/s400/Add.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;Weather information for added Cities with current date will be displayed, now clicking on the city name will display weather forecast screen.&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/-cDVtXHdIfzA/UTV5yaYCYLI/AAAAAAAACs8/iGNNHwVku4Q/s1600/OpenWeather.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-cDVtXHdIfzA/UTV5yaYCYLI/AAAAAAAACs8/iGNNHwVku4Q/s400/OpenWeather.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In Forecast screen, next 7 days weather forecast information will be displayed for the selected city.&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://2.bp.blogspot.com/-E-nZCQJl5FI/UTV-EHwk9JI/AAAAAAAACtU/dAWXrEXqMdI/s1600/Forecast.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-E-nZCQJl5FI/UTV-EHwk9JI/AAAAAAAACtU/dAWXrEXqMdI/s400/Forecast.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/OpenWeather.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl.&lt;br /&gt;&lt;br /&gt;In ViewController project, create the connections for the below &lt;a href="http://openweathermap.org/wiki/API/JSON_API"&gt;OpenWeatherMap API&lt;/a&gt;.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;http://api.openweathermap.org/data/2.1/find/name - Find city via its name, the inquiry retunes list of cities that match search substring.&lt;/li&gt;&lt;li&gt;http://api.openweathermap.org/data/2.1/weather/city - Gets current weather in concrete chosen city&lt;/li&gt;&lt;li&gt;http://api.openweathermap.org/data/2.2/forecast/city - Gets Weather forecast in the city for the next 7 days.&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;To create connections go to File-&amp;gt;New-&amp;gt;Connections-&amp;gt;Url Connection and name the connections mentioned in below connections.xml.&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;?xml version = '1.0' encoding = 'UTF-8'?&amp;gt;&lt;br /&gt;&amp;lt;References xmlns="http://xmlns.oracle.com/adf/jndi"&amp;gt;&lt;br /&gt;   &amp;lt;Reference name="OpenWeatherSearchCities" className="oracle.adf.model.connection.url.HttpURLConnection" xmlns=""&amp;gt;&lt;br /&gt;      &amp;lt;Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/&amp;gt;&lt;br /&gt;      &amp;lt;RefAddresses&amp;gt;&lt;br /&gt;         &amp;lt;XmlRefAddr addrType="OpenWeatherSearchCities"&amp;gt;&lt;br /&gt;            &amp;lt;Contents&amp;gt;&lt;br /&gt;               &amp;lt;urlconnection name="OpenWeatherSearchCities" url="http://api.openweathermap.org/data/2.1/find/name"/&amp;gt;&lt;br /&gt;            &amp;lt;/Contents&amp;gt;&lt;br /&gt;         &amp;lt;/XmlRefAddr&amp;gt;&lt;br /&gt;      &amp;lt;/RefAddresses&amp;gt;&lt;br /&gt;   &amp;lt;/Reference&amp;gt;&lt;br /&gt;   &amp;lt;Reference name="OpenWeatherCurrentCityDetails" className="oracle.adf.model.connection.url.HttpURLConnection" xmlns=""&amp;gt;&lt;br /&gt;      &amp;lt;Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/&amp;gt;&lt;br /&gt;      &amp;lt;RefAddresses&amp;gt;&lt;br /&gt;         &amp;lt;XmlRefAddr addrType="OpenWeatherCurrentCityDetails"&amp;gt;&lt;br /&gt;            &amp;lt;Contents&amp;gt;&lt;br /&gt;               &amp;lt;urlconnection name="OpenWeatherCurrentCityDetails" url="http://api.openweathermap.org/data/2.1/weather/city"/&amp;gt;&lt;br /&gt;            &amp;lt;/Contents&amp;gt;&lt;br /&gt;         &amp;lt;/XmlRefAddr&amp;gt;&lt;br /&gt;      &amp;lt;/RefAddresses&amp;gt;&lt;br /&gt;   &amp;lt;/Reference&amp;gt;&lt;br /&gt;   &amp;lt;Reference name="OpenWeatherForecast" className="oracle.adf.model.connection.url.HttpURLConnection" xmlns=""&amp;gt;&lt;br /&gt;      &amp;lt;Factory className="oracle.adf.model.connection.url.URLConnectionFactory"/&amp;gt;&lt;br /&gt;      &amp;lt;RefAddresses&amp;gt;&lt;br /&gt;         &amp;lt;XmlRefAddr addrType="OpenWeatherForecast"&amp;gt;&lt;br /&gt;            &amp;lt;Contents&amp;gt;&lt;br /&gt;               &amp;lt;urlconnection name="OpenWeatherForecast" url="http://api.openweathermap.org/data/2.2/forecast/city"/&amp;gt;&lt;br /&gt;            &amp;lt;/Contents&amp;gt;&lt;br /&gt;         &amp;lt;/XmlRefAddr&amp;gt;&lt;br /&gt;      &amp;lt;/RefAddresses&amp;gt;&lt;br /&gt;   &amp;lt;/Reference&amp;gt;&lt;br /&gt;&amp;lt;/References&amp;gt;&lt;/code&gt;&lt;/pre&gt;In Application Controller project. Create a DBConnectionFactory.java class and this class contains code for connecting to SQLlite DB. Connecting to the SQLite database is somewhat different from opening a connection to an Oracle database. Please read the &lt;a href="http://deepakcs.blogspot.in/2013/01/adf-mobile-access-device-native-sqlite.html"&gt;Access Device Native SQLite Database to Store Data&lt;/a&gt; article to know detailed steps for implementing SQLite. &lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note:- Weather.sql file should be put in .adf/META-INF/ folder. You can get the sql file by downloading the &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/OpenWeather.zip"&gt;OpenWeather&lt;/a&gt; application.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In ViewController project, locate and expand the Application Sources folder, create a CityCurrentDetails.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CityCurrentDetails extends City {&lt;br /&gt;    private double temp;&lt;br /&gt;    private double pressure;&lt;br /&gt;    private double tempMin;&lt;br /&gt;    private double tempMax;&lt;br /&gt;    private double wind;&lt;br /&gt;    private int clouds;&lt;br /&gt;    private String description;&lt;br /&gt;    private String icon;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public CityCurrentDetails() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public CityCurrentDetails(double temp, double pressure, double tempMin, double tempMax, double wind, int clouds,&lt;br /&gt;                              String description, String icon, int id, String name, String country, double lat,&lt;br /&gt;                              double lon) {&lt;br /&gt;        super();&lt;br /&gt;        this.temp = temp;&lt;br /&gt;        this.pressure = pressure;&lt;br /&gt;        this.tempMin = tempMin;&lt;br /&gt;        this.tempMax = tempMax;&lt;br /&gt;        this.wind = wind;&lt;br /&gt;        this.clouds = clouds;&lt;br /&gt;        this.description = description;&lt;br /&gt;        this.icon = icon;&lt;br /&gt;        this.setId(id);&lt;br /&gt;        this.setName(name);&lt;br /&gt;        this.setCountry(country);&lt;br /&gt;        this.setLat(lat);&lt;br /&gt;        this.setLon(lon);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setTemp(double temp) {&lt;br /&gt;        double oldTemp = this.temp;&lt;br /&gt;        this.temp = temp;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("temp", oldTemp, temp);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getTemp() {&lt;br /&gt;        return temp;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setPressure(double pressure) {&lt;br /&gt;        double oldPressure = this.pressure;&lt;br /&gt;        this.pressure = pressure;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("pressure", oldPressure, pressure);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getPressure() {&lt;br /&gt;        return pressure;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setTempMin(double tempMin) {&lt;br /&gt;        double oldTempMin = this.tempMin;&lt;br /&gt;        this.tempMin = tempMin;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("tempMin", oldTempMin, tempMin);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getTempMin() {&lt;br /&gt;        return tempMin;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setTempMax(double tempMax) {&lt;br /&gt;        double oldTempMax = this.tempMax;&lt;br /&gt;        this.tempMax = tempMax;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("tempMax", oldTempMax, tempMax);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getTempMax() {&lt;br /&gt;        return tempMax;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setWind(double wind) {&lt;br /&gt;        double oldWind = this.wind;&lt;br /&gt;        this.wind = wind;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("wind", oldWind, wind);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getWind() {&lt;br /&gt;        return wind;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setClouds(int clouds) {&lt;br /&gt;        int oldClouds = this.clouds;&lt;br /&gt;        this.clouds = clouds;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("clouds", oldClouds, clouds);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getClouds() {&lt;br /&gt;        return clouds;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDescription(String description) {&lt;br /&gt;        String oldDescription = this.description;&lt;br /&gt;        this.description = description;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("description", oldDescription, description);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDescription() {&lt;br /&gt;        return description;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setIcon(String icon) {&lt;br /&gt;        String oldIcon = this.icon;&lt;br /&gt;        this.icon = icon;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("icon", oldIcon, icon);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getIcon() {&lt;br /&gt;        return icon;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create CityCurrentDetailsDC.java file and add the below code, create DataControl based on CityCurrentDetailsDC.java file.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CityCurrentDetailsDC {&lt;br /&gt;    private static List s_cityCurrentDetails = null;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public CityCurrentDetailsDC() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * This method will read the record from the db and &lt;br /&gt;     * Gets current weather for all the cities listed&lt;br /&gt;     * @return CityCurrentDetails[] list&lt;br /&gt;     */&lt;br /&gt;    public CityCurrentDetails[] fetchCityCurrentDetails() {&lt;br /&gt;        s_cityCurrentDetails = new ArrayList();&lt;br /&gt;        try {&lt;br /&gt;            Connection conn = DBConnectionFactory.getConnection();&lt;br /&gt;            s_cityCurrentDetails.clear();&lt;br /&gt;            conn.setAutoCommit(false);&lt;br /&gt;&lt;br /&gt;            PreparedStatement pStmt = conn.prepareStatement("SELECT * FROM CITY");&lt;br /&gt;            ResultSet rs = pStmt.executeQuery();&lt;br /&gt;            while (rs.next()) {&lt;br /&gt;                if (rs.getInt("ID") != 0) {&lt;br /&gt;&lt;br /&gt;                    RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();&lt;br /&gt;                    // Clear any previously set request properties, if any&lt;br /&gt;                    restServiceAdapter.clearRequestProperties();&lt;br /&gt;                    // Set the connection name&lt;br /&gt;                    restServiceAdapter.setConnectionName("OpenWeatherCurrentCityDetails");&lt;br /&gt;                    // Specify the type of request&lt;br /&gt;                    restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);&lt;br /&gt;                    restServiceAdapter.addRequestProperty("Content-Type", "application/json");&lt;br /&gt;                    restServiceAdapter.addRequestProperty("Accept", "application/json; charset=UTF-8");&lt;br /&gt;                    // Specify the number of retries&lt;br /&gt;                    restServiceAdapter.setRetryLimit(0);&lt;br /&gt;                    // Set the URI which is defined after the endpoint in the connections.xml.&lt;br /&gt;                    // The request is the endpoint + the URI being set&lt;br /&gt;                    restServiceAdapter.setRequestURI("/" + rs.getInt("ID") + "?units=metric");&lt;br /&gt;                    String response = "not found";&lt;br /&gt;                    JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper();&lt;br /&gt;&lt;br /&gt;                    response = restServiceAdapter.send("");&lt;br /&gt;                    CurrentDetailsServiceResponse serviceResponse =&lt;br /&gt;                        (CurrentDetailsServiceResponse)jsonHelper.fromJSON(CurrentDetailsServiceResponse.class,&lt;br /&gt;                                                                           response);&lt;br /&gt;&lt;br /&gt;                    CityCurrentDetails cityCurDetails = new CityCurrentDetails();&lt;br /&gt;                    cityCurDetails.setId(rs.getInt("ID"));&lt;br /&gt;                    cityCurDetails.setName(rs.getString("NAME"));&lt;br /&gt;                    cityCurDetails.setCountry(rs.getString("COUNTRY"));&lt;br /&gt;                    cityCurDetails.setLat(rs.getDouble("LAT"));&lt;br /&gt;                    cityCurDetails.setLon(rs.getDouble("LON"));&lt;br /&gt;&lt;br /&gt;                    JSONObject cloudsObj = (JSONObject)serviceResponse.getClouds();&lt;br /&gt;                    cityCurDetails.setClouds(cloudsObj.getInt("all"));&lt;br /&gt;&lt;br /&gt;                    JSONObject mainObj = (JSONObject)serviceResponse.getMain();&lt;br /&gt;                    DecimalFormat mainDecimalFormat = new DecimalFormat("###.#");&lt;br /&gt;                    String temp = mainDecimalFormat.format(mainObj.getDouble("temp"));&lt;br /&gt;                    cityCurDetails.setTemp(Double.valueOf(temp).doubleValue());&lt;br /&gt;                    String tempMax = mainDecimalFormat.format(mainObj.getDouble("temp_max"));&lt;br /&gt;                    cityCurDetails.setTempMax(Double.valueOf(tempMax).doubleValue());&lt;br /&gt;                    String tempMin = mainDecimalFormat.format(mainObj.getDouble("temp_min"));&lt;br /&gt;                    cityCurDetails.setTempMin(Double.valueOf(tempMin).doubleValue());&lt;br /&gt;                    cityCurDetails.setPressure(mainObj.getDouble("pressure"));&lt;br /&gt;                    // double humidity = mainObj.getDouble("humidity");&lt;br /&gt;&lt;br /&gt;                    JSONObject windObj = (JSONObject)serviceResponse.getWind();&lt;br /&gt;                    cityCurDetails.setWind(windObj.getDouble("speed"));&lt;br /&gt;&lt;br /&gt;                    JSONArray weatherRes = (JSONArray)serviceResponse.getWeather();&lt;br /&gt;                    for (int m = 0; m &amp;lt; weatherRes.length(); m++) {&lt;br /&gt;                        JSONObject weatherObj = (JSONObject)weatherRes.getJSONObject(m);&lt;br /&gt;                        cityCurDetails.setDescription(weatherObj.getString("description"));&lt;br /&gt;                        cityCurDetails.setIcon(weatherObj.getString("icon"));&lt;br /&gt;                    }&lt;br /&gt;                    s_cityCurrentDetails.add(cityCurDetails);&lt;br /&gt;&lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        CityCurrentDetails c[] = null;&lt;br /&gt;        c = (CityCurrentDetails[])s_cityCurrentDetails.toArray(new CityCurrentDetails[s_cityCurrentDetails.size()]);&lt;br /&gt;        return c;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;The "OpenWeatherCurrentCityDetails" api will provide JSON response and structure will be as shown 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/-4w3820CRxcw/UTWL7zoX2XI/AAAAAAAACto/mcOwPeWN68s/s1600/CityCurrentDetails.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-4w3820CRxcw/UTWL7zoX2XI/AAAAAAAACto/mcOwPeWN68s/s400/CityCurrentDetails.png" width="222" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next step is important because we need do JSON deserialization, here we will use RestServiceAdapter and JSONBeanSerializationHelper classes. The RestServiceAdapter will handle the Rest Service and JSONBeanSerializationHelper helps us converting JSON to Java, for ex:- &lt;br /&gt;CurrentDetailsServiceResponse  serviceResponse  =(CurrentDetailsServiceResponse)jsonHelper.fromJSON(CurrentDetailsServiceResponse.class,  response);&lt;br /&gt;&lt;br /&gt;Create CurrentDetailsServiceResponse.java file and add the below code. Make sure to use the proper data types. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CurrentDetailsServiceResponse {&lt;br /&gt;    private int id;&lt;br /&gt;    private JSONObject coord;&lt;br /&gt;    private String name;&lt;br /&gt;    private JSONObject main;&lt;br /&gt;    private String dt;&lt;br /&gt;    private JSONObject wind;&lt;br /&gt;    private JSONObject clouds;&lt;br /&gt;    private JSONArray weather;&lt;br /&gt;    private JSONObject sys;&lt;br /&gt;&lt;br /&gt;    public CurrentDetailsServiceResponse() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setId(int id) {&lt;br /&gt;        this.id = id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getId() {&lt;br /&gt;        return id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCoord(JSONObject coord) {&lt;br /&gt;        this.coord = coord;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONObject getCoord() {&lt;br /&gt;        return coord;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setName(String name) {&lt;br /&gt;        this.name = name;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getName() {&lt;br /&gt;        return name;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setMain(JSONObject main) {&lt;br /&gt;        this.main = main;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONObject getMain() {&lt;br /&gt;        return main;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDt(String dt) {&lt;br /&gt;        this.dt = dt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDt() {&lt;br /&gt;        return dt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setWind(JSONObject wind) {&lt;br /&gt;        this.wind = wind;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONObject getWind() {&lt;br /&gt;        return wind;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setClouds(JSONObject clouds) {&lt;br /&gt;        this.clouds = clouds;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONObject getClouds() {&lt;br /&gt;        return clouds;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setWeather(JSONArray weather) {&lt;br /&gt;        this.weather = weather;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONArray getWeather() {&lt;br /&gt;        return weather;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setSys(JSONObject sys) {&lt;br /&gt;        this.sys = sys;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONObject getSys() {&lt;br /&gt;        return sys;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Next create a City.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class City {&lt;br /&gt;    private int id;&lt;br /&gt;    private String name;&lt;br /&gt;    private String country;&lt;br /&gt;    private double lat;&lt;br /&gt;    private double lon;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public City() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public City(int id, String name, String country, double lat, double lon) {&lt;br /&gt;        super();&lt;br /&gt;        this.id = id;&lt;br /&gt;        this.name = name;&lt;br /&gt;        this.country = country;&lt;br /&gt;        this.lat = lat;&lt;br /&gt;        this.lon = lon;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getKey() {&lt;br /&gt;        Integer i = new Integer(id);&lt;br /&gt;        return i.toString();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setId(int id) {&lt;br /&gt;        int oldId = this.id;&lt;br /&gt;        this.id = id;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("id", oldId, id);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getId() {&lt;br /&gt;        return id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setName(String name) {&lt;br /&gt;        String oldName = this.name;&lt;br /&gt;        this.name = name;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("name", oldName, name);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getName() {&lt;br /&gt;        return name;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCountry(String country) {&lt;br /&gt;        String oldCountry = this.country;&lt;br /&gt;        this.country = country;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("country", oldCountry, country);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getCountry() {&lt;br /&gt;        return country;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLat(double lat) {&lt;br /&gt;        double oldLat = this.lat;&lt;br /&gt;        this.lat = lat;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("lat", oldLat, lat);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getLat() {&lt;br /&gt;        return lat;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLon(double lon) {&lt;br /&gt;        double oldLon = this.lon;&lt;br /&gt;        this.lon = lon;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("lon", oldLon, lon);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getLon() {&lt;br /&gt;        return lon;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create CityDC.java file and add the below code, create DataControl based on CityDC.java file.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CityDC {&lt;br /&gt;    private static List s_city = null;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public CityDC() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Find city via its name, the inquiry retunes list of cities that match search substring.&lt;br /&gt;     * @param queryString&lt;br /&gt;     * @return City[] list&lt;br /&gt;     */&lt;br /&gt;    public City[] searchCities(String queryString) {&lt;br /&gt;        s_city = new ArrayList();&lt;br /&gt;        if (queryString != "" || queryString.length() &amp;gt; 0) {&lt;br /&gt;            RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();&lt;br /&gt;            // Clear any previously set request properties, if any&lt;br /&gt;            restServiceAdapter.clearRequestProperties();&lt;br /&gt;            // Set the connection name&lt;br /&gt;            restServiceAdapter.setConnectionName("OpenWeatherSearchCities");&lt;br /&gt;            // Specify the type of request&lt;br /&gt;            restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);&lt;br /&gt;            restServiceAdapter.addRequestProperty("Content-Type", "application/json");&lt;br /&gt;            restServiceAdapter.addRequestProperty("Accept", "application/json; charset=UTF-8");&lt;br /&gt;            // Specify the number of retries&lt;br /&gt;            restServiceAdapter.setRetryLimit(0);&lt;br /&gt;            // Set the URI which is defined after the endpoint in the connections.xml.&lt;br /&gt;            // The request is the endpoint + the URI being set&lt;br /&gt;            restServiceAdapter.setRequestURI("?q=" + queryString);&lt;br /&gt;            String response = "not found";&lt;br /&gt;            JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper();&lt;br /&gt;&lt;br /&gt;            try {&lt;br /&gt;                // For GET request, there is no payload&lt;br /&gt;                response = restServiceAdapter.send("");&lt;br /&gt;                CityServiceResponse serviceResponse =&lt;br /&gt;                    (CityServiceResponse)jsonHelper.fromJSON(CityServiceResponse.class, response);&lt;br /&gt;                JSONArray listRes = (JSONArray)serviceResponse.getList();&lt;br /&gt;                s_city = new ArrayList();&lt;br /&gt;                for (int m = 0; m &amp;lt; listRes.length(); m++) {&lt;br /&gt;                    JSONObject listObj = (JSONObject)listRes.getJSONObject(m);&lt;br /&gt;                    int id = listObj.getInt("id");&lt;br /&gt;                    String name = listObj.getString("name");&lt;br /&gt;&lt;br /&gt;                    JSONObject coordObj = listObj.getJSONObject("coord");&lt;br /&gt;                    double lat = coordObj.getDouble("lat");&lt;br /&gt;                    double lon = coordObj.getDouble("lon");&lt;br /&gt;&lt;br /&gt;                    JSONObject sysObj = listObj.getJSONObject("sys");&lt;br /&gt;                    String county = sysObj.getString("country");&lt;br /&gt;                    s_city.add(new City(id, name, county, lat, lon));&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            } catch (Exception e) {&lt;br /&gt;                e.printStackTrace();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        City c[] = null;&lt;br /&gt;        c = (City[])s_city.toArray(new City[s_city.size()]);&lt;br /&gt;        return c;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will commit the details of newly created city object&lt;br /&gt;     * @return&lt;br /&gt;     */&lt;br /&gt;    public boolean AddCityToDB(int id, String name, String country, double lat, double lon) {&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, City.class, "AddCityToDB", "Coming inside AddCityToDB");&lt;br /&gt;        boolean result = false;&lt;br /&gt;        try {&lt;br /&gt;            Connection conn = DBConnectionFactory.getConnection();&lt;br /&gt;            conn.setAutoCommit(false);&lt;br /&gt;            String insertSQL = "Insert into CITY (ID,NAME,COUNTRY,LAT,LON) values (?,?,?,?,?)";&lt;br /&gt;            PreparedStatement pStmt = conn.prepareStatement(insertSQL);&lt;br /&gt;            pStmt.setInt(1, id);&lt;br /&gt;            pStmt.setString(2, name);&lt;br /&gt;            pStmt.setString(3, country);&lt;br /&gt;            pStmt.setDouble(4, lat);&lt;br /&gt;            pStmt.setDouble(5, lon);&lt;br /&gt;            pStmt.execute();&lt;br /&gt;            conn.commit();&lt;br /&gt;            result = true;&lt;br /&gt;        } catch (SQLException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, City.class, "AddCityToDB", "Exiting AddCityToDB");&lt;br /&gt;        return result;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;The "OpenWeatherSearchCities" api will provide JSON response and structure will be as shown below.&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/-QjKeY9ZHAQw/UTWVnWprOxI/AAAAAAAACuA/STyGQYX0F-I/s1600/CityServiceResponse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="376" src="http://4.bp.blogspot.com/-QjKeY9ZHAQw/UTWVnWprOxI/AAAAAAAACuA/STyGQYX0F-I/s400/CityServiceResponse.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;Create a CityServiceResponse.java file to convert JSON response to java object.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CityServiceResponse {&lt;br /&gt;    private int cod;&lt;br /&gt;    private JSONArray list;&lt;br /&gt;    private String units;&lt;br /&gt;&lt;br /&gt;    public CityServiceResponse() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCod(int cod) {&lt;br /&gt;        this.cod = cod;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getCod() {&lt;br /&gt;        return cod;&lt;br /&gt;    }&lt;br /&gt;    &lt;br /&gt;    public void setList(JSONArray list) {&lt;br /&gt;        this.list = list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONArray getList() {&lt;br /&gt;        return list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setUnits(String units) {&lt;br /&gt;        this.units = units;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getUnits() {&lt;br /&gt;        return units;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Next create a Forecast.java file and add the below code. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Forecast {&lt;br /&gt;    private String dt;&lt;br /&gt;    private double temp;&lt;br /&gt;    private double night;&lt;br /&gt;    private double eve;&lt;br /&gt;    private double morn;&lt;br /&gt;    private double pressure;&lt;br /&gt;    private double humidity;&lt;br /&gt;    private double speed;&lt;br /&gt;    private String description;&lt;br /&gt;    private String icon;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public Forecast(String dt, double temp, double night, double eve, double morn, double pressure, double humidity,&lt;br /&gt;                    double speed, String description, String icon) {&lt;br /&gt;        super();&lt;br /&gt;        this.dt = dt;&lt;br /&gt;        this.temp = temp;&lt;br /&gt;        this.night = night;&lt;br /&gt;        this.eve = eve;&lt;br /&gt;        this.morn = morn;&lt;br /&gt;        this.pressure = pressure;&lt;br /&gt;        this.humidity = humidity;&lt;br /&gt;        this.speed = speed;&lt;br /&gt;        this.description = description;&lt;br /&gt;        this.icon = icon;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Forecast() {&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDt(String dt) {&lt;br /&gt;        String oldDt = this.dt;&lt;br /&gt;        this.dt = dt;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("dt", oldDt, dt);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDt() {&lt;br /&gt;        return dt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setTemp(double temp) {&lt;br /&gt;        double oldTemp = this.temp;&lt;br /&gt;        this.temp = temp;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("temp", oldTemp, temp);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getTemp() {&lt;br /&gt;        return temp;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setNight(double night) {&lt;br /&gt;        double oldNight = this.night;&lt;br /&gt;        this.night = night;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("night", oldNight, night);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getNight() {&lt;br /&gt;        return night;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setEve(double eve) {&lt;br /&gt;        double oldEve = this.eve;&lt;br /&gt;        this.eve = eve;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("eve", oldEve, eve);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getEve() {&lt;br /&gt;        return eve;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setMorn(double morn) {&lt;br /&gt;        double oldMorn = this.morn;&lt;br /&gt;        this.morn = morn;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("morn", oldMorn, morn);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getMorn() {&lt;br /&gt;        return morn;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setPressure(double pressure) {&lt;br /&gt;        double oldPressure = this.pressure;&lt;br /&gt;        this.pressure = pressure;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("pressure", oldPressure, pressure);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getPressure() {&lt;br /&gt;        return pressure;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setHumidity(double humidity) {&lt;br /&gt;        double oldHumidity = this.humidity;&lt;br /&gt;        this.humidity = humidity;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("humidity", oldHumidity, humidity);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getHumidity() {&lt;br /&gt;        return humidity;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public void setDescription(String description) {&lt;br /&gt;        String oldDescription = this.description;&lt;br /&gt;        this.description = description;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("description", oldDescription, description);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDescription() {&lt;br /&gt;        return description;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setIcon(String icon) {&lt;br /&gt;        String oldIcon = this.icon;&lt;br /&gt;        this.icon = icon;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("icon", oldIcon, icon);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getIcon() {&lt;br /&gt;        return icon;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setSpeed(double speed) {&lt;br /&gt;        double oldSpeed = this.speed;&lt;br /&gt;        this.speed = speed;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("speed", oldSpeed, speed);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public double getSpeed() {&lt;br /&gt;        return speed;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create ForecastDC.java file and add the below code, create DataControl based on ForecastDC.java file. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class ForecastDC {&lt;br /&gt;    private static List s_forecast = null;&lt;br /&gt;&lt;br /&gt;    public ForecastDC() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Gets Weather forecast in the city for the next 7 days &lt;br /&gt;     * @param cityId&lt;br /&gt;     * @return Forecast[] list&lt;br /&gt;     */&lt;br /&gt;    public Forecast[] searchCities(int cityId) {&lt;br /&gt;        RestServiceAdapter restServiceAdapter = Model.createRestServiceAdapter();&lt;br /&gt;        // Clear any previously set request properties, if any&lt;br /&gt;        restServiceAdapter.clearRequestProperties();&lt;br /&gt;        // Set the connection name&lt;br /&gt;        restServiceAdapter.setConnectionName("OpenWeatherForecast");&lt;br /&gt;        // Specify the type of request&lt;br /&gt;        restServiceAdapter.setRequestType(RestServiceAdapter.REQUEST_TYPE_GET);&lt;br /&gt;        restServiceAdapter.addRequestProperty("Content-Type", "application/json");&lt;br /&gt;        restServiceAdapter.addRequestProperty("Accept", "application/json; charset=UTF-8");&lt;br /&gt;        // Specify the number of retries&lt;br /&gt;        restServiceAdapter.setRetryLimit(0);&lt;br /&gt;        // Set the URI which is defined after the endpoint in the connections.xml.&lt;br /&gt;        // The request is the endpoint + the URI being set&lt;br /&gt;        restServiceAdapter.setRequestURI("/" + cityId + "?mode=daily_compact&amp;amp;units=metric");&lt;br /&gt;        String response = "not found";&lt;br /&gt;        JSONBeanSerializationHelper jsonHelper = new JSONBeanSerializationHelper();&lt;br /&gt;        try {&lt;br /&gt;            // For GET request, there is no payload&lt;br /&gt;            response = restServiceAdapter.send("");&lt;br /&gt;            ForecastServiceResponse serviceResponse =&lt;br /&gt;                (ForecastServiceResponse)jsonHelper.fromJSON(ForecastServiceResponse.class, response);&lt;br /&gt;            JSONArray listRes = (JSONArray)serviceResponse.getList();&lt;br /&gt;            s_forecast = new ArrayList();&lt;br /&gt;            System.out.println(listRes.length());&lt;br /&gt;            for (int m = 0; m &amp;lt; listRes.length(); m++) {&lt;br /&gt;                JSONObject listObj = (JSONObject)listRes.getJSONObject(m);&lt;br /&gt;                Forecast forecast = new Forecast();&lt;br /&gt;                &lt;br /&gt;                long timeStamp = listObj.getInt("dt");&lt;br /&gt;                Calendar mydate = Calendar.getInstance();&lt;br /&gt;                mydate.setTimeInMillis(timeStamp * 1000);&lt;br /&gt;                &lt;br /&gt;                SimpleDateFormat dateFormat = new SimpleDateFormat("E dd");&lt;br /&gt;                dateFormat.setCalendar(mydate);&lt;br /&gt;                String dateVal = dateFormat.format(mydate.getTime());&lt;br /&gt;                forecast.setDt(dateVal);&lt;br /&gt;                &lt;br /&gt;                forecast.setTemp(listObj.getDouble("temp"));&lt;br /&gt;                forecast.setEve(listObj.getDouble("eve"));&lt;br /&gt;                forecast.setMorn(listObj.getDouble("morn"));&lt;br /&gt;                forecast.setNight(listObj.getDouble("night"));&lt;br /&gt;                forecast.setHumidity(listObj.getDouble("humidity"));&lt;br /&gt;                forecast.setPressure(listObj.getDouble("pressure"));&lt;br /&gt;                forecast.setSpeed(listObj.getDouble("speed"));&lt;br /&gt;                forecast.setDescription("coming here");&lt;br /&gt;                JSONArray weatherRes = (JSONArray)listObj.getJSONArray("weather");&lt;br /&gt;                for (int n = 0; n &amp;lt; weatherRes.length(); n++) {&lt;br /&gt;                    JSONObject weatherObj = (JSONObject)weatherRes.getJSONObject(n);&lt;br /&gt;                    forecast.setDescription(weatherObj.getString("description"));&lt;br /&gt;                    forecast.setIcon(weatherObj.getString("icon"));&lt;br /&gt;                }&lt;br /&gt;                s_forecast.add(forecast);&lt;br /&gt;            }&lt;br /&gt;&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;        Forecast f[] = null;&lt;br /&gt;        f = (Forecast[])s_forecast.toArray(new Forecast[s_forecast.size()]);&lt;br /&gt;        return f;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;The "OpenWeatherForecast" api will provide JSON response and structure will be as shown below.&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/-fMvhKKvHWCY/UTWYcyysMXI/AAAAAAAACuQ/tDnl_hXyvoQ/s1600/ForecastServiceResponse.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-fMvhKKvHWCY/UTWYcyysMXI/AAAAAAAACuQ/tDnl_hXyvoQ/s400/ForecastServiceResponse.png" width="268" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Create a ForecastServiceResponse.java file to convert JSON response to java object.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class ForecastServiceResponse {&lt;br /&gt;    private int cnt;&lt;br /&gt;    private JSONArray list;&lt;br /&gt;&lt;br /&gt;    public ForecastServiceResponse() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCnt(int cnt) {&lt;br /&gt;        this.cnt = cnt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getCnt() {&lt;br /&gt;        return cnt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setList(JSONArray list) {&lt;br /&gt;        this.list = list;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public JSONArray getList() {&lt;br /&gt;        return list;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;In ViewController project. Locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will launch the new Create ADF Mobile Feature dialog, modify the values as shown below.&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/-NxWyvps06ok/UTWhyL1IOQI/AAAAAAAACug/4jJs39-UAiw/s1600/WeatherFeature.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="115" src="http://2.bp.blogspot.com/-NxWyvps06ok/UTWhyL1IOQI/AAAAAAAACug/4jJs39-UAiw/s400/WeatherFeature.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Features table, select the newly created feature Email. Under the Features table, click the Content tab, and locate the Content table. Notice that the content item Weather.1 is created by default. Next add a new file by clicking the green plus sign and select taskflow option, this will launch the new Create ADF Mobile Task Flow dialog, modify the value as shown below.&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/-k_49K5HyhKo/UTWiDReQT8I/AAAAAAAACuo/Y_emqN4Sg2g/s1600/WeatherTaskFlow1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://4.bp.blogspot.com/-k_49K5HyhKo/UTWiDReQT8I/AAAAAAAACuo/Y_emqN4Sg2g/s400/WeatherTaskFlow1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on the WeatherTaskflow.xml to open the file in taskflow editor and follow the below steps.&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Create views and name them as DashBoardView, AddCityView and ForeCastView respectively. &lt;/li&gt;&lt;li&gt;Draw the control flow case from DashBoardView to AddCityView and Outcome as "addCity".&lt;/li&gt;&lt;li&gt;Draw the control flow case from AddCityView to DashBoardView and Outcome as "backToDashBoard".&lt;/li&gt;&lt;li&gt;Draw the control flow case from DashBoardView to ForeCastView and Outcome as "foreCast".&lt;/li&gt;&lt;li&gt;Draw the control flow case from ForeCastView to DashBoardView and Outcome as "backToDashBoard".&lt;/li&gt;&lt;/ol&gt;WeatherTaskflow.xml&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/-iAQx38o0glw/UTWjRhgpWcI/AAAAAAAACu0/Zxu-8cpN0yM/s1600/WeatherTaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="245" src="http://2.bp.blogspot.com/-iAQx38o0glw/UTWjRhgpWcI/AAAAAAAACu0/Zxu-8cpN0yM/s400/WeatherTaskFlow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Double click on DashBoardView view will launch Create ADF Mobile AMX Page dialog. Open the DashBoardView.amx page and to source tab and follow the below steps:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;In Header facet, amx:outputText set the value as "Open Weather".&amp;nbsp;&lt;/li&gt;&lt;li&gt;In Primary Action facet, for amx:commandButton modify the values text: Refresh, actionListener: #{bindings.fetchCityCurrentDetails.execute}. &lt;/li&gt;&lt;li&gt;In Secondary Action facet, for amx:commandButton modify the values text: Add, action: addCity. &lt;/li&gt;&lt;li&gt;From DC palette drag and drop CityCurrentDetailsDC-&amp;gt;fetchCityCurrentDetails-&amp;gt;cityCurrentDetails as ADF Mobile List View and select the default options.&lt;/li&gt;&lt;li&gt;Go to bindings Create executable binding-&amp;gt;invoke Action with Id =invokeFetchCityCurrentDetails , Binds = fetchCityCurrentDetails and Refresh = always &lt;/li&gt;&lt;li&gt;Modify the code as shown in below code.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;amx:panelPage id="pp1"&amp;gt;&lt;br /&gt;        &amp;lt;amx:facet name="header"&amp;gt;&lt;br /&gt;            &amp;lt;amx:outputText value="Open Weather" id="ot1"/&amp;gt;&lt;br /&gt;        &amp;lt;/amx:facet&amp;gt;&lt;br /&gt;        &amp;lt;amx:facet name="primary"&amp;gt;&lt;br /&gt;            &amp;lt;amx:commandButton text="Refresh" id="cb2" actionListener="#{bindings.fetchCityCurrentDetails.execute}"/&amp;gt;&lt;br /&gt;        &amp;lt;/amx:facet&amp;gt;&lt;br /&gt;        &amp;lt;amx:facet name="secondary"&amp;gt;&lt;br /&gt;            &amp;lt;amx:commandButton text="Add" id="cb1" action="addCity"/&amp;gt;&lt;br /&gt;        &amp;lt;/amx:facet&amp;gt;&lt;br /&gt;        &amp;lt;amx:listView var="row" value="#{bindings.CityCurrentDetails.collectionModel}"&lt;br /&gt;                      fetchSize="#{bindings.CityCurrentDetails.rangeSize}" id="lv1"&lt;br /&gt;                      styleClass="adfmf-listView-insetList"&amp;gt;&lt;br /&gt;            &amp;lt;amx:listItem id="li1" showLinkIcon="false" shortDesc="Forecast Row" action="foreCast"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setPropertyListener from="#{row.id}" to="#{pageFlowScope.forecastCityId}" type="action"/&amp;gt;&lt;br /&gt;                &amp;lt;amx:setPropertyListener from="#{row.name}" to="#{pageFlowScope.forecastName}" type="action"/&amp;gt;&lt;br /&gt;                &amp;lt;amx:setPropertyListener from="#{row.country}" to="#{pageFlowScope.forecastCountry}" type="action"/&amp;gt;&lt;br /&gt;                &amp;lt;amx:tableLayout id="tl4" width="100%" shortDesc="Forecast Table layout"&amp;gt;&lt;br /&gt;                    &amp;lt;amx:rowLayout id="rl41"&amp;gt;&lt;br /&gt;                        &amp;lt;amx:cellFormat id="cf4i" width="40px" rowSpan="2" halign="center" shortDesc="Image cell"&amp;gt;&lt;br /&gt;                            &amp;lt;amx:image id="imaged1" source="/Images/#{row.icon}.png"&lt;br /&gt;                                       inlineStyle="height:32px;width:32px" shortDesc="Forecast Image"/&amp;gt;&lt;br /&gt;                        &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;                        &amp;lt;amx:cellFormat id="cf41" columnSpan="3" width="100%" height="28px" shortDesc="City name cell"&amp;gt;&lt;br /&gt;                            &amp;lt;amx:outputText id="outputTextd1" value="#{row.name}, #{row.country} - #{row.description}"/&amp;gt;&lt;br /&gt;                        &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;                    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;                    &amp;lt;amx:rowLayout id="rl42"&amp;gt;&lt;br /&gt;                        &amp;lt;amx:cellFormat id="cf43" columnSpan="3" width="100%" height="20px" shortDesc="Temprature cell"&amp;gt;&lt;br /&gt;                            &amp;lt;amx:outputText id="outputTextd3"&lt;br /&gt;                                            value="#{row.temp}°C, temperature from #{row.tempMin}°C to #{row.tempMax}°C"&lt;br /&gt;                                            styleClass="adfmf-listItem-captionText"/&amp;gt;&lt;br /&gt;                        &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;                    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;                    &amp;lt;amx:rowLayout id="rl1"&amp;gt;&lt;br /&gt;                        &amp;lt;amx:cellFormat id="cf2" width="40px" halign="center" shortDesc=""/&amp;gt;&lt;br /&gt;                        &amp;lt;amx:cellFormat id="cf1" columnSpan="3" width="100%" height="20px"&lt;br /&gt;                                        shortDesc="Winds, Clouds, Pressure cell"&amp;gt;&lt;br /&gt;                            &amp;lt;amx:outputText id="ot2"&lt;br /&gt;                                            value="Wind #{row.wind}m/s. clouds #{row.clouds}%, #{row.pressure} hpa"&lt;br /&gt;                                            styleClass="adfmf-listItem-captionText"/&amp;gt;&lt;br /&gt;                        &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;                    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;                &amp;lt;/amx:tableLayout&amp;gt;&lt;br /&gt;            &amp;lt;/amx:listItem&amp;gt;&lt;br /&gt;        &amp;lt;/amx:listView&amp;gt;&lt;br /&gt;    &amp;lt;/amx:panelPage&amp;gt;&lt;/code&gt;&lt;/pre&gt;DashBoardView amx page preview looks like below. &lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-J6ThZ-MjmyE/UTWtSF5Ge1I/AAAAAAAACvE/rli_ijed8hc/s1600/DashBoardView.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-J6ThZ-MjmyE/UTWtSF5Ge1I/AAAAAAAACvE/rli_ijed8hc/s320/DashBoardView.png" width="190" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Double click on AddCityView view will launch Create ADF Mobile AMX  Page dialog. Open the AddCityView.amx page and to source tab and  follow the below steps:&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;In Header facet, amx:outputText set the value as "Search City".&amp;nbsp;&lt;/li&gt;&lt;li&gt;From DC palette drag and drop CityDC-&amp;gt;SearchCities as ADF Mobile Parameter Form&lt;/li&gt;&lt;li&gt;Move Search button code to Secondary Action facet.&lt;/li&gt;&lt;li&gt;Drag and drop&amp;nbsp;CityDC-&amp;gt;SearchCities-&amp;gt;City as ADF Mobile List View and select the default options&lt;/li&gt;&lt;li&gt;Go to bindings and Create Control Binding as shown below &lt;/li&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-nDiH0Ui4KH4/UTXjnnjhTxI/AAAAAAAACvY/J4amsvKMcvg/s1600/AddToCity.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-nDiH0Ui4KH4/UTXjnnjhTxI/AAAAAAAACvY/J4amsvKMcvg/s400/AddToCity.png" width="366" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ol style="text-align: left;"&gt;&lt;/ol&gt;From Component palette drag and drop amx:setPropertyListener into amx:listItem and modify the values as shown in below code. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;amx:panelpage id="pp1"&amp;gt;&lt;br /&gt;        &amp;lt;amx:facet name="header"&amp;gt;&lt;br /&gt;            &amp;lt;amx:outputtext id="ot1" value="Search City"&amp;gt;&lt;br /&gt;        &amp;lt;/amx:outputtext&amp;gt;&amp;lt;/amx:facet&amp;gt;&lt;br /&gt;        &amp;lt;amx:facet name="secondary"&amp;gt;&lt;br /&gt;            &amp;lt;amx:commandbutton actionlistener="#{bindings.searchCities.execute}" disabled="#{!bindings.searchCities.enabled}" id="cb2" text="Search"&amp;gt;&lt;br /&gt;        &amp;lt;/amx:commandbutton&amp;gt;&amp;lt;/amx:facet&amp;gt;&lt;br /&gt;        &amp;lt;amx:panelformlayout id="pfl1"&amp;gt;&lt;br /&gt;            &amp;lt;amx:inputtext id="it2" inlinestyle="text-align:left;" value="#{bindings.queryString.inputValue}"&amp;gt;&lt;br /&gt;        &amp;lt;/amx:inputtext&amp;gt;&amp;lt;/amx:panelformlayout&amp;gt;&lt;br /&gt;        &amp;lt;amx:listview fetchsize="#{bindings.City.rangeSize}" id="lv1" value="#{bindings.City.collectionModel}" var="row"&amp;gt;&lt;br /&gt;            &amp;lt;amx:listitem action="backToDashBoard" actionlistener="#{bindings.AddCityToDB.execute}" id="li1"&amp;gt;&lt;br /&gt;                &amp;lt;amx:outputtext id="ot2" value="#{row.name}, #{row.country}"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setpropertylistener from="#{row.id}" to="#{pageFlowScope.id}" type="action"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setpropertylistener from="#{row.name}" to="#{pageFlowScope.name}" type="action"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setpropertylistener from="#{row.country}" to="#{pageFlowScope.country}" type="action"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setpropertylistener from="#{row.lat}" to="#{pageFlowScope.lat}" type="action"&amp;gt;&lt;br /&gt;                &amp;lt;amx:setpropertylistener from="#{row.lon}" to="#{pageFlowScope.lon}" type="action"&amp;gt;&lt;br /&gt;            &amp;lt;/amx:setpropertylistener&amp;gt;&amp;lt;/amx:setpropertylistener&amp;gt;&amp;lt;/amx:setpropertylistener&amp;gt;&amp;lt;/amx:setpropertylistener&amp;gt;&amp;lt;/amx:setpropertylistener&amp;gt;&amp;lt;/amx:outputtext&amp;gt;&amp;lt;/amx:listitem&amp;gt;&lt;br /&gt;        &amp;lt;/amx:listview&amp;gt;&lt;br /&gt; &amp;lt;/amx:panelpage&amp;gt;&lt;/code&gt;&lt;/pre&gt;AddCityView amx page preview looks like 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/-PA7oMZ8FPYo/UTXknMpYlpI/AAAAAAAACvg/Lu3SVrmwjTs/s1600/AddCity.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-PA7oMZ8FPYo/UTXknMpYlpI/AAAAAAAACvg/Lu3SVrmwjTs/s320/AddCity.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;&amp;nbsp;Double click on ForeCastView view will launch Create ADF Mobile AMX  Page dialog. Open the AddCityView.amx page and to source tab and  follow the below steps:&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;In Header facet, amx:outputText set the value as "Forecast"&lt;/li&gt;&lt;li&gt;In PrimaryAction facet, for amx:commandButton modify the values text: Back, action: backtoDashBoard.&amp;nbsp;&lt;/li&gt;&lt;li&gt;From DC palette drag and drop ForecastDC-&amp;gt;searchCities-&amp;gt;Forecast  as ADF Mobile List View and select the default options.&lt;/li&gt;&lt;li&gt;In Edit Action Binding dialog for cityId parameter provide value as "#{pageFlowScope.forecastCityId}"&lt;/li&gt;&lt;li&gt;Go to bindings Create executable binding-&amp;gt;invoke Action with Id = invokeSearchCities, Binds = searchCities and Refresh = always&lt;/li&gt;&lt;li&gt;Modify the code as shown in below code.&amp;nbsp; &lt;/li&gt;&lt;/ol&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;amx:panelPage id="pp1"&amp;gt;&lt;br /&gt; &amp;lt;amx:facet name="header"&amp;gt;&lt;br /&gt;  &amp;lt;amx:outputText value="Forecast" id="ot1"/&amp;gt;&lt;br /&gt; &amp;lt;/amx:facet&amp;gt;&lt;br /&gt; &amp;lt;amx:facet name="primary"&amp;gt;&lt;br /&gt;  &amp;lt;amx:commandButton id="cb1" text="Back" action="backtoDashBoard"/&amp;gt;&lt;br /&gt; &amp;lt;/amx:facet&amp;gt;&lt;br /&gt; &amp;lt;amx:panelGroupLayout id="pgl1" styleClass="amx-style-groupbox" inlineStyle="width:400px;"&amp;gt;&lt;br /&gt;  &amp;lt;amx:outputText value="#{pageFlowScope.forecastName}, #{pageFlowScope.forecastCountry}" id="ot2"/&amp;gt;&lt;br /&gt; &amp;lt;/amx:panelGroupLayout&amp;gt;&lt;br /&gt; &amp;lt;amx:listView var="row" value="#{bindings.Forecast.collectionModel}" fetchSize="#{bindings.Forecast.rangeSize}"&lt;br /&gt;      id="lv1" styleClass="adfmf-listView-insetList" inlineStyle="width:400px;"&amp;gt;&lt;br /&gt;  &amp;lt;amx:listItem id="li1" showLinkIcon="false"&amp;gt;&lt;br /&gt;   &amp;lt;amx:tableLayout id="tl4" width="100%" shortDesc="Forecast Table layout"&amp;gt;&lt;br /&gt;    &amp;lt;amx:rowLayout id="rl41"&amp;gt;&lt;br /&gt;     &amp;lt;amx:cellFormat id="cf4i" columnSpan="4" halign="start" shortDesc="Date"&amp;gt;&lt;br /&gt;      &amp;lt;amx:outputText value="#{row.dt}, #{row.temp}°C - #{row.description} " id="ot3"/&amp;gt;&lt;br /&gt;     &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;    &amp;lt;amx:rowLayout id="rl1"&amp;gt;&lt;br /&gt;     &amp;lt;amx:cellFormat id="cf1" width="20px" rowSpan="2" halign="center" shortDesc="Image cell"&amp;gt;&lt;br /&gt;      &amp;lt;amx:image id="imaged1" source="/Images/#{row.icon}.png"&lt;br /&gt;           inlineStyle="height:32px;width:32px" shortDesc="Forecast Image"/&amp;gt;&lt;br /&gt;     &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;     &amp;lt;amx:cellFormat id="cf41" columnSpan="3" width="100%" height="28px" shortDesc="City name cell"&amp;gt;&lt;br /&gt;      &amp;lt;amx:outputText id="outputTextd1"&lt;br /&gt;          value="Morn #{row.morn}°C, Eve #{row.eve}°C, Night #{row.night}°C"&lt;br /&gt;          styleClass="adfmf-listItem-captionText"/&amp;gt;&lt;br /&gt;     &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;    &amp;lt;amx:rowLayout id="rl42"&amp;gt;&lt;br /&gt;     &amp;lt;amx:cellFormat id="cf43" columnSpan="3" width="100%" height="20px" shortDesc="Temprature cell"&amp;gt;&lt;br /&gt;      &amp;lt;amx:outputText id="outputTextd3"&lt;br /&gt;          value="Wind #{row.speed}m/s. humidity #{row.humidity}%, #{row.pressure} hpa"&lt;br /&gt;          styleClass="adfmf-listItem-captionText"/&amp;gt;&lt;br /&gt;     &amp;lt;/amx:cellFormat&amp;gt;&lt;br /&gt;    &amp;lt;/amx:rowLayout&amp;gt;&lt;br /&gt;   &amp;lt;/amx:tableLayout&amp;gt;&lt;br /&gt;  &amp;lt;/amx:listItem&amp;gt;&lt;br /&gt; &amp;lt;/amx:listView&amp;gt;&lt;br /&gt;&amp;lt;/amx:panelPage&amp;gt;&lt;/code&gt;AddCityView amx page preview looks like below.&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-p3OgVfihKmw/UTXyjOPy9II/AAAAAAAACvw/w2wz-WEjlns/s1600/ForecastPreview.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="288" src="http://3.bp.blogspot.com/-p3OgVfihKmw/UTXyjOPy9II/AAAAAAAACvw/w2wz-WEjlns/s320/ForecastPreview.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;/pre&gt;Deploy the application to device/emulator/package, Happy Weather Forecast :) &lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/03/integrating-open-weather-map-in-adf.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-j-bQXXTUH9o/UTV5j5rFxiI/AAAAAAAACss/z2NYIA8ldsU/s72-c/BlankScreen.png' height='72' width='72'/><thr:total>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-6315057444005241573</guid><pubDate>Tue, 19 Feb 2013 14:08:00 +0000</pubDate><atom:updated>2013-04-02T09:22:59.332-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>PreferencesPage</category><category domain='http://www.blogger.com/atom/ns#'>Bean DataControl</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><title>Usage of User Preferences in ADF Mobile</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://docs.oracle.com/cd/E35521_01/doc.111230/e24475/userpreferences.htm#ADFMF773"&gt;Preferences&lt;/a&gt; enable you to add settings that can be configured by end users. In this article will see how to use adfmf:preferenceList to change the display name format setting in the Contacts list at run time.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;ADF Mobile supports application-level and application feature-level user preference pages, in this demo I'm using application feature-level user preference page. Preferences are populated with default values at startup. These values are defined in the adf-feature.xml file, on load of application user can click on preferences feature in navigation bar and select the display name format to be displayed.&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it deployed and run on Android Device/Emulator. Displays the Contacts list on the screen.&lt;br /&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://3.bp.blogspot.com/-k9r3IMcVRwY/USN1sCgJjPI/AAAAAAAACrA/2QIwDUbe09Q/s1600/EmpList.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-k9r3IMcVRwY/USN1sCgJjPI/AAAAAAAACrA/2QIwDUbe09Q/s320/EmpList.png" width="192" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Click on the menu button, this will launch the&amp;nbsp;Navigation&amp;nbsp;Bar with Preferences, Hide Navigation and SpringBoard options. Click on Preferences.&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/-HMZhIwDVD2g/USN1xCNAX1I/AAAAAAAACrI/Z6dsRhESYFU/s1600/Menu.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-HMZhIwDVD2g/USN1xCNAX1I/AAAAAAAACrI/Z6dsRhESYFU/s320/Menu.png" width="191" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In Contact Preference Screen, clicking on Name Display will open the popup by displaying Name Display formats which are defined in adf-feature.xml &amp;nbsp;file. Now select "LastName FirstName".&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://4.bp.blogspot.com/-chMSj2fQHz4/USN11MdV_II/AAAAAAAACrQ/ds63RQHKP78/s1600/ContactPreferences.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="244" src="http://4.bp.blogspot.com/-chMSj2fQHz4/USN11MdV_II/AAAAAAAACrQ/ds63RQHKP78/s320/ContactPreferences.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;I found the way to refresh the Contacts list in the screen, so striking of the below section. Here user don't need to click on the refresh button, after clicking on the device back button will refresh the contact list.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;strike&gt;Next click on the device back button will take you to the Contacts screen, notice here data will be displayed in the old format only "FirstName LastName". &lt;i&gt;Here clicking of the device back button handler should be provide to refresh the Contacts list on the screen. I didn't find any ways to refresh list after back button action, so filed the bug against this once I get the solution will update the article.&lt;/i&gt; Time being as a workaround provide refresh button, after clicking on refresh button Contacts list will be redraw with updated name display format.&lt;/strike&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Nwu7VWucMX0/USN15pEME1I/AAAAAAAACrY/DqRw7VKCESI/s1600/FinalEmplist.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-Nwu7VWucMX0/USN15pEME1I/AAAAAAAACrY/DqRw7VKCESI/s320/FinalEmplist.png" width="191" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/PreferenceDemo.zip"&gt;download the sample workspace from here&lt;/a&gt;. In below section I will not provide all the steps to create the application, only key ones are shown. &lt;i&gt;Above sample download workspace doesn't have extended lifecycle listener class, please follow the below steps to create LifeCycleListener for fetaure.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;By design, for a feature to be informed of Device Actions that are sourced from outside of that feature that feature must have a lifecycle listener. Follow the below steps.&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Add new Java Class&lt;/li&gt;&lt;li&gt;Set Name and package as desired&lt;/li&gt;&lt;li&gt;Click '+' under Optional Attributes to add an interface&lt;/li&gt;&lt;li&gt;Choose the interface LifeCycleListener (oracle.adfmf.feature), &amp;nbsp;Save (no other changes to default class contents need to be made for this)&amp;nbsp;&lt;/li&gt;&lt;/ol&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Gygeh3G39X8/USx7o1QjMzI/AAAAAAAACr8/NOgyR90peDA/s1600/LifeCycleListener.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-Gygeh3G39X8/USx7o1QjMzI/AAAAAAAACr8/NOgyR90peDA/s400/LifeCycleListener.png" width="328" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next Open the adfmf-feature.xml and map ExtendedFetureLifeCycleListener.java to LifeCycle Event Listener as shown below.&lt;br /&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/-FEEYTEnar-8/USx8uOS-54I/AAAAAAAACsI/iLvLH0uHAFU/s1600/Features.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="183" src="http://1.bp.blogspot.com/-FEEYTEnar-8/USx8uOS-54I/AAAAAAAACsI/iLvLH0uHAFU/s400/Features.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Use the adfmf:preferences element to create the preferences in adf-feature.xml file as below. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;&amp;lt;adfmf:feature id="Preference" name="Preference"&amp;gt;&lt;br /&gt; &amp;lt;adfmf:content id="Preference.1"&amp;gt;&lt;br /&gt;  &amp;lt;adfmf:amx file="Preference/ContactList.amx"/&amp;gt;&lt;br /&gt; &amp;lt;/adfmf:content&amp;gt;&lt;br /&gt; &amp;lt;adfmf:preferences&amp;gt;&lt;br /&gt;  &amp;lt;adfmf:preferenceGroup id="Pref1" label="Contact Preference"&amp;gt;&lt;br /&gt;   &amp;lt;adfmf:preferenceList id="Pref1NameDisplay" label="Name Display" default="NF1"&amp;gt;&lt;br /&gt;    &amp;lt;adfmf:preferenceValue name="FirstName LastName" value="NF1"/&amp;gt;&lt;br /&gt;    &amp;lt;adfmf:preferenceValue name="LastName FirstName" value="NF2"/&amp;gt;&lt;br /&gt;   &amp;lt;/adfmf:preferenceList&amp;gt;&lt;br /&gt;  &amp;lt;/adfmf:preferenceGroup&amp;gt;&lt;br /&gt; &amp;lt;/adfmf:preferences&amp;gt;&lt;br /&gt;&amp;lt;/adfmf:feature&amp;gt;&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In ContactList.amx page access the preference values using EL expression and ternary operator is used the switch between the display names.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 50px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;#{preferenceScope.feature.Preference.Pref1.Pref1NameDisplay eq 'NF1' ? row.firstLastName : row.lastFirstName}"&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/02/usage-of-user-preferences-in-adf-mobile.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-k9r3IMcVRwY/USN1sCgJjPI/AAAAAAAACrA/2QIwDUbe09Q/s72-c/EmpList.png' height='72' width='72'/><thr:total>5</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5137125295591035615</guid><pubDate>Tue, 12 Feb 2013 05:16:00 +0000</pubDate><atom:updated>2013-02-11T21:16:53.408-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Managed Bean</category><category domain='http://www.blogger.com/atom/ns#'>Bean DataControl</category><category domain='http://www.blogger.com/atom/ns#'>selectManyCheckbox</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><title>ADF Mobile Email - Send Multiple File Attachments with amx:selectManyCheckbox option</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Here's a use case: A presenter is showing presentation on their Android/iPhone/iPad devices to the client. After the presentation, client may asks for the&amp;nbsp;presentation files for there further understanding.&amp;nbsp;Now presenter wants to attach all the files used in&amp;nbsp;presentation&amp;nbsp;and send mail to the client.&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it deployed and run on Android Device/Emulator. Displays the Employees List in first screen.&lt;br /&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://4.bp.blogspot.com/-ZvfcOrT6OrI/URj2JGDo45I/AAAAAAAACno/G8gLXlCt0bU/s1600/EmpList.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-ZvfcOrT6OrI/URj2JGDo45I/AAAAAAAACno/G8gLXlCt0bU/s400/EmpList.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Clicking on any employee will leads to the Compose screen, where the selected employee email will be pre-populated in "To" field.&lt;br /&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/-TYzZyeXjUew/URj2NgUr5xI/AAAAAAAACnw/Ww5QkHknf3g/s1600/Compose.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-TYzZyeXjUew/URj2NgUr5xI/AAAAAAAACnw/Ww5QkHknf3g/s400/Compose.png" width="250" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Enter the subject and message details need to be send. Click on "Attach a file" button, a popup window will open and files under the "&lt;b&gt;/mnt/sdcard/Download&lt;/b&gt;" folder will be displayed. Now select the files that as to be attached and click on Ok button.&lt;br /&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/--oaqTcWFVJs/URj2VQ5oVKI/AAAAAAAACn4/UuJs40LbLq4/s1600/FileAttach.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/--oaqTcWFVJs/URj2VQ5oVKI/AAAAAAAACn4/UuJs40LbLq4/s400/FileAttach.png" width="246" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now notice the attached files will be displayed&amp;nbsp;in-front&amp;nbsp;of &amp;nbsp;Attached Files. Next clicking on Send Email button will take you to the next screen where all the email clients installed in the device will be listed, select any client and send the email.&lt;br /&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://4.bp.blogspot.com/-1dB-BZD97OA/URj2ZNrZNvI/AAAAAAAACoA/hQ41hoGgCKo/s1600/SendMail.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-1dB-BZD97OA/URj2ZNrZNvI/AAAAAAAACoA/hQ41hoGgCKo/s400/SendMail.png" width="243" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Tested in Android device, I'm able to send email with multiple attachments.&amp;nbsp;You can &lt;a href="https://ejbdatacontrol-samples.googlecode.com/files/EmailAttachmentsApp.zip"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl.&lt;br /&gt;&lt;br /&gt;In ViewController project, locate and expand the Application Sources folder, create a Employee.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Employee {&lt;br /&gt;    protected int id;&lt;br /&gt;    protected String firstName;&lt;br /&gt;    protected String lastName;&lt;br /&gt;    protected String email;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Employee() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Employee(int id, String firstName, String lastName, String email) {&lt;br /&gt;        super();&lt;br /&gt;        this.id = id;&lt;br /&gt;        this.firstName = firstName;&lt;br /&gt;        this.lastName = lastName;&lt;br /&gt;        this.email = email;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setId(int id) {&lt;br /&gt;        int oldId = this.id;&lt;br /&gt;        this.id = id;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("id", oldId, id);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getId() {&lt;br /&gt;        return id;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setFirstName(String firstName) {&lt;br /&gt;        String oldFirstName = this.firstName;&lt;br /&gt;        this.firstName = firstName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("first", oldFirstName, firstName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getFirstName() {&lt;br /&gt;        return firstName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLastName(String lastName) {&lt;br /&gt;        String oldLastName = this.lastName;&lt;br /&gt;        this.lastName = lastName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("last", oldLastName, lastName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getLastName() {&lt;br /&gt;        return lastName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setEmail(String email) {&lt;br /&gt;        String oldEmail = this.email;&lt;br /&gt;        this.email = email;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("email", oldEmail, email);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getEmail() {&lt;br /&gt;        return email;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Create EmployeeListDC.java file and add the below code, create DataControl based on EmployeeListDC.java file. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class EmployeeListDC {&lt;br /&gt;    private static List s_employees = null;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public EmployeeListDC() {&lt;br /&gt;        super();&lt;br /&gt;        if (s_employees == null) {&lt;br /&gt;            s_employees = new ArrayList();&lt;br /&gt;            s_employees.add(new Employee(1, "Praveen", "Thulasiraman", "praveen.thulasiraman@xyz.com"));&lt;br /&gt;            s_employees.add(new Employee(2, "Arul", "wilson", "arul.wilson@xyz.com"));&lt;br /&gt;            s_employees.add(new Employee(3, "Deepak", "Siddappa", "deepak.siddappa@xyz.com"));&lt;br /&gt;            s_employees.add(new Employee(4, "Arun", "Sridhran", "arun.x.sridharan@xyz.com"));&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Employee[] getEmployees() {&lt;br /&gt;        Employee e[] = null;&lt;br /&gt;        e = (Employee[])s_employees.toArray(new Employee[s_employees.size()]);&lt;br /&gt;        return e;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create FileAttachment.java file and add below code. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class FileAttachment {&lt;br /&gt;    private int fileIndex;&lt;br /&gt;    private String fileName;&lt;br /&gt;    private String filePath;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public FileAttachment() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public FileAttachment(int fileIndex, String fileName, String filePath) {&lt;br /&gt;        super();&lt;br /&gt;        this.fileName = fileName;&lt;br /&gt;        this.filePath = filePath;&lt;br /&gt;        this.fileIndex = fileIndex;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setFileIndex(int fileIndex) {&lt;br /&gt;        int oldFileIndex = this.fileIndex;&lt;br /&gt;        this.fileIndex = fileIndex;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("fileIndex", oldFileIndex, fileIndex);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getFileIndex() {&lt;br /&gt;        return fileIndex;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setFileName(String fileName) {&lt;br /&gt;        String oldFileName = this.fileName;&lt;br /&gt;        this.fileName = fileName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("fileName", oldFileName, fileName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getFileName() {&lt;br /&gt;        return fileName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setFilePath(String filePath) {&lt;br /&gt;        String oldFilePath = this.filePath;&lt;br /&gt;        this.filePath = filePath;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("fileName", oldFilePath, filePath);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getFilePath() {&lt;br /&gt;        return filePath;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;Create FileAttachmentListDC.java file and add the below code, create DataControl based on FileAttachmentListDC.java file. &lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class FileAttachmentListDC {&lt;br /&gt;    private static List s_FileAttachment = null;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public FileAttachmentListDC() {&lt;br /&gt;        super();&lt;br /&gt;        if (s_FileAttachment == null) {&lt;br /&gt;            s_FileAttachment = new ArrayList();&lt;br /&gt;            executeReadDir();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void executeReadDir() {&lt;br /&gt;        //  String dirName = AdfmfJavaUtilities.getDirectoryPathRoot(AdfmfJavaUtilities.DeviceOnlyDirectory);&lt;br /&gt;        //Hard Coding the Folder path&lt;br /&gt;        String dirName = "/mnt/sdcard/Download";&lt;br /&gt;        try {&lt;br /&gt;            showDir(new File(dirName));&lt;br /&gt;            providerChangeSupport.fireProviderRefresh("FileAttachment");&lt;br /&gt;        } catch (IOException e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Recursively read the dir and get the file list&lt;br /&gt;     * @param file&lt;br /&gt;     * @throws IOException&lt;br /&gt;     */&lt;br /&gt;    static void showDir(File file) throws IOException {&lt;br /&gt;        int indexCounter = 0;&lt;br /&gt;        if (file.isDirectory()) {&lt;br /&gt;            File[] files = file.listFiles();&lt;br /&gt;            for (int i = 0; i &amp;lt; files.length; i++)&lt;br /&gt;                showDir(files[i]);&lt;br /&gt;        } else {&lt;br /&gt;            s_FileAttachment.add(new FileAttachment(indexCounter, file.getName(), file.getPath()));&lt;br /&gt;            indexCounter++;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public FileAttachment[] getFileAttachment() {&lt;br /&gt;        FileAttachment a[] = null;&lt;br /&gt;        a = (FileAttachment[])s_FileAttachment.toArray(new FileAttachment[s_FileAttachment.size()]);&lt;br /&gt;        return a;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Clear the PageScopeVariables&lt;br /&gt;     */&lt;br /&gt;    public void clearScopeVariables() {&lt;br /&gt;        ValueExpression ve1 = AdfmfJavaUtilities.getValueExpression("#{pageFlowScope.filePaths}", String.class);&lt;br /&gt;        ve1.setValue(AdfmfJavaUtilities.getAdfELContext(), "");&lt;br /&gt;&lt;br /&gt;        ValueExpression ve2 = AdfmfJavaUtilities.getValueExpression("#{pageFlowScope.fileNames}", String.class);&lt;br /&gt;        ve2.setValue(AdfmfJavaUtilities.getAdfELContext(), "");&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;In ViewController project. Locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will launch the new Create ADF Mobile Feature dialog, modify the values as shown below. &lt;br /&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://2.bp.blogspot.com/-2J8UdWiQQrU/URmruRMjmyI/AAAAAAAACog/NCNRkefhXI4/s1600/EmailFeature.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="108" src="http://2.bp.blogspot.com/-2J8UdWiQQrU/URmruRMjmyI/AAAAAAAACog/NCNRkefhXI4/s400/EmailFeature.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;In the Features table, select the newly created feature Email. Under the Features table, click the Content tab, and locate the Content table. Notice that the content item Email.1 is created by default. Next add a new file by clicking the green plus sign and select taskflow option, this will launch the new Create ADF Mobile Task Flow dialog, modify the value as shown below.&lt;/span&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;a href="http://4.bp.blogspot.com/-nphSzPrjxLA/URmvLUDmE4I/AAAAAAAACpE/EwN7n5Lp1Ps/s1600/EmailTaskFlow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="140" src="http://4.bp.blogspot.com/-nphSzPrjxLA/URmvLUDmE4I/AAAAAAAACpE/EwN7n5Lp1Ps/s400/EmailTaskFlow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;Click on the EmailTaskflow.xml to open the file in taskflow editor and follow the below steps.&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;1) Create two views and name them as EmpList and Email respectively.&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;2) Draw the control flow case from EmpList to Email and Outcome as "composeEmail", Behavior-&amp;gt;Transition as "flipRight".&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;3) Draw the control flow case from Email to EmpList and Outcome as "empList", Behavior-&amp;gt;Transition as "slideLeft".&lt;/div&gt;&lt;br /&gt;Double click on EmpList view will launch Create ADF Mobile AMX Page dialog. Open the EmpList.amx page and to source tab and follow the below steps:&lt;br /&gt;1) In Header facet, amx:outputText set the value as "Employee List"&lt;br /&gt;2) From DC palette drag and drop EmployeeListDC-&amp;gt;employees-&amp;gt;ADF Mobile List View and select the default options&lt;br /&gt;3) From Component palette drag and drop amx:setPropertyListener into amx:listItem&amp;nbsp;and modify the values as shown in below code.&lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 150px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="word-wrap: normal;"&gt;&amp;lt;amx:listView var="row" value="#{bindings.employees.collectionModel}"&lt;br /&gt;			  fetchSize="#{bindings.employees.rangeSize}" id="lv1"&amp;gt;&lt;br /&gt;	&amp;lt;amx:listItem id="li1" action="composeEmail"&amp;gt;&lt;br /&gt;		&amp;lt;amx:outputText value="#{row.firstName} #{row.lastName}" id="ot2"/&amp;gt;&lt;br /&gt;		&amp;lt;amx:setPropertyListener from="#{row.email}" to="#{pageFlowScope.email}" type="action"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:listItem&amp;gt;&lt;br /&gt;&amp;lt;/amx:listView&amp;gt;&lt;/code&gt;&lt;/pre&gt;Double click on Email view will launch Create ADF Mobile AMX Page dialog, in page facets select Header. Open the Email.amx page and to source tab and follow the below steps:&lt;br /&gt;&lt;br /&gt;1) In Header facet, amx:outputText set the value as "Compose"&lt;br /&gt;2) From DC palette drag and drop DeviceFeatures-&amp;gt;sendEmail-&amp;gt;ADF Mobile Parameter Form&lt;br /&gt;3) Drop the command button and showPopupBehavior on the button&lt;br /&gt;3) From Component palette drag and drop Popup component on the Panel Page&lt;br /&gt;4) Inside the Popup, drop FileAttachmentListDC-&amp;gt;fileAttachment-&amp;gt;MultipleSelection as ADF Mobile &amp;nbsp; &amp;nbsp;Select Many Checkbox and in Edit List binding dialog select values as below&lt;br /&gt;&amp;nbsp; &amp;nbsp; Multi Select Base Attribute : fileName&lt;br /&gt;&amp;nbsp; &amp;nbsp; Multi Select Display Attribute : filePath&lt;br /&gt;5) Next drop a command button inside the popup window and closePopupBehavior onto the command button.&lt;br /&gt;6) Create the valueChangeListener for&amp;nbsp;amx:selectManyCheckbox&lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 150px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="word-wrap: normal;"&gt;&amp;lt;amx:panelPage id="pp1"&amp;gt;&lt;br /&gt;	&amp;lt;amx:facet name="header"&amp;gt;&lt;br /&gt;		&amp;lt;amx:outputText value="Compose" id="ot1"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:facet&amp;gt;&lt;br /&gt;	&amp;lt;amx:panelFormLayout id="pfl1" labelPosition="topStart" fieldHalign="start"&amp;gt;&lt;br /&gt;		&amp;lt;amx:inputText value="#{pageFlowScope.email}" label="To" id="it4" readOnly="true"/&amp;gt;&lt;br /&gt;		&amp;lt;amx:inputText value="#{bindings.subject.inputValue}" label="Subject" id="it1"/&amp;gt;&lt;br /&gt;		&amp;lt;amx:inputText value="#{bindings.body.inputValue}" label="Body" id="it5"/&amp;gt;&lt;br /&gt;		&amp;lt;amx:inputText value="Attached Files: #{pageFlowScope.fileNames}" label="" id="it3" readOnly="true"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:panelFormLayout&amp;gt;&lt;br /&gt;	&amp;lt;amx:commandButton text="Attach a file" id="cb3" styleClass="adfmf-commandButton-rounded"&amp;gt;&lt;br /&gt;		&amp;lt;amx:showPopupBehavior popupId="AttachmentPopup" type="action" align="overlapBottom" alignId="pp1"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:commandButton&amp;gt;&lt;br /&gt;	&amp;lt;amx:commandButton actionListener="#{bindings.sendEmail.execute}" text="Send Email"&lt;br /&gt;					   disabled="#{!bindings.sendEmail.enabled}" id="cb1" action="empList"&lt;br /&gt;					   styleClass="adfmf-commandButton-rounded"/&amp;gt;&lt;br /&gt;&amp;lt;/amx:panelPage&amp;gt;&lt;br /&gt;&amp;lt;amx:popup id="AttachmentPopup" animation="slideUp"&amp;gt;&lt;br /&gt;	&amp;lt;amx:selectManyCheckbox value="#{bindings.fileAttachment.inputValue}" id="smc1"&lt;br /&gt;							valueChangeListener="#{pageFlowScope.EmailBean.fetchSelectedFileNames}"&amp;gt;&lt;br /&gt;		&amp;lt;amx:selectItems value="#{bindings.fileAttachment.items}"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:selectManyCheckbox&amp;gt;&lt;br /&gt;	&amp;lt;amx:commandButton text="Ok" id="cb2" styleClass="adfmf-commandButton-rounded "&amp;gt;&lt;br /&gt;		&amp;lt;amx:closePopupBehavior popupId="AttachmentPopup" type="action"/&amp;gt;&lt;br /&gt;	&amp;lt;/amx:commandButton&amp;gt;&lt;br /&gt;&amp;lt;/amx:popup&amp;gt;&lt;/code&gt;&lt;/pre&gt;7) Create a pageFlowScope managed bean and copy the below method code. &lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 150px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="word-wrap: normal;"&gt;/**&lt;br /&gt; * Get the selected filePaths&lt;br /&gt; * @param valueChangeEvent&lt;br /&gt; */&lt;br /&gt;public void fetchSelectedFileNames(ValueChangeEvent valueChangeEvent) {&lt;br /&gt;	Object[] objArr = (Object[])valueChangeEvent.getNewValue();&lt;br /&gt;&lt;br /&gt;	ValueExpression ve =&lt;br /&gt;		AdfmfJavaUtilities.getValueExpression("#{bindings.fileAttachment1.collectionModel}", AmxCollectionModel.class);&lt;br /&gt;	AmxCollectionModel model = (AmxCollectionModel)ve.getValue(AdfmfJavaUtilities.getAdfELContext());&lt;br /&gt;&lt;br /&gt;	StringBuffer sbFilePath = new StringBuffer();&lt;br /&gt;	StringBuffer sbFileName = new StringBuffer();&lt;br /&gt;	for (int x = 0; x &amp;lt; objArr.length; x++) {&lt;br /&gt;		Object obj = objArr[x];&lt;br /&gt;&lt;br /&gt;		Map provider = (Map)model.getProviders().get(obj);&lt;br /&gt;		String filePathVal = provider.get("filePath").toString();&lt;br /&gt;		sbFilePath.append("," + filePathVal.toString());&lt;br /&gt;&lt;br /&gt;		String fileNameval = provider.get("fileName").toString();&lt;br /&gt;		sbFileName.append("," + fileNameval.toString());&lt;br /&gt;	}&lt;br /&gt;&lt;br /&gt;	ValueExpression ve1 = AdfmfJavaUtilities.getValueExpression("#{pageFlowScope.filePaths}", String.class);&lt;br /&gt;	ve1.setValue(AdfmfJavaUtilities.getAdfELContext(), sbFilePath.substring(1));&lt;br /&gt;&lt;br /&gt;	ValueExpression ve2 = AdfmfJavaUtilities.getValueExpression("#{pageFlowScope.fileNames}", String.class);&lt;br /&gt;	ve2.setValue(AdfmfJavaUtilities.getAdfELContext(), sbFileName.substring(1));&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;8) Go to the bindings tab and modify the values as below for sendEmail Method&lt;br /&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://3.bp.blogspot.com/-KpuaXJ7pOIw/URnKtcw6FPI/AAAAAAAACpo/cVUEAanjf0I/s1600/DeviceSendEmail.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-KpuaXJ7pOIw/URnKtcw6FPI/AAAAAAAACpo/cVUEAanjf0I/s400/DeviceSendEmail.png" width="391" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;9) Create a tree binding as shown below. &lt;br /&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://2.bp.blogspot.com/-HlCdH89wzpc/URnLi4hXKbI/AAAAAAAACp0/w8eBB1kwwl0/s1600/TreeBinding.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-HlCdH89wzpc/URnLi4hXKbI/AAAAAAAACp0/w8eBB1kwwl0/s400/TreeBinding.png" width="332" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;10) Create a Action binding&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://4.bp.blogspot.com/-8BGR609hors/URnL_myKZeI/AAAAAAAACp8/rxt-caLxbEo/s1600/ActionBinding.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="382" src="http://4.bp.blogspot.com/-8BGR609hors/URnL_myKZeI/AAAAAAAACp8/rxt-caLxbEo/s400/ActionBinding.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;11)&amp;nbsp;Click on Create Executable binding and select Invoke action and follow as shown in below image. &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/-gnTU8t9hJb8/URnMS9qonVI/AAAAAAAACqE/q9tIbggvrAE/s1600/InvokeAction.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="153" src="http://1.bp.blogspot.com/-gnTU8t9hJb8/URnMS9qonVI/AAAAAAAACqE/q9tIbggvrAE/s400/InvokeAction.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Edit clearVars invoke action and set the Refresh to  always, so when ever page loads clearScopeVariables method will get  executed to clear all the pageFlowScope variable values.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;In the Application menu, select Deploy - New Deployment Profile to start the Create Deployment Profile dialog box. In the Profile Type drop-down list, ensure ADF Mobile for Android/IOS is selected and then click OK. Next select Deploy - New Deployment deployment profile. In the subsequent dialog box, select Deploy application to device/emulator/package, and click Finish.&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/02/adf-mobile-email-send-multiple-file.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-ZvfcOrT6OrI/URj2JGDo45I/AAAAAAAACno/G8gLXlCt0bU/s72-c/EmpList.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-2974542867758827074</guid><pubDate>Fri, 08 Feb 2013 17:27:00 +0000</pubDate><atom:updated>2013-02-11T01:20:37.619-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Managed Bean</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><title>Adf Mobile - Iterate through all the rows in tree binding using CollectionModel</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Scenario is how to iterate through all the rows in tree bindings using managed bean method, using collectionModel we can get the rows. collectionModel exposes a collection of data, EL expressions used within a component that is bound to a collectionModel can be referenced with a row variable, which will resolve the expression for each element in the collection.&lt;br /&gt;&lt;br /&gt;Here is the code below which iterate through the rows using collection model. Make sure the departments should be of type &lt;b&gt;Tree binding&lt;/b&gt;.     &lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 300px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="word-wrap: normal;"&gt;ValueExpression ve1 =&lt;br /&gt; AdfmfJavaUtilities.getValueExpression("#{bindings.departments.collectionModel}", AmxCollectionModel.class);&lt;br /&gt;AmxCollectionModel model = (AmxCollectionModel)ve1.getValue(AdfmfJavaUtilities.getAdfELContext());&lt;br /&gt;&lt;br /&gt;StringBuffer deptNamesString = new StringBuffer();&lt;br /&gt;Object[] myArr = model.getKeys();&lt;br /&gt;for (int x = 0; x &amp;lt; myArr.length; x++) {&lt;br /&gt; Object myObj = myArr[x];&lt;br /&gt; Map provider = (Map)model.getProviders().get(myObj);&lt;br /&gt; String val = provider.get("deptName").toString();&lt;br /&gt; deptNamesString.append("," + val);&lt;br /&gt;}&lt;br /&gt;//Populating the pageFlowscope variable, which will be displayed in amx page&lt;br /&gt;ValueExpression ve2 =&lt;br /&gt; AdfmfJavaUtilities.getValueExpression("#{pageFlowScope.departmentNameString}", String.class);&lt;br /&gt;ve2.setValue(AdfmfJavaUtilities.getAdfELContext(), deptNamesString.substring(1));&lt;/code&gt;&lt;/pre&gt;You can&amp;nbsp;&lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/AmxCollectionModelApp.zip"&gt;download the sample workspace from here&lt;/a&gt;.&amp;nbsp;Application screen looks like below when it deployed and run on Android Device/Emulator. In first screen DepartmentNames values will be empty after clicking on Execute button, in managed bean method using collection model rows will be iterated and stored in pageFlowScope variable, same variable value will be displayed on the screen.&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/-oiRJlTPNxgE/URUvCDROQAI/AAAAAAAACnI/rPaJg8rrdCQ/s1600/CollectionModel.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="226" src="http://2.bp.blogspot.com/-oiRJlTPNxgE/URUvCDROQAI/AAAAAAAACnI/rPaJg8rrdCQ/s400/CollectionModel.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/02/adf-mobile-iterate-through-all-rows-in.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-oiRJlTPNxgE/URUvCDROQAI/AAAAAAAACnI/rPaJg8rrdCQ/s72-c/CollectionModel.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-1648609662228023745</guid><pubDate>Fri, 08 Feb 2013 07:51:00 +0000</pubDate><atom:updated>2013-02-07T23:51:38.917-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>BC4J</category><title>How to retrieve Selected Items from selectManyCheckbox using ValueChnageListener</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;The selectManyCheckbox component creates a component which allows the user to select many values from a series of checkboxes. Below is the code to retrieve selected items from selectManyCheckbox using&amp;nbsp;ValueChangeListener method. &lt;br /&gt;&lt;br /&gt;Note:- valueChangeEvent.getNewValue() will return Object value like [Ljava.lang.Object;@fcfd12, need to loop the object arrayList to get the values.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 140px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public void myValueChangeListener(ValueChangeEvent valueChangeEvent) {&lt;br /&gt;        Object[] objArr = (Object[])valueChangeEvent.getNewValue();&lt;br /&gt;        for (int x = 0; x &amp;lt; objArr.length; x++) {&lt;br /&gt;            Object obj = objArr[x];&lt;br /&gt;            System.out.println(obj.toString());&lt;br /&gt;       }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;In Below image, how the selectManyCheckbox will be displayed at run time and user selected check box values will be displayed in Jdeveloper console.&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/-sp-Wvp3vzv4/URStLi04cMI/AAAAAAAACmo/5jrAFF8Wmxw/s1600/SelectMany.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://4.bp.blogspot.com/-sp-Wvp3vzv4/URStLi04cMI/AAAAAAAACmo/5jrAFF8Wmxw/s400/SelectMany.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/02/how-to-retrieve-selected-items-from.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-sp-Wvp3vzv4/URStLi04cMI/AAAAAAAACmo/5jrAFF8Wmxw/s72-c/SelectMany.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-8046240237586191706</guid><pubDate>Thu, 31 Jan 2013 14:06:00 +0000</pubDate><atom:updated>2013-02-11T21:39:24.271-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>DVT</category><title>ADF Mobile - Create Drill Down Graph Reports</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;b&gt;Drill Down&amp;nbsp;Graph&amp;nbsp;Report&lt;/b&gt; - Scenario here is to show all the cars sales report for this year in Pie Chart and when user click a individual car in pie chart slice, a drill through report opens, which accepts the car type as a parameter, and then displays car models sale in Bar Chart.&lt;br /&gt;&lt;div&gt;&lt;br /&gt;In ADF Mobile, &lt;b&gt;"clickListener"&lt;/b&gt; method is not provided for DVT components. Click listener interface will receive click events on the gauge components and can do further data process in BC4J. &amp;nbsp;In ADF Mobile &lt;b&gt;"Action"&lt;/b&gt; method is supported on DataItem in the graphs. Action&amp;nbsp;defines a&amp;nbsp;reference&amp;nbsp;to the an action method sent by the command button component, or static outcome of an action. So in this article I'm explaining how to build&amp;nbsp;drill down reports using &amp;lt;dvtm:pieChart&amp;gt; and &amp;lt;dvtm:barChart&amp;gt;.&lt;br /&gt;&lt;br /&gt;Application screen looks like below when it deployed and run on Android Device/Emulator. Displays the Cars Sales Reports in first screen.&lt;/div&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;a href="http://3.bp.blogspot.com/-k-V_o_2D22c/UQpdXet6ZuI/AAAAAAAACk8/_HTAmXyYbIE/s1600/DrillDownGraph-pieChartResult.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://3.bp.blogspot.com/-k-V_o_2D22c/UQpdXet6ZuI/AAAAAAAACk8/_HTAmXyYbIE/s400/DrillDownGraph-pieChartResult.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;i&gt;In above screen, slide the screen towards right. Notice only check boxes are displayed and attributes values(Legends) are not getting displayed for the pie chart slices, this could be an error.&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;Next click on any pie chart slice and respective car models will be displayed in Bar Chart screen.&lt;br /&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://4.bp.blogspot.com/-oULhajEeagA/UQpddNMzTkI/AAAAAAAAClE/mysO82X17y0/s1600/DrillDownGraph-barChartResult.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-oULhajEeagA/UQpddNMzTkI/AAAAAAAAClE/mysO82X17y0/s400/DrillDownGraph-barChartResult.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/MobileDrillDownApp.zip"&gt;download the sample workspace from here&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both;"&gt;[Runs with Oracle JDeveloper 11.1.2.3.0]&lt;/div&gt;&lt;b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;&lt;b style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl.&lt;br /&gt;&lt;br /&gt;In ViewController project, locate and expand the Application Sources folder, create a Cars.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Cars {&lt;br /&gt;    private String carName;&lt;br /&gt;    private int carSalesCount;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public Cars() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Cars(String carName, int carSalesCount) {&lt;br /&gt;        this.carName = carName;&lt;br /&gt;        this.carSalesCount = carSalesCount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCarName(String carName) {&lt;br /&gt;        String oldCarName = this.carName;&lt;br /&gt;        this.carName = carName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("carName", oldCarName, carName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getCarName() {&lt;br /&gt;        return carName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setCarSalesCount(int carSalesCount) {&lt;br /&gt;        int oldCarSalesCount = this.carSalesCount;&lt;br /&gt;        this.carSalesCount = carSalesCount;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("carSalesCount", oldCarSalesCount, carSalesCount);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getCarSalesCount() {&lt;br /&gt;        return carSalesCount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setPropertyChangeSupport(PropertyChangeSupport propertyChangeSupport) {&lt;br /&gt;        this.propertyChangeSupport = propertyChangeSupport;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public PropertyChangeSupport getPropertyChangeSupport() {&lt;br /&gt;        return propertyChangeSupport;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create CarModels.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class CarModels extends Cars {&lt;br /&gt;    private String modelName;&lt;br /&gt;    private int modelSalesCount;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public CarModels() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public CarModels(String carName, String modelName, int modelSalesCount) {&lt;br /&gt;        super();&lt;br /&gt;        setCarName(carName);&lt;br /&gt;        this.modelName = modelName;&lt;br /&gt;        this.modelSalesCount = modelSalesCount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setModelName(String modelName) {&lt;br /&gt;        String oldModelName = this.modelName;&lt;br /&gt;        this.modelName = modelName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("modelName", oldModelName, modelName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getModelName() {&lt;br /&gt;        return modelName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setModelSalesCount(int modelSalesCount) {&lt;br /&gt;        int oldModelSalesCount = this.modelSalesCount;&lt;br /&gt;        this.modelSalesCount = modelSalesCount;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("modelSalesCount", oldModelSalesCount, modelSalesCount);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getModelSalesCount() {&lt;br /&gt;        return modelSalesCount;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setPropertyChangeSupport(PropertyChangeSupport propertyChangeSupport) {&lt;br /&gt;        this.propertyChangeSupport = propertyChangeSupport;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public PropertyChangeSupport getPropertyChangeSupport() {&lt;br /&gt;        return propertyChangeSupport;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create Generic.java file and add the below code, create DataControl based on Generic.java file.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Generic {&lt;br /&gt;    private static List s_cars = null;&lt;br /&gt;    private static List s_carModels = null;&lt;br /&gt;    private static List s_filterCarModels = null;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public Generic() {&lt;br /&gt;        super();&lt;br /&gt;        if (s_cars == null) {&lt;br /&gt;            s_cars = new ArrayList();&lt;br /&gt;            s_cars.add(new Cars("Audi", 2000));&lt;br /&gt;            s_cars.add(new Cars("BMW", 2500));&lt;br /&gt;            s_cars.add(new Cars("Honda", 5000));&lt;br /&gt;            s_cars.add(new Cars("Mitsubishi", 1000));&lt;br /&gt;            s_cars.add(new Cars("Toyota", 4000));&lt;br /&gt;            s_cars.add(new Cars("Volkswagen", 3000));&lt;br /&gt;        }&lt;br /&gt;        if (s_carModels == null) {&lt;br /&gt;            s_carModels = new ArrayList();&lt;br /&gt;            s_carModels.add(new CarModels("Audi", "A3", 300));&lt;br /&gt;            s_carModels.add(new CarModels("Audi", "A4", 1000));&lt;br /&gt;            s_carModels.add(new CarModels("Audi", "Quattro", 700));&lt;br /&gt;            s_carModels.add(new CarModels("BMW", "BMW128", 1000));&lt;br /&gt;            s_carModels.add(new CarModels("BMW", "BMW528", 800));&lt;br /&gt;            s_carModels.add(new CarModels("BMW", "Gran Coupe", 700));&lt;br /&gt;            s_carModels.add(new CarModels("Honda", "Accord", 1200));&lt;br /&gt;            s_carModels.add(new CarModels("Honda", "Civic", 2000));&lt;br /&gt;            s_carModels.add(new CarModels("Honda", "Hybrid", 1800));&lt;br /&gt;            s_carModels.add(new CarModels("Mitsubishi", "Lancer", 400));&lt;br /&gt;            s_carModels.add(new CarModels("Mitsubishi", "Evolution", 300));&lt;br /&gt;            s_carModels.add(new CarModels("Mitsubishi", "Outlander", 300));&lt;br /&gt;            s_carModels.add(new CarModels("Toyota", "Camry", 1800));&lt;br /&gt;            s_carModels.add(new CarModels("Toyota", "Corolla", 1200));&lt;br /&gt;            s_carModels.add(new CarModels("Toyota", "Cruiser", 1000));&lt;br /&gt;            s_carModels.add(new CarModels("Volkswagen", "Beetle", 1300));&lt;br /&gt;            s_carModels.add(new CarModels("Volkswagen", "Jetta", 800));&lt;br /&gt;            s_carModels.add(new CarModels("Volkswagen", "Tiguan", 900));&lt;br /&gt;        }&lt;br /&gt;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will populate the result list to s_cars.&lt;br /&gt;     */&lt;br /&gt;    public Cars[] getCars() {&lt;br /&gt;        Cars c[] = null;&lt;br /&gt;        c = (Cars[])s_cars.toArray(new Cars[s_cars.size()]);&lt;br /&gt;        return c;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will populate the result list to s_carModels.&lt;br /&gt;     */&lt;br /&gt;    public CarModels[] getCarModels() {&lt;br /&gt;        CarModels cm[] = null;&lt;br /&gt;        cm = (CarModels[])s_carModels.toArray(new CarModels[s_carModels.size()]);&lt;br /&gt;        return cm;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will filter the result from s_carModels list.&lt;br /&gt;     */&lt;br /&gt;    public CarModels[] filteredCarModels(String carType) {&lt;br /&gt;        CarModels cm[] = null;&lt;br /&gt;        s_filterCarModels = new ArrayList();&lt;br /&gt;        for (Iterator i = s_carModels.iterator(); i.hasNext(); ) {&lt;br /&gt;            CarModels curCM = (CarModels)i.next();&lt;br /&gt;            if (curCM.getCarName().equals(carType)) {&lt;br /&gt;                s_filterCarModels.add(new CarModels(curCM.getCarName(), curCM.getModelName(),&lt;br /&gt;                                                    curCM.getModelSalesCount()));&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        cm = (CarModels[])s_filterCarModels.toArray(new CarModels[s_filterCarModels.size()]);&lt;br /&gt;        providerChangeSupport.fireProviderRefresh("carModels");&lt;br /&gt;        return cm;&lt;br /&gt;    }&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;In ViewController project. Locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will launch the new Create ADF Mobile Feature dialog, modify the values as shown 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/-JvtF-GlajXU/UQpA0GnmVyI/AAAAAAAACh0/AiqvGdWiWR8/s1600/DrillDownGraph-feature.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="136" src="http://2.bp.blogspot.com/-JvtF-GlajXU/UQpA0GnmVyI/AAAAAAAACh0/AiqvGdWiWR8/s400/DrillDownGraph-feature.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Features table, select the newly created feature Graph. Under the Features table, click the Content tab, and locate the Content table. Notice that the content item Graph.1 is created by default. Next add a new file by clicking the green plus sign and select taskflow option, this will launch the new Create ADF Mobile Task Flow dialog, modify the value as shown 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/-GCBSOTSeXZM/UQpBI-mD8iI/AAAAAAAACh8/fwCFZxTkAjU/s1600/DrillDownGraph-taskflow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="175" src="http://2.bp.blogspot.com/-GCBSOTSeXZM/UQpBI-mD8iI/AAAAAAAACh8/fwCFZxTkAjU/s400/DrillDownGraph-taskflow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on the GraphTaskflow.xml to open the file in taskflow editor and follow the below steps.&lt;br /&gt;1) Create two views and name them as carsView and carModelsView respectively.&lt;br /&gt;&amp;nbsp;2) Draw the control flow case from&amp;nbsp;carsView&amp;nbsp;to&amp;nbsp;carModelsView&amp;nbsp;and Outcome as "carsModel", Behavior-&amp;gt;Transition as "flipRight".&lt;br /&gt;&amp;nbsp;3) Draw the control flow case from&amp;nbsp;carModelsView&amp;nbsp;to carsView and Outcome as "car", Behavior-&amp;gt;Transition as "slideLeft".&lt;br /&gt;&lt;br /&gt;Double click on carsView view will launch Create ADF Mobile AMX Page dialog. Open the carsView.amx page and to source tab and follow the below steps:&lt;br /&gt;&lt;br /&gt;1) In Header facet, amx:outputText set the value as "Sales Report"&lt;br /&gt;2) From DC palette drag and drop Generic-&amp;gt;Cars-&amp;gt;ADF Mobile Chart and in Component Gallery dialog, select Pie chart and click ok.&lt;br /&gt;3) In Create Mobile Pie Chart dialog, select the values as shown in below image.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-9QleNzS6kJI/UQpHHrFt9OI/AAAAAAAACik/7SVWs322D14/s1600/DrillDownGraph-pieChart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://4.bp.blogspot.com/-9QleNzS6kJI/UQpHHrFt9OI/AAAAAAAACik/7SVWs322D14/s400/DrillDownGraph-pieChart.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;4) For dvtm:pieDataItem, set the action as "action" and drop&amp;nbsp;amx:setPropertyListener and modify the values as shown in below code.&lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 180px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="word-wrap: normal;"&gt;&lt;dvtm:piechart animationondisplay="auto" id="pc1" inlinestyle="width:400px; height:300px; float:left; background-color:white;" threedeffect="on" title="Car" value="#{bindings.cars.collectionModel}" var="row"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: 12px; line-height: 20px;"&gt; &amp;lt;dvtm:pieChart var="row" value="#{bindings.cars.collectionModel}" id="pc1" animationOnDisplay="auto"&lt;br /&gt;                       inlineStyle="width:400px; height:280px; float:left; background-color:white;" threeDEffect="on"&lt;br /&gt;                       title="Car"&amp;gt;&lt;br /&gt;            &amp;lt;amx:facet name="dataStamp"&amp;gt;&lt;br /&gt;                &amp;lt;dvtm:pieDataItem sliceId="#{row.carName}" value="#{row.carSalesCount}" action="carsModel"&amp;gt;&lt;br /&gt;                    &amp;lt;amx:setPropertyListener from="#{row.carName}" to="#{pageFlowScope.carName}"/&amp;gt;&lt;br /&gt;                &amp;lt;/dvtm:pieDataItem&amp;gt;&lt;br /&gt;            &amp;lt;/amx:facet&amp;gt;&lt;br /&gt; &amp;lt;/dvtm:pieChart&amp;gt;           &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family: Times New Roman;"&gt;&lt;span style="white-space: normal;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;/span&gt;&lt;/dvtm:piechart&gt;&lt;/code&gt;&lt;/pre&gt;Double click on carModelsView view will launch Create ADF Mobile AMX Page dialog, in page facets select Header, Primary Action. Open the deptList.amx page and to source tab and follow the below steps:&lt;br /&gt;&lt;br /&gt;1) In Header facet, amx:outputText set the value as "Sales Report"&lt;br /&gt;2)&amp;nbsp;In Seconday Action facet, for amx:commandButton modify the values text: Back, action: __back.&lt;br /&gt;3) From DC palette drag and drop Generic-&amp;gt;filteredCarModels-&amp;gt;CarModels-&amp;gt;ADF Mobile Chart and in Component Gallery dialog, select Bar chart and click ok.&lt;br /&gt;4) In Create Mobile Bar Chart dialog, select the values as shown in below image.&lt;br /&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://2.bp.blogspot.com/-Y8B57cYc_Nw/UQpVg8L3xKI/AAAAAAAACjE/0hbqIXwPc7k/s1600/BarChart.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="213" src="http://2.bp.blogspot.com/-Y8B57cYc_Nw/UQpVg8L3xKI/AAAAAAAACjE/0hbqIXwPc7k/s400/BarChart.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Enter the carType parameter value as #{pageFlowScope.carName}.&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://2.bp.blogspot.com/-pwl_pMVyEjc/UQpV1Z6IwPI/AAAAAAAACjM/J8N5FCgDuHQ/s1600/ActionBinding.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://2.bp.blogspot.com/-pwl_pMVyEjc/UQpV1Z6IwPI/AAAAAAAACjM/J8N5FCgDuHQ/s400/ActionBinding.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Open the carModelsView.amx and modify the properties for&amp;nbsp;dvtm:barChart as shown below.&lt;br /&gt;&lt;pre style="background-attachment: scroll; background-color: #f0f0f0; background-image: none; background-position: 0% 0%; background-repeat: repeat repeat; border: 1px dashed rgb(204, 204, 204); height: 160px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;span style="font-family: arial;"&gt;&lt;span style="font-size: 12px; line-height: 20px;"&gt;&amp;lt;dvtm:barChart var="row" value="#{bindings.CarModels.collectionModel}" id="bc1"&lt;br /&gt;      inlineStyle="width:400px; height:300px; float:left; background-color:white;"&lt;br /&gt;      title="#{pageFlowScope.carName} Car Models"&amp;gt;&lt;br /&gt; &amp;lt;amx:facet name="dataStamp"&amp;gt;&lt;br /&gt;  &amp;lt;dvtm:chartDataItem group="#{row.modelName}" value="#{row.modelSalesCount}" series="Sales Count"/&amp;gt;&lt;br /&gt; &amp;lt;/amx:facet&amp;gt;&lt;br /&gt; &amp;lt;dvtm:legend position="end" id="l1"/&amp;gt;&lt;br /&gt;&amp;lt;/dvtm:barChart&amp;gt;&lt;code style="color: black; word-wrap: normal;"&gt;&lt;/code&gt;&lt;/span&gt;&lt;/span&gt;&lt;/pre&gt;Click on Create Executable binding and select Invoke action and follow as shown in below image. &lt;br /&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://4.bp.blogspot.com/-zfwSP-XHod4/UQpYnoBesGI/AAAAAAAACjs/3JWV5RdfJ68/s1600/invokeAction.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="153" src="http://4.bp.blogspot.com/-zfwSP-XHod4/UQpYnoBesGI/AAAAAAAACjs/3JWV5RdfJ68/s400/invokeAction.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Edit invokeFilterdCarModels invoke actiion and set the Refresh to always, so when ever page loads employeesTotalRows method will get executed.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;&lt;b&gt;Note:-&lt;/b&gt; When the screen loads for the first time Bar Chart will get cached and for second time execution filteredCarModels method will not get executed at all even if the parameter value changed. To overcome this we have to set invoke Action for&amp;nbsp;&lt;/i&gt;&lt;i&gt;filteredCarModels method,&amp;nbsp;this executes the &amp;nbsp;invokeAction every time a page is navigated to regardless of the state of the binding container.&lt;/i&gt;&lt;br /&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://3.bp.blogspot.com/-tjsZzVv_XCE/UQpY3PqJHVI/AAAAAAAACj0/JRnMvBU8yfs/s1600/invokeAction-Properties.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="237" src="http://3.bp.blogspot.com/-tjsZzVv_XCE/UQpY3PqJHVI/AAAAAAAACj0/JRnMvBU8yfs/s400/invokeAction-Properties.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;Preview of the carsView.amx and carModelsView.amx will looks like below.&lt;/span&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;a href="http://1.bp.blogspot.com/-ALPE85BEzRc/UQpb5JB_xuI/AAAAAAAACkc/5jLSnh6PFrU/s1600/preview.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://1.bp.blogspot.com/-ALPE85BEzRc/UQpb5JB_xuI/AAAAAAAACkc/5jLSnh6PFrU/s400/preview.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;In the Application menu, select Deploy - New Deployment Profile to start the Create Deployment Profile dialog box.&amp;nbsp;In the Profile Type drop-down list, ensure ADF Mobile for Android/IOS is selected and then click OK. Next&lt;/span&gt;&lt;span style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;&amp;nbsp;select Deploy - New Deployment deployment profile. In the subsequent dialog box, select Deploy application to device/emulator/package, and click Finish.&lt;/span&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/01/adf-mobile-create-drill-down-graph.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-k-V_o_2D22c/UQpdXet6ZuI/AAAAAAAACk8/_HTAmXyYbIE/s72-c/DrillDownGraph-pieChartResult.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5143012912364552761</guid><pubDate>Thu, 24 Jan 2013 12:33:00 +0000</pubDate><atom:updated>2013-01-24T04:33:23.209-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>SQLite</category><category domain='http://www.blogger.com/atom/ns#'>Android Emulator</category><category domain='http://www.blogger.com/atom/ns#'>DataControl</category><category domain='http://www.blogger.com/atom/ns#'>ADF Mobile</category><category domain='http://www.blogger.com/atom/ns#'>Android</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><title>ADF Mobile - Access Device Native SQLite Database to Store Data</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Today I learnt on how to access device native &lt;a href="http://www.sqlite.org/" target="_blank"&gt;SQLite&lt;/a&gt;&amp;nbsp;database to store data and perform CRUD operations. This is my first article on ADF Mobile, In this article I will show on how to read data for display, create and save new record to the database.&lt;br /&gt;&lt;br /&gt;You can find more examples in &lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/adf-mobile-samples-1865088.html"&gt;Oracle ADF Mobile Samples&lt;/a&gt;, by looking into the samples and&amp;nbsp;&lt;a href="https://blogs.oracle.com/shay/entry/debugging_adf_mobile_apps_on"&gt;Debugging ADF Mobile Apps on Android&lt;/a&gt;.&amp;nbsp;I was able to use SQLite database to store the data.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/MobileDemo.zip"&gt;Download the sample workspace&lt;/a&gt; from here and application screen looks like below when it deployed to Android Emulator. Displaying the Departments List is fetched from SQLite, click on the Add button to create new department record.&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/-hjDlt_CUars/UQEbUV0OvBI/AAAAAAAACgg/ZwIkjqJisTw/s1600/MobileCreateRow-DeptList.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://2.bp.blogspot.com/-hjDlt_CUars/UQEbUV0OvBI/AAAAAAAACgg/ZwIkjqJisTw/s400/MobileCreateRow-DeptList.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Enter the details in the department form and click on Save button. The Department information will saved to the database and moved to Dept List 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://4.bp.blogspot.com/-mPcZ8Nmc-kQ/UQEbb6XXsHI/AAAAAAAACgo/vKLJthGWEcI/s1600/MobileCreateRow-AddDept.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-mPcZ8Nmc-kQ/UQEbb6XXsHI/AAAAAAAACgo/vKLJthGWEcI/s400/MobileCreateRow-AddDept.png" width="240" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Department list will get updated by newly added department record.&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/-Kp5e1P2lYy4/UQEbjto8uQI/AAAAAAAACgw/EFzoDxo3qPw/s1600/MobileCreateRow-FinalDeptList.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://4.bp.blogspot.com/-Kp5e1P2lYy4/UQEbjto8uQI/AAAAAAAACgw/EFzoDxo3qPw/s400/MobileCreateRow-FinalDeptList.png" width="238" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create an ADF Mobile Application, the application consists of two projects. Application Controller project of Application LifeCycle, Listeners, Device Features DataControl and ViewController project contains mobile features content like AMX Files, Task Flows and DataControl.&lt;br /&gt;&lt;br /&gt;In Application Controller project. Create a DBConnectionFactory.java class and copy the below code, this class contains code for connecting to SQLlite DB. Connecting to the SQLite database is somewhat different from opening a connection to an Oracle database, here use the &lt;a href="http://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html"&gt;java.sql.Connection&lt;/a&gt; object associated with your application to connect to the SQLite database.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class DBConnectionFactory {&lt;br /&gt;    protected static Connection conn = null;&lt;br /&gt;&lt;br /&gt;    public DBConnectionFactory() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Connect to the SQLite database&lt;br /&gt;     * @return&lt;br /&gt;     * @throws Exception&lt;br /&gt;     */&lt;br /&gt;    public static Connection getConnection() throws Exception {&lt;br /&gt;        if (conn == null) {&lt;br /&gt;            try {&lt;br /&gt;                // ApplicationDirectory returns the private read-write sandbox area&lt;br /&gt;                // of the mobile device's file system that this application can access.&lt;br /&gt;                // This is where the database is created&lt;br /&gt;                String Dir = AdfmfJavaUtilities.getDirectoryPathRoot(AdfmfJavaUtilities.ApplicationDirectory);&lt;br /&gt;                String connStr = "jdbc:sqlite:" + Dir + "/DEMO.db";&lt;br /&gt;&lt;br /&gt;                // If the database does not exist, a new database is automatically&lt;br /&gt;                // created when the SQLite JDBC connection is created&lt;br /&gt;                conn = new SQLite.JDBCDataSource(connStr).getConnection();&lt;br /&gt;            } catch (SQLException e) {&lt;br /&gt;                e.printStackTrace();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        return conn;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;i&gt;Note:- demo.sql file should be put in .adf/META-INF/ folder. You can get the sql file by downloading the &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/MobileDemo.zip"&gt;MobileDemo&amp;nbsp;application&lt;/a&gt;.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Open LifeCycleListenerImpl.java file and add the below method code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;/**&lt;br /&gt;* This method will read the sql file and&lt;br /&gt;* commit the sql statements to the SQLite DB&lt;br /&gt;*/&lt;br /&gt;private void InitDB() {&lt;br /&gt;	try {&lt;br /&gt;		// Since the SQL script has been packaged as a resource within&lt;br /&gt;		// the application, the getResourceAsStream method is used&lt;br /&gt;		ClassLoader cl = Thread.currentThread().getContextClassLoader();&lt;br /&gt;		InputStream is = cl.getResourceAsStream(".adf/META-INF/demo.sql");&lt;br /&gt;		if (is == null) {&lt;br /&gt;			System.err.println("Could not look up : .adf/META-INF/demo.sql");&lt;br /&gt;			return;&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		BufferedReader bReader = new BufferedReader(new InputStreamReader(is));&lt;br /&gt;		List stmts = new ArrayList();&lt;br /&gt;		String strstmt = "";&lt;br /&gt;		String ln = bReader.readLine();&lt;br /&gt;&lt;br /&gt;		// The while loop iterates over all the lines in the SQL script,&lt;br /&gt;		// assembling them into valid SQL statements and executing them as&lt;br /&gt;		// a terminating semicolon is encountered&lt;br /&gt;		while (ln != null) {&lt;br /&gt;			// Skipping blank lines, comments, and COMMIT statements&lt;br /&gt;			if (ln.startsWith("REM") || ln.startsWith("COMMIT")) {&lt;br /&gt;				ln = bReader.readLine();&lt;br /&gt;				continue;&lt;br /&gt;			}&lt;br /&gt;			strstmt = strstmt + ln;&lt;br /&gt;			if (strstmt.endsWith(";")) {&lt;br /&gt;				stmts.add(strstmt);&lt;br /&gt;				strstmt = "";&lt;br /&gt;				ln = bReader.readLine();&lt;br /&gt;				continue;&lt;br /&gt;			}&lt;br /&gt;			ln = bReader.readLine();&lt;br /&gt;		}&lt;br /&gt;&lt;br /&gt;		// To improve performance, the statements are executed&lt;br /&gt;		// one at a time in the context of a single transaction&lt;br /&gt;		DBConnectionFactory.getConnection().setAutoCommit(false);&lt;br /&gt;		for (int i = 0; i &amp;lt; stmts.size(); i++) {&lt;br /&gt;			Statement pStmt = DBConnectionFactory.getConnection().createStatement();&lt;br /&gt;			pStmt.executeUpdate((String)stmts.get(i));&lt;br /&gt;		}&lt;br /&gt;		DBConnectionFactory.getConnection().commit();&lt;br /&gt;	} catch (Exception e) {&lt;br /&gt;		e.printStackTrace();&lt;br /&gt;	}&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;In Start() method LifeCycleListenerImpl.java file, add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;try {&lt;br /&gt;	//Getting the connection to the database&lt;br /&gt;	Statement stat = DBConnectionFactory.getConnection().createStatement();&lt;br /&gt;	ResultSet rs = stat.executeQuery("SELECT * FROM DEPARTMENTS;");&lt;br /&gt;  } catch (SQLException e) {&lt;br /&gt;	// if the error message is "out of memory",&lt;br /&gt;	// it probably means no database file is found&lt;br /&gt;	InitDB();&lt;br /&gt;  } catch (Exception e) {&lt;br /&gt;	e.printStackTrace();&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Expand the ViewController project. Locate and expand the Application Sources folder, create a Department.java file and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Department {&lt;br /&gt;    protected int deptId;&lt;br /&gt;    protected String deptName;&lt;br /&gt;    protected int mgrId;&lt;br /&gt;    protected int locId;&lt;br /&gt;    private transient PropertyChangeSupport propertyChangeSupport = new PropertyChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public Department() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Department(int deptId, String deptName, int mgrId, int locId) {&lt;br /&gt;        setDeptId(deptId);&lt;br /&gt;        setDeptName(deptName);&lt;br /&gt;        setMgrId(mgrId);&lt;br /&gt;        setLocId(locId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    Department(Department newDept) {&lt;br /&gt;        setDeptId(newDept.getDeptId());&lt;br /&gt;        setDeptName(newDept.getDeptName());&lt;br /&gt;        setMgrId(newDept.getMgrId());&lt;br /&gt;        setLocId(newDept.getLocId());&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getKey() {&lt;br /&gt;        Integer i = new Integer(deptId);&lt;br /&gt;        return i.toString();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void addPropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.addPropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removePropertyChangeListener(PropertyChangeListener l) {&lt;br /&gt;        propertyChangeSupport.removePropertyChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;    public void setDeptId(int deptId) {&lt;br /&gt;        int oldDeptId = this.deptId;&lt;br /&gt;        this.deptId = deptId;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("deptId", oldDeptId, deptId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getDeptId() {&lt;br /&gt;        return deptId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDeptName(String deptName) {&lt;br /&gt;        String oldDeptName = this.deptName;&lt;br /&gt;        this.deptName = deptName;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("deptName", oldDeptName, deptName);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getDeptName() {&lt;br /&gt;        return deptName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setMgrId(int mgrId) {&lt;br /&gt;        int oldMgrId = this.mgrId;&lt;br /&gt;        this.mgrId = mgrId;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("mgrId", oldMgrId, mgrId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getMgrId() {&lt;br /&gt;        return mgrId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLocId(int locId) {&lt;br /&gt;        int oldLocId = this.locId;&lt;br /&gt;        this.locId = locId;&lt;br /&gt;        propertyChangeSupport.firePropertyChange("locId", oldLocId, locId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public int getLocId() {&lt;br /&gt;        return locId;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create DepartmentList.java file and add the below code. Create DataControl based on DepartmentList.java file.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: 200px; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class DepartmentList {&lt;br /&gt;    private static List s_departments = null;&lt;br /&gt;    private Department editDepartment = new Department();&lt;br /&gt;&lt;br /&gt;    private transient ProviderChangeSupport providerChangeSupport = new ProviderChangeSupport(this);&lt;br /&gt;&lt;br /&gt;    public void addProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.addProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void removeProviderChangeListener(ProviderChangeListener l) {&lt;br /&gt;        providerChangeSupport.removeProviderChangeListener(l);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public DepartmentList() {&lt;br /&gt;        if (s_departments == null) {&lt;br /&gt;            s_departments = new ArrayList();&lt;br /&gt;            Execute();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will query the database and populate&lt;br /&gt;     * the result list to s_departments&lt;br /&gt;     */&lt;br /&gt;    public void Execute() {&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "Execute",&lt;br /&gt;                  "Coming Inside Execute Method");&lt;br /&gt;        try {&lt;br /&gt;            Connection conn = DBConnectionFactory.getConnection();&lt;br /&gt;            s_departments.clear();&lt;br /&gt;            conn.setAutoCommit(false);&lt;br /&gt;            PreparedStatement stat = conn.prepareStatement("SELECT * from DEPARTMENTS ORDER BY DEPARTMENT_NAME");&lt;br /&gt;            ResultSet rs = stat.executeQuery();&lt;br /&gt;            while (rs.next()) {&lt;br /&gt;                int id = rs.getInt("DEPARTMENT_ID");&lt;br /&gt;                String deptName = rs.getString("DEPARTMENT_NAME");&lt;br /&gt;                int mgrId = rs.getInt("MANAGER_ID");&lt;br /&gt;                int locId = rs.getInt("LOCATION_ID");&lt;br /&gt;                Department d = new Department(id, deptName, mgrId, locId);&lt;br /&gt;                s_departments.add(d);&lt;br /&gt;            }&lt;br /&gt;            rs.close();&lt;br /&gt;            Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "Execute",&lt;br /&gt;                      "Exiting from Execute Method");&lt;br /&gt;            //  providerChangeSupport.fireProviderRefresh("departments");&lt;br /&gt;        } catch (SQLException e) {&lt;br /&gt;            System.err.println(e.getMessage());&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            System.err.println(e.getMessage());&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will get count of departments in database&lt;br /&gt;     * @return&lt;br /&gt;     */&lt;br /&gt;    public int getDepartmentCount() {&lt;br /&gt;        return s_departments.size();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will get the list of departments&lt;br /&gt;     * @return&lt;br /&gt;     */&lt;br /&gt;    public Department[] getDepartments() {&lt;br /&gt;        Department d[] = null;&lt;br /&gt;        d = (Department[])s_departments.toArray(new Department[s_departments.size()]);&lt;br /&gt;        return d;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will create new deptartment object instance&lt;br /&gt;     */&lt;br /&gt;    public void AddDepartment() {&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "AddDepartment",&lt;br /&gt;                  "Coming inside AddDepartment");&lt;br /&gt;        //Incrementing the intial deptId by 10&lt;br /&gt;        int deptId = getDepartmentCount() + 10;&lt;br /&gt;        setEditDepartment(new Department(deptId, "", 0, 0));&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "AddDepartment",&lt;br /&gt;                  "Exiting AddDepartment");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will commit the details of newly created department object&lt;br /&gt;     * @return&lt;br /&gt;     */&lt;br /&gt;    public boolean AddDepartmentToDB() {&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "AddDepartmentToDB",&lt;br /&gt;                  "Coming inside AddDepartmentToDB");&lt;br /&gt;        boolean result = false;&lt;br /&gt;        try {&lt;br /&gt;            Connection conn = DBConnectionFactory.getConnection();&lt;br /&gt;            conn.setAutoCommit(false);&lt;br /&gt;            String insertSQL =&lt;br /&gt;                "Insert into DEPARTMENTS (DEPARTMENT_ID,DEPARTMENT_NAME,MANAGER_ID,LOCATION_ID) values (?,?,?,?)";&lt;br /&gt;            PreparedStatement pStmt = conn.prepareStatement(insertSQL);&lt;br /&gt;            pStmt.setInt(1, editDepartment.getDeptId());&lt;br /&gt;            pStmt.setString(2, editDepartment.getDeptName());&lt;br /&gt;            pStmt.setInt(3, editDepartment.getMgrId());&lt;br /&gt;            pStmt.setInt(4, editDepartment.getLocId());&lt;br /&gt;            pStmt.execute();&lt;br /&gt;            conn.commit();&lt;br /&gt;            result = true;&lt;br /&gt;        } catch (SQLException e) {&lt;br /&gt;            System.err.println(e.getMessage());&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            System.err.println(e.getMessage());&lt;br /&gt;        }&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "AddDepartment",&lt;br /&gt;                  "Exiting AddDepartmentToDB");&lt;br /&gt;        return result;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    /**&lt;br /&gt;     * Method will call the AddDepartmentToDB&lt;br /&gt;     * Call PropertyChangeSupport listener to push data changes to the UI&lt;br /&gt;     */&lt;br /&gt;    public void saveDepartment() {&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "saveDepartment",&lt;br /&gt;                  "Coming inside saveDepartment");&lt;br /&gt;        if (AddDepartmentToDB()) {&lt;br /&gt;            Department newDepartment = new Department(editDepartment);&lt;br /&gt;            s_departments.add(0, newDepartment);&lt;br /&gt;            providerChangeSupport.fireProviderCreate("departments", newDepartment.getKey(), newDepartment);&lt;br /&gt;        }&lt;br /&gt;        Trace.log(Utility.ApplicationLogger, Level.INFO, DepartmentList.class, "saveDepartment",&lt;br /&gt;                  "Exiting saveDepartment");&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setEditDepartment(Department editDepartment) {&lt;br /&gt;        this.editDepartment = editDepartment;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Department getEditDepartment() {&lt;br /&gt;        return editDepartment;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;i&gt;Note:- Import Error might be showing in DepartmentList java, in viewController project properties-&amp;gt;Dependencies add the ApplicationContoller.jpr&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;In ViewController project. Locate and expand the Application Sources folder, then expand the META-INF folder. You will see the adfmf-feature.xml file, click on the adfmf-feature.xml file to launch the Feature editor. Add a new feature by clicking the green plus sign on the Features table near top of the editor this will&amp;nbsp;launch&amp;nbsp;the new Create ADF Mobile Feature dialog, modify the values as shown below.&lt;br /&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://2.bp.blogspot.com/-fKiUciSApdM/UQDqb5m6YMI/AAAAAAAACco/CTsGI-ff9s0/s1600/MobileCreateRow-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="118" src="http://2.bp.blogspot.com/-fKiUciSApdM/UQDqb5m6YMI/AAAAAAAACco/CTsGI-ff9s0/s400/MobileCreateRow-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Features table, select the newly created feature Departments. Under the Features table, click the Content tab, and locate the Content table. Notice that the content item Departments.1 is created by default. Next add a new file by clicking the green plus sign and select taskflow option, this will launch the new Create ADF Mobile Task Flow dialog, modify the value as shown 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/-2eJ0rUJSob4/UQDtvOfRPpI/AAAAAAAACdE/T4W1ag6osYU/s1600/MobileCreateRow-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="142" src="http://1.bp.blogspot.com/-2eJ0rUJSob4/UQDtvOfRPpI/AAAAAAAACdE/T4W1ag6osYU/s400/MobileCreateRow-2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on the DepartmentsTaskflow.xml to open the file in taskflow editor and follow the below steps.&lt;br /&gt;1) Create views and name them as deptList and editDept respectively.&lt;br /&gt;2) Draw the control flow case from deptList to editDept and Outcome as "add", Behavior-&amp;gt;Transition as "flipRight".&lt;br /&gt;3) Draw the control flow case from editDept to deptList and Outcome as "list", Behavior-&amp;gt;Transition as "slideRight".&lt;br /&gt;&lt;br /&gt;Double click on deptList view will launch Create ADF Mobile AMX Page dialog, in page facets select Header and Secondary Action. Open the deptList.amx page and go to page bindings, in Bindings section click on create control binding and select methodAction item. In create action binding wizard select DepartmentList-&amp;gt;AddDepartment&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/-w_Rb_D2T5E8/UQD7GwLxelI/AAAAAAAACdg/JxmLL7SgGWI/s1600/MobileCreateRow-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://4.bp.blogspot.com/-w_Rb_D2T5E8/UQD7GwLxelI/AAAAAAAACdg/JxmLL7SgGWI/s400/MobileCreateRow-3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Go to source tab and follow the below steps:&lt;br /&gt;1) In Header facet,&amp;nbsp;amx:outputText set the value as "Dept List"&lt;br /&gt;2) In Seconday Action facet, for amx:commandButton modify the values&lt;br /&gt;&amp;nbsp; &amp;nbsp; text: Add, action: add, actionListener: #{bindings.AddDepartment.execute}&lt;br /&gt;3) From DC palette drag and drop departments-&amp;gt;ADF Mobile List View and select the default options&lt;br /&gt;&lt;br /&gt;Double click on editDept view will launch Create ADF Mobile AMX Page dialog, in page facets select Header, Primary Action and Secondary Action. Open the deptList.amx page and go to page bindings, in Bindings section click on create control binding and select methodAction item. In create action binding wizard select DepartmentList-&amp;gt;saveDepartment&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/-VB3GBc6Fi4o/UQD-pEM5HVI/AAAAAAAACeA/xYeVHMagpps/s1600/MobileCreateRow-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://3.bp.blogspot.com/-VB3GBc6Fi4o/UQD-pEM5HVI/AAAAAAAACeA/xYeVHMagpps/s400/MobileCreateRow-5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Go to source tab and follow the below steps:&lt;br /&gt;1) In Header facet,&amp;nbsp;amx:outputText set the value as "Add Dept"&lt;br /&gt;2) In Primary Action facet, for amx:commandButton modify the values&lt;br /&gt;&amp;nbsp; &amp;nbsp; text:Cancel, action:_back&lt;br /&gt;3) In Seconday Action facet, for amx:commandButton modify the values&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;text: Save, action: _back, actionListener: #{bindings.saveDepartment.execute}&lt;br /&gt;4) &amp;nbsp;From DC palette drag and drop editDepartments-&amp;gt;Form as ADF Mobile form, In Edit Form fields delete "key" value binding&lt;br /&gt;&lt;br /&gt;Preview of the deptList.amx and editDept.amx will looks like below.&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/-jIK8MS3Glz0/UQEBdLqjeCI/AAAAAAAACeg/nejfYoDsRCI/s1600/MobileCreateRow-preview.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="302" src="http://4.bp.blogspot.com/-jIK8MS3Glz0/UQEBdLqjeCI/AAAAAAAACeg/nejfYoDsRCI/s400/MobileCreateRow-preview.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now last configuration, in Application Resources palette expand&amp;nbsp;Descriptor-&amp;gt;ADF META-INF. You will see the adfmf-application.xml, click on the adfmf-application.xml file to launch the&amp;nbsp;adfmf-application&amp;nbsp;editor. In Application section for Lifecycle Event Listener set as &lt;b&gt;"application.LifeCycleListenerImpl"&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Make sure the below Libraries and Classpath present in the ViewController project.&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/-M5JCZZGlS8M/UQEpO_EArtI/AAAAAAAAChQ/uF7QrlWT2E8/s1600/MobileCreateRow-classpath.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="322" src="http://4.bp.blogspot.com/-M5JCZZGlS8M/UQEpO_EArtI/AAAAAAAAChQ/uF7QrlWT2E8/s400/MobileCreateRow-classpath.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Application menu, select Deploy - New Deployment Profile to start the Create Deployment Profile dialog box.&amp;nbsp;In the Profile Type drop-down list, ensure ADF Mobile for Android/IOS is selected and then click OK.&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/-HiNAvePoVn0/UQEFrMVlBzI/AAAAAAAACfA/pNGTsz1cTGY/s1600/MobileCreateRow-DeploymentProfile.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="193" src="http://1.bp.blogspot.com/-HiNAvePoVn0/UQEFrMVlBzI/AAAAAAAACfA/pNGTsz1cTGY/s400/MobileCreateRow-DeploymentProfile.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the ADF Mobile for Android Deployment Profile Properties dialog box, Select the Android Options node and confirm your values look like the ones below.&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/-fXOiQ9Myj6A/UQEGNemxbUI/AAAAAAAACfI/nW883i6bOhc/s1600/MobileCreateRow-BuildMode.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="271" src="http://4.bp.blogspot.com/-fXOiQ9Myj6A/UQEGNemxbUI/AAAAAAAACfI/nW883i6bOhc/s400/MobileCreateRow-BuildMode.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the Application menu, select Deploy - New Deployment deployment profile. In the subsequent dialog box, select Deploy application to device/emulator/package, and click Finish.&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/-2nR0U6UzvsU/UQEGsf3iHzI/AAAAAAAACfQ/GQRnOZ7Qw24/s1600/MobileCreateRow-emulator.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="298" src="http://3.bp.blogspot.com/-2nR0U6UzvsU/UQEGsf3iHzI/AAAAAAAACfQ/GQRnOZ7Qw24/s400/MobileCreateRow-emulator.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;span style="color: #1a1818; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;span style="color: #1a1818; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;Watch the&amp;nbsp;&lt;/span&gt;&lt;span class="gui-object" style="color: #1a1818; font-family: Arial, Helvetica, sans-serif; font-size: 13px; font-weight: bold;"&gt;Deployment Log&lt;/span&gt;&lt;span style="color: #1a1818; font-family: Arial, Helvetica, sans-serif; font-size: 13px;"&gt;&amp;nbsp;window for any errors.&lt;/span&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/01/adf-mobile-access-device-native-sqlite.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-hjDlt_CUars/UQEbUV0OvBI/AAAAAAAACgg/ZwIkjqJisTw/s72-c/MobileCreateRow-DeptList.png' height='72' width='72'/><thr:total>12</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-779229286440351788</guid><pubDate>Thu, 17 Jan 2013 17:57:00 +0000</pubDate><atom:updated>2013-01-17T10:04:14.475-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>EJB</category><category domain='http://www.blogger.com/atom/ns#'>SessionFacade</category><category domain='http://www.blogger.com/atom/ns#'>Entities</category><category domain='http://www.blogger.com/atom/ns#'>BackingBean</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>EJB DataControl</category><title> EJB DC - Deleting Multi-Selected Rows From Adf Table</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Let us take a scenario where in users wants to delete multiple records in the ADF table. In EJB this can't be achieved in straight forward way, we have to manually get all the selected row keys and delete the rows data using E&lt;a href="http://docs.oracle.com/javaee/6/api/javax/persistence/EntityManager.html" target="_blank"&gt;ntityManager AP&lt;/a&gt;I.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/DeleteEJBApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.3.0 + HR Schema]&lt;br /&gt;&lt;br /&gt;You can also look at &amp;nbsp;how to&amp;nbsp;achieve in this article link&amp;nbsp;"&lt;a href="http://deepakcs.blogspot.in/2012/05/update-multiple-rows-using-ejb-data.html" target="_blank"&gt;Update multiple rows using EJB Data Control&lt;/a&gt;".&lt;br /&gt;&lt;br /&gt;&lt;u&gt;&lt;b&gt;Implementation Steps&lt;/b&gt;&lt;/u&gt;&lt;br /&gt;&lt;br /&gt;Create Fusion Web Application with entity based on Departments, then create a stateless session bean and add the below method. Expose the method to local/remote interface and generate data control.&lt;br /&gt;&lt;br /&gt;&lt;i style="background-color: white; font-family: Arial, Tahoma, Helvetica, FreeSans, sans-serif; font-size: 13px; line-height: 18px;"&gt;Note:- Here in the below code "em" is a EntityManager.&lt;/i&gt;&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;/**&lt;br /&gt;* Here param deptList will be having the selected row.&lt;br /&gt;* Iterating through the deptList and find the depratments object instance by primary key&lt;br /&gt;* Delete the data using entity manager api&lt;br /&gt;* @param deptList&lt;br /&gt;*/&lt;br /&gt;public void deleteMultipleDeptRows(List deptList) {&lt;br /&gt;	if (deptList.size() &amp;gt; 0) {&lt;br /&gt;		Iterator iter = deptList.iterator();&lt;br /&gt;		while (iter.hasNext()) {&lt;br /&gt;			HashMap map = (HashMap)iter.next();&lt;br /&gt;			//Finding the departments object instance&lt;br /&gt;			Departments departments = em.find(Departments.class, map.get("departmentId"));&lt;br /&gt;			em.remove(departments);&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create index.jspx page and drag and drop departmentsFindAll-&amp;gt;Table as ADF Table. and create the backingBean as "IndexBean". Surround the table with panel collection, add the toolbar, drop button inside toolbar and name as "Delete Multiple Rows".&lt;br /&gt;&lt;br /&gt;Bind the departments table to the backing bean as show 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/-yWvmf_liMb8/UPg4IHXodpI/AAAAAAAACbY/5fmjYk0LTUc/s1600/DeleteMultipleRowsApp-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="http://1.bp.blogspot.com/-yWvmf_liMb8/UPg4IHXodpI/AAAAAAAACbY/5fmjYk0LTUc/s400/DeleteMultipleRowsApp-3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Create the ActionListener method called "deleteAction" for save 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/-fWxt0zcG3M4/UPg4U6eCSbI/AAAAAAAACbg/PyUOHZk1s_c/s1600/DeleteMultipleRowsApp-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="153" src="http://4.bp.blogspot.com/-fWxt0zcG3M4/UPg4U6eCSbI/AAAAAAAACbg/PyUOHZk1s_c/s400/DeleteMultipleRowsApp-4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Open the IndexBean backing bean and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public void deleteAction(ActionEvent actionEvent) {&lt;br /&gt;	RowKeySet selectedDepts = getDeptTable().getSelectedRowKeys();&lt;br /&gt;	Iterator selectedDeptIter = selectedDepts.iterator();&lt;br /&gt;	DCBindingContainer bindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt;	DCIteratorBinding deptIter = bindings.findIteratorBinding("departmentsFindAllIterator");&lt;br /&gt;	RowSetIterator deptRSIter = deptIter.getRowSetIterator();&lt;br /&gt;	List deptList = new ArrayList();&lt;br /&gt;	while (selectedDeptIter.hasNext()) {&lt;br /&gt;		Key key = (Key)((List)selectedDeptIter.next()).get(0);&lt;br /&gt;		Row currentRow = deptRSIter.getRow(key);&lt;br /&gt;&lt;br /&gt;		HashMap rowValues = new HashMap();&lt;br /&gt;		rowValues.put("departmentId", currentRow.getAttribute("departmentId"));&lt;br /&gt;		deptList.add(rowValues);&lt;br /&gt;	}&lt;br /&gt;	//Execute the deleteMultipleDeptRows method by passing deptList param&lt;br /&gt;	OperationBinding oper = bindings.getOperationBinding("deleteMultipleDeptRows");&lt;br /&gt;	oper.getParamsMap().put("deptList", deptList);&lt;br /&gt;	oper.execute();&lt;br /&gt;	deptIter.executeQuery();&lt;br /&gt;	//Refresh the table&lt;br /&gt;	AdfFacesContext.getCurrentInstance().addPartialTarget(this.getDeptTable());&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Go to Bindings tab in index.jspx page and add deleteMultipleDeptRows method action.&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/-J1NfEWTl-mM/UPg5MTLO8CI/AAAAAAAACbs/1U3gE5mPtuA/s1600/DeleteMultipleRowsApp-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="386" src="http://1.bp.blogspot.com/-J1NfEWTl-mM/UPg5MTLO8CI/AAAAAAAACbs/1U3gE5mPtuA/s400/DeleteMultipleRowsApp-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Run the index.jspx page, select the multiple rows and clicking on "Delete Multiple Rows" button should delete the multiple records from the database.&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/-XYWPP3teFVw/UPg5ld2XgXI/AAAAAAAACcI/OWIV3ckzzT8/s1600/DeleteMultipleRowsApp-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://2.bp.blogspot.com/-XYWPP3teFVw/UPg5ld2XgXI/AAAAAAAACcI/OWIV3ckzzT8/s400/DeleteMultipleRowsApp-2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/01/ejb-dc-deleting-multi-selected-rows.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-yWvmf_liMb8/UPg4IHXodpI/AAAAAAAACbY/5fmjYk0LTUc/s72-c/DeleteMultipleRowsApp-3.png' height='72' width='72'/><thr:total>1</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-1508647238669760891</guid><pubDate>Wed, 16 Jan 2013 16:17:00 +0000</pubDate><atom:updated>2013-01-16T08:17:12.505-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Bindings</category><category domain='http://www.blogger.com/atom/ns#'>ADF Form</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>BC4J</category><title>Create ADF Input Form Without First Displaying Existing Records</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;You can create a form that allows a user to enter information for a new record and then commit that record into the data source. While you can choose to use the default ADF Form and then drop the Create operation as a command button, when this type of form is first rendered, it displays the data for the first instance in the collection.&lt;br /&gt;&lt;br /&gt;The ADF Creation form allows users to create new instances in the collection without first displaying existing instances, this scenario might be very simple but the new developers find difficulty in creating empty ADF Input Form when page loads for the first time.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/ADFInputFormApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;.&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.2.0 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation&amp;nbsp;Steps:-&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create Fusion web application with Business Components from Tables based on Department table. In view controller project create a jspx page then drag and drop DepartmentsView1-&amp;gt;Form as ADF Form as shown in below image.&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/-ZtQbhRqqxAA/UPbCsOPMEhI/AAAAAAAACZE/jEfRJgO3awI/s1600/ADFInputForm-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://1.bp.blogspot.com/-ZtQbhRqqxAA/UPbCsOPMEhI/AAAAAAAACZE/jEfRJgO3awI/s400/ADFInputForm-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Go to page bindings, in Bindings section click on create control binding and select action item. In create action binding wizard select AppModuleDataControl-&amp;gt;DepartmentsView1-&amp;gt;Operation-&amp;gt;createInsert.&lt;br /&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://4.bp.blogspot.com/-CvCzkvBuBEw/UPbMJV3L9II/AAAAAAAACa8/nObMy6I_dMw/s1600/ADFInputForm-2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="388" src="http://4.bp.blogspot.com/-CvCzkvBuBEw/UPbMJV3L9II/AAAAAAAACa8/nObMy6I_dMw/s400/ADFInputForm-2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;In Executables section click in create executables Binding and select invokeAction item. In Insert invokeAction wizard and&amp;nbsp;&lt;span style="background-color: white;"&gt;follow as shown in below image.&lt;/span&gt;&lt;br /&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://4.bp.blogspot.com/-TZ43W3WywUE/UPbGBA--g2I/AAAAAAAACZs/16KroRWhMgI/s1600/ADFInputForm-3.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="156" src="http://4.bp.blogspot.com/-TZ43W3WywUE/UPbGBA--g2I/AAAAAAAACZs/16KroRWhMgI/s400/ADFInputForm-3.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Edit the invokeCreateInsert and set the refresh to renderModel because when ever the page loaded this will execute the createInsert operation by inserting the empty record in the collection.&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://3.bp.blogspot.com/-kKulfcIJWdM/UPbHb2u_CaI/AAAAAAAACag/ukZvGpZkJb4/s1600/ADFInputForm-4.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="247" src="http://3.bp.blogspot.com/-kKulfcIJWdM/UPbHb2u_CaI/AAAAAAAACag/ukZvGpZkJb4/s400/ADFInputForm-4.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Run the jspx page and the web page will loaded with empty record.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-HPYT3Zu--NE/UPbHUw3H_qI/AAAAAAAACaY/XFE0-B_QnB4/s1600/ADFInputForm-5.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="117" src="http://4.bp.blogspot.com/-HPYT3Zu--NE/UPbHUw3H_qI/AAAAAAAACaY/XFE0-B_QnB4/s400/ADFInputForm-5.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2013/01/create-adf-input-form-without-first.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-ZtQbhRqqxAA/UPbCsOPMEhI/AAAAAAAACZE/jEfRJgO3awI/s72-c/ADFInputForm-1.png' height='72' width='72'/><thr:total>8</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-2534679442548816176</guid><pubDate>Tue, 11 Dec 2012 10:29:00 +0000</pubDate><atom:updated>2012-12-11T02:29:55.011-08:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>JavaClient</category><category domain='http://www.blogger.com/atom/ns#'>Solr</category><category domain='http://www.blogger.com/atom/ns#'>SessionFacade</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>Tomcat</category><category domain='http://www.blogger.com/atom/ns#'>SolrJ</category><category domain='http://www.blogger.com/atom/ns#'>Apache</category><title>Solr Search integration with ADF Faces - Part 1</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;a href="http://lucene.apache.org/solr/" target="_blank"&gt;Solr&lt;/a&gt; is the popular, blazing fast open source enterprise search platform from the Apache Lucene project. Its major features include powerful full-text search, hit highlighting, faceted search, dynamic clustering, database integration, rich document (e.g., Word, PDF) handling, and geospatial search.&lt;br /&gt;&lt;br /&gt;Here why I'm trying to integrate Solr search with ADF Faces is, take a scenario where we need to build an EBook application having large data set. Each book may consists some 200 pages, If user wants to search some content inside the book or in cross books. It's very difficult to search in which page of the book the content exits and more over it will be overhead on DB server. By using Solr we can avoid this and do content indexing and do full-text also.&lt;br /&gt;&lt;br /&gt;In Part 1, will learn on how to do content indexing. In my next post - Part 2, I will show how full-text search can be integrated with ADF application. Follow the article to &lt;a href="http://www.munsplace.com/blog/2012/02/20/installing-solr-on-windows-7-x64/" target="_blank"&gt;install Solr server n windows&lt;/a&gt;, I have installed the Apache Solr 4.0 version, after the complete installation of jdk, tomcat, solr we can see the screen as follows, click on the collection1 schema and notice Num Docs will be 0.&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/-Z0t6Me_D3io/UMHake0kzII/AAAAAAAACYQ/_YalBW2sBJY/s1600/solr-homepage.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="162" src="http://3.bp.blogspot.com/-Z0t6Me_D3io/UMHake0kzII/AAAAAAAACYQ/_YalBW2sBJY/s400/solr-homepage.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Next download the &lt;a href="https://wiki.apache.org/solr/Solrj" target="_blank"&gt;SolrJ&lt;/a&gt; version 4.0, Solrj is a java client to access solr. It offers a java interface to add, update, and query the solr index.&lt;br /&gt;&lt;br /&gt;Model Diagram: Download the &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/SolrSampleTables.sql" target="_blank"&gt;sql&lt;/a&gt;&amp;nbsp;script.&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/-3t4OYKqOSOQ/UMHTNdWetzI/AAAAAAAACXs/1bqN7jK5hV4/s1600/solr-model.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="127" src="http://2.bp.blogspot.com/-3t4OYKqOSOQ/UMHTNdWetzI/AAAAAAAACXs/1bqN7jK5hV4/s320/solr-model.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Next is to add the fields that will be indexed in Solr server, open the&amp;nbsp;C:\solr\collection1\conf\schema.xml and alert the schema file by adding the below fields under &amp;lt;fields&amp;gt; tag. Before adding below fields shutdown the tomcat server.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-b5gMA7lcVFo/UMHdobxIKYI/AAAAAAAACYg/uek0to_t_ys/s1600/solr-schema-tags.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" src="http://4.bp.blogspot.com/-b5gMA7lcVFo/UMHdobxIKYI/AAAAAAAACYg/uek0to_t_ys/s400/solr-schema-tags.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;Notice few fields will be already there, so add only missing fields then start the tomcat server and try to access the Solr admin. If the page doesn't load properly then schema file has some issue.&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: left;"&gt;&lt;br /&gt;&lt;/div&gt;Create Fusion Web Application with entities based on category and product tables. Create a session bean and java client, add the following jar in "Project Properties-&amp;gt;&amp;nbsp;Libraries and ClassPath":&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;apache-solr-solrj-4.0.0&lt;/li&gt;&lt;li&gt;commons-codec-1.3&lt;/li&gt;&lt;li&gt;commons-httpclient-3.1&lt;/li&gt;&lt;li&gt;commons-io-2.1&lt;/li&gt;&lt;li&gt;jcl-over-slf4j-1.6.4&lt;/li&gt;&lt;li&gt;slf4j-api-1.6.4&lt;/li&gt;&lt;li&gt;slf4j-jdk14-1.6.4&lt;/li&gt;&lt;li&gt;solr-solrj-1.4.0&lt;/li&gt;&lt;/ul&gt;&lt;div&gt;All the above jar will be present in downloaded "apache-solr-4.0.0\dist\solrj-lib" directory, if you can't find all jar. You can download from the &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/SolrTar.zip" target="_blank"&gt;link&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div&gt;Open the Java Client, add the below code.&lt;/div&gt;&lt;div&gt;&lt;pre style="background-color: #fbfbfb; border: 1px solid rgb(206, 206, 206); height: 250px; min-height: 70px; overflow: auto; padding: 5px; width: 590px;"&gt;private static void printProduct(Product product) throws MalformedURLException, SolrServerException, IOException {&lt;br /&gt;        //Ip address is hard corded, where the Solr server is installed&lt;br /&gt;        SolrServer server = new CommonsHttpSolrServer("http://10.177.252.178:8080/solr");&lt;br /&gt;        SolrInputDocument doc = new SolrInputDocument();&lt;br /&gt;        doc.addField("id", product.getId());&lt;br /&gt;        doc.addField("title", product.getTitle());&lt;br /&gt;        doc.addField("category", product.getCategoryRef().getName());&lt;br /&gt;        doc.addField("productby", product.getProductBy());&lt;br /&gt;        doc.addField("price", product.getPrice());&lt;br /&gt;        doc.addField("description", product.getDescription());&lt;br /&gt;        String features = product.getFeatures().replaceAll(";", " ");&lt;br /&gt;        doc.addField("features", features);&lt;br /&gt;        System.out.println("Content Indexing Started for Id " + product.getId());&lt;br /&gt;        server.add(doc);&lt;br /&gt;        server.commit();&lt;br /&gt;        System.out.println("Content Indexing Completed for Id " + product.getId());&lt;br /&gt;    }&lt;/pre&gt;&lt;/div&gt;&lt;br /&gt;Run the java client, all the records will get indexed into solr server. Now we can see on Solr admin homepage for collection1 schema 40 doc are added.&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/-5O7UCgzCDEk/UMHbbJqqDPI/AAAAAAAACYY/RB-WzAXig2U/s1600/solr-indexed.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="165" src="http://3.bp.blogspot.com/-5O7UCgzCDEk/UMHbbJqqDPI/AAAAAAAACYY/RB-WzAXig2U/s400/solr-indexed.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/12/solr-search-integration-with-adf-faces.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Z0t6Me_D3io/UMHake0kzII/AAAAAAAACYQ/_YalBW2sBJY/s72-c/solr-homepage.png' height='72' width='72'/><thr:total>2</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-9168603789492827805</guid><pubDate>Wed, 26 Sep 2012 06:26:00 +0000</pubDate><atom:updated>2012-09-27T21:51:17.635-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Oracle ADF Essentials</category><title>Oracle ADF Essentials - Faster and Simpler Java-based Application Development - Now Free </title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;i&gt;&lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/overview/adfessentialsfaq-1837249.pdf" target="_blank"&gt;Oracle ADF Essentials&lt;/a&gt; is an end-to-end Java EE framework that simplifies   application development by providing out-of-the-box infrastructure   services and a visual and declarative development experience. Oracle ADF  Essentials is free to develop and deploy.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;i&gt;More detail go through the &lt;a href="http://www.oracle.com/technetwork/developer-tools/adf/overview/adfessentials-1719844.html" target="_blank"&gt;link&lt;/a&gt;. &lt;/i&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/09/oracle-adf-essentials-faster-and.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5191049092422265771</guid><pubDate>Thu, 20 Sep 2012 14:02:00 +0000</pubDate><atom:updated>2012-09-26T07:08:53.215-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>JNDI</category><category domain='http://www.blogger.com/atom/ns#'>EJB</category><category domain='http://www.blogger.com/atom/ns#'>Glassfish</category><category domain='http://www.blogger.com/atom/ns#'>JPA</category><category domain='http://www.blogger.com/atom/ns#'>BC4J</category><title>Deploy BC4J/EJB application to GlassFish Server</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Now deploying the ADF Faces application to the Glassfish server has become easy, users can directly &amp;nbsp;deploy the application from JDeveloper itself. Deploying the ADF Faces application to the Glassfish server directly runs with Oracle JDeveloper 11.1.2.3.0 onwards.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note:- If application has model part then first configure JNDI DataSource, In my previous article I have explained how to "&lt;a href="http://deepakcs.blogspot.in/2012/08/configure-jndi-datasource-for-oracledb.html" target="_blank"&gt;Configure JNDI DataSource for OracleDB in GlassFish Server&lt;/a&gt;".&amp;nbsp;&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Implementation Steps for BC4J Application:- &lt;/b&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Create a fusion web application.&lt;/li&gt;&lt;li&gt;Goto the ViewController project, right click and select project properties. In Project properties wizard select Deployment and edit the WAR deployment profile.&lt;/li&gt;&lt;li&gt;In Platform selection choose Default Platform as "Glassfish 3.1". &lt;/li&gt;&lt;li&gt;Next go to Application, right click and select project properties. In Project properties wizard select Deployment and edit the EAR deployment profile and in Platform selection choose Default Platform as "Glassfish 3.1".&lt;/li&gt;&lt;li&gt;Open AppModule.xml file and select Configurations tab.&lt;/li&gt;&lt;li&gt;Edit AppModuleLocal and modify the DataSource Name from "java:comp/env/jdbc/OracleDS" to "jdbc/OracleDS"&lt;/li&gt;&lt;li&gt;Create Application Server Connection to Glassfish server.&lt;/li&gt;&lt;li&gt;Select application, deploy the EAR file directly to the Glassfish server.&lt;/li&gt;&lt;/ol&gt;&lt;i&gt;Note: - Above Default Platform determines the platform-specific behavior when packaging the archive for deployment to an Application Server.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Implementation Steps for EJB/JPA Application:- &lt;/b&gt;&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;Create a fusion web application.&lt;/li&gt;&lt;li&gt;Goto the Model project,  right click and select project properties. In  Project properties wizard select Deployment and edit the JAR deployment  profile and in Platform selection choose Default Platform as "Glassfish 3.1". &lt;/li&gt;&lt;li&gt;Goto the ViewController project, right click and select project properties. In  Project properties wizard select Deployment and edit the WAR deployment  profile and in Platform selection choose Default Platform as "Glassfish 3.1". &lt;/li&gt;&lt;li&gt;Next go to Application, right click and select project properties. In  Project properties wizard select Deployment and edit the EAR deployment  profile and in Platform selection choose Default Platform as "Glassfish 3.1".&lt;/li&gt;&lt;li&gt;Open persistence.xml file and select Model-&amp;gt;Persistence Unit-&amp;gt;Connection tab.&lt;/li&gt;&lt;li&gt;In General selection, in JTA DataSource modify "java:/app/jdbc/jdbc/OracleDS" to "jdbc/OracleDS"&lt;/li&gt;&lt;li&gt;In JTA Properties selection, in JTA DataSource Property modify "java:/app/jdbc/jdbc/OracleDS" to "jdbc/OracleDS"&lt;/li&gt;&lt;li&gt;Application like EJB which requires jndi lookup's, we have to change the initial context factory class name. Open the DataControls.dcx file, In ejb-definition tag modify the initial-context-factory class name from "weblogic.jndi.WLInitialContextFactory" to "com.sun.enterprise.naming.SerialInitContextFactory"&lt;/li&gt;&lt;li&gt;Create Application Server Connection to Glassfish server.&lt;/li&gt;&lt;li&gt;Select application, deploy the EAR file directly to the Glassfish server.&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/09/deploy-bc4jejb-application-to-glassfish.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5309232856857787263</guid><pubDate>Tue, 04 Sep 2012 09:39:00 +0000</pubDate><atom:updated>2012-09-04T02:39:06.372-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>Inheritance</category><category domain='http://www.blogger.com/atom/ns#'>EJB</category><category domain='http://www.blogger.com/atom/ns#'>Entities</category><category domain='http://www.blogger.com/atom/ns#'>EJB DataControl</category><category domain='http://www.blogger.com/atom/ns#'>SingleTable</category><category domain='http://www.blogger.com/atom/ns#'>JPA</category><title>EJB DataControl - JPA Single Table Inheritance</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;JPA supports three types of inheritance, In this article will try &lt;i&gt;"single table inheritance using EJB datacontrol". &lt;/i&gt;For more information on JPA inheritance go through the &lt;a href="http://openjpa.apache.org/builds/1.0.4/apache-openjpa-1.0.4/docs/manual/jpa_overview_mapping_inher.html" target="_blank"&gt;link&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;In single table inheritance, a single table is used to store all of the instances of the entire inheritance hierarchy. The table will have a column for every attribute of every class in the hierarchy. A discriminator column is used to determine which class the particular row belongs to, each class in the hierarchy defines its own unique discriminator value. &lt;br /&gt;&lt;br /&gt;Table Structure: -&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/-3WDl5wV499c/UEGKM7ifZII/AAAAAAAACWA/Rw2bdcZwoLo/s1600/JPAST-Table.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://1.bp.blogspot.com/-3WDl5wV499c/UEGKM7ifZII/AAAAAAAACWA/Rw2bdcZwoLo/s200/JPAST-Table.png" width="200" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Model Diagram:-&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-z5AavWISEIU/UEGKjx9b3RI/AAAAAAAACWI/6YtyTErzn2Q/s1600/JPAST-Entity.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="275" src="http://1.bp.blogspot.com/-z5AavWISEIU/UEGKjx9b3RI/AAAAAAAACWI/6YtyTErzn2Q/s400/JPAST-Entity.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the above example the&amp;nbsp;discriminator column (SEX) is added to the table to distinguish between the Men and Women instances.&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/JPASingleTableApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.2.0 + HR Schema]&lt;br /&gt;&lt;i&gt;Note: -&lt;/i&gt;&amp;nbsp;&lt;i&gt;You can find the sql file in application JPASingleTableApp/etc/ folde&lt;/i&gt;r&lt;br /&gt;&lt;br /&gt;Implementation&amp;nbsp;Steps:-&lt;br /&gt;&lt;br /&gt;Lets create a Fusion Web Application with Entities based on Person, edit the Person.java entity and remove the menAttr, womenAttr attributes. &amp;nbsp;Add the below annotation in Person entity.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border: 1px solid rgb(206, 206, 206); height: 50px; min-height: 70px; overflow: auto; padding: 5px; width: 580px;"&gt;@Table(name="PERSON")&lt;br /&gt;@Inheritance(strategy=InheritanceType.SINGLE_TABLE)&lt;br /&gt;@DiscriminatorColumn(name="SEX", discriminatorType=DiscriminatorType.STRING,length=1)&lt;/pre&gt;&lt;br /&gt;Create an entity Men by extending the Person and add the below code.&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border: 1px solid rgb(206, 206, 206); height: 50px; min-height: 180px; overflow: auto; padding: 5px; width: 580px;"&gt;@Entity&lt;br /&gt;@Table(name = "PERSON")&lt;br /&gt;@DiscriminatorValue("M")&lt;br /&gt;@NamedQueries( { @NamedQuery(name = "Men.findAll", query = "select o from Men o") })&lt;br /&gt;public class Men extends Person implements Serializable {&lt;br /&gt;    @Column(name = "MEN_ATTR")&lt;br /&gt;    private String menAttr;&lt;br /&gt;&lt;br /&gt;    public Men() {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getMenAttr() {&lt;br /&gt;        return menAttr;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setMenAttr(String menAttr) {&lt;br /&gt;        this.menAttr = menAttr;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Create an entity Women by extending the Person and add the below code.&lt;br /&gt;&lt;pre style="background-color: #fbfbfb; border: 1px solid rgb(206, 206, 206); height: 50px; min-height: 180px; overflow: auto; padding: 5px; width: 580px;"&gt;@Entity&lt;br /&gt;@Table(name = "PERSON")&lt;br /&gt;@DiscriminatorValue("W")&lt;br /&gt;@NamedQueries( { @NamedQuery(name = "Women.findAll", query = "select o from Women o") })&lt;br /&gt;public class Women extends Person implements Serializable {&lt;br /&gt;    @Column(name = "WOMEN_ATTR")&lt;br /&gt;    private String womenAttr;&lt;br /&gt;&lt;br /&gt;    public Women() {&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getWomenAttr() {&lt;br /&gt;        return womenAttr;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setWomenAttr(String womenAttr) {&lt;br /&gt;        this.womenAttr = womenAttr;&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Next create a Session Bean and data control for the Session Bean and in ViewController project create a jspx page and drop menFindAll, womenFindAll as separate Table-&amp;gt;ADF Read only Table. Run the jspx page and web page will be displayed as shown in below image, table bound to menFindAll should display only men records and table bound to womenFindAll should display only women records.&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/-ZtpB6GRrU6U/UEGQRer-ZSI/AAAAAAAACWk/u1uHWnACGqg/s1600/JPAST-result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="171" src="http://4.bp.blogspot.com/-ZtpB6GRrU6U/UEGQRer-ZSI/AAAAAAAACWk/u1uHWnACGqg/s400/JPAST-result.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/09/ejb-datacontrol-jpa-single-table.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-3WDl5wV499c/UEGKM7ifZII/AAAAAAAACWA/Rw2bdcZwoLo/s72-c/JPAST-Table.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-5380715342519687008</guid><pubDate>Thu, 30 Aug 2012 10:36:00 +0000</pubDate><atom:updated>2012-08-30T03:36:20.772-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>DataSource</category><category domain='http://www.blogger.com/atom/ns#'>JNDI</category><category domain='http://www.blogger.com/atom/ns#'>OracleDB</category><category domain='http://www.blogger.com/atom/ns#'>Glassfish</category><title>Configure JNDI DataSource for OracleDB in GlassFish Server</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;i&gt;In this article will see how to "Configure JNDI DataSource for Oracle in GlassFish 3.2 Server".&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;Login to Glassfish admin console in browser window, Once its open, in the left-hand side panel under Resources, click on JDBC and then JDBC Connection Pools. In the right hand-side click on new button will open the "New JDBC Connection Pool" window, enter the details as shown in below image.&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/-Y4lZhqCuPcs/UD85vGriGiI/AAAAAAAACUw/r4Ktwo9bQnA/s1600/ODS-ConnPool.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://1.bp.blogspot.com/-Y4lZhqCuPcs/UD85vGriGiI/AAAAAAAACUw/r4Ktwo9bQnA/s400/ODS-ConnPool.png" width="400" /&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;i&gt;Note: To store, organize, and retrieve data, most applications use relational databases. Java EE applications access relational databases through the JDBC API. Before an application can access a database, it must get a connection. JDBC resources provide applications with a means to connect to a database.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;Clicking on Next button will display as shown in below image.&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/-5ZQTrSbOkl8/UD891URCU4I/AAAAAAAACVM/5wXb-R10lxs/s1600/ODS-ConnPoolStep2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="242" src="http://3.bp.blogspot.com/-5ZQTrSbOkl8/UD891URCU4I/AAAAAAAACVM/5wXb-R10lxs/s400/ODS-ConnPoolStep2.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In same "New JDBC Connection Pool" window, in Additional Property section add the properties details as shown in below image.&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/-ui5FUpdpAY0/UD8-twgfSoI/AAAAAAAACVU/9eCrFncYq9E/s1600/ODS-additionalProp.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://2.bp.blogspot.com/-ui5FUpdpAY0/UD8-twgfSoI/AAAAAAAACVU/9eCrFncYq9E/s400/ODS-additionalProp.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Click on ping to test if the pool is created successfully. If not successful, check all the properties again.&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/-W49lZopYLbI/UD8_TOSJKEI/AAAAAAAACVc/OzHMul81UAQ/s1600/ODS-pingStatus.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="90" src="http://3.bp.blogspot.com/-W49lZopYLbI/UD8_TOSJKEI/AAAAAAAACVc/OzHMul81UAQ/s320/ODS-pingStatus.png" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now under Resources, click on JDBC and then JDBC Resources. In the  right hand-side click on new button will open the "New JDBC Resource" window, enter the details as shown in below image.&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/-RES5iwWDCpg/UD9AD_A0nPI/AAAAAAAACVk/m9GrOUFAWbE/s1600/ODS-DataSource.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://1.bp.blogspot.com/-RES5iwWDCpg/UD9AD_A0nPI/AAAAAAAACVk/m9GrOUFAWbE/s400/ODS-DataSource.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/08/configure-jndi-datasource-for-oracledb.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-Y4lZhqCuPcs/UD85vGriGiI/AAAAAAAACUw/r4Ktwo9bQnA/s72-c/ODS-ConnPool.png' height='72' width='72'/><thr:total>4</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-6206424911543388849</guid><pubDate>Tue, 07 Aug 2012 14:12:00 +0000</pubDate><atom:updated>2012-08-07T07:12:09.852-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ActionEvent</category><category domain='http://www.blogger.com/atom/ns#'>EntityImpl</category><category domain='http://www.blogger.com/atom/ns#'>BackingBean</category><category domain='http://www.blogger.com/atom/ns#'>ViewObject</category><category domain='http://www.blogger.com/atom/ns#'>BC4J</category><category domain='http://www.blogger.com/atom/ns#'>SequenceImpl</category><category domain='http://www.blogger.com/atom/ns#'>ViewScope</category><category domain='http://www.blogger.com/atom/ns#'>createInsert</category><category domain='http://www.blogger.com/atom/ns#'>ADF</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>table</category><category domain='http://www.blogger.com/atom/ns#'>AM</category><category domain='http://www.blogger.com/atom/ns#'>RowKey</category><title>How many rows Modified/Added in ADF Table</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was reading through OTN Discussion Forums where I found one topic "How many rows were Modified/Added in ADF Table by the user". Jobinesh has written article on "&lt;a href="http://jobinesh.blogspot.in/2012/01/displaying-transaction-log-when-user.html" target="_blank"&gt;Displaying Transaction Log When User Commits a Transaction&lt;/a&gt;" which explains how to get the entity status, above example overrides &lt;a href="http://docs.oracle.com/cd/B14099_19/web.1012/b14022/oracle/jbo/server/EntityImpl.html" target="_blank"&gt;EntityImpl&lt;/a&gt;::doDML(int operation, TransactionEvent e) method to track the status of entities.&lt;br /&gt;&lt;br /&gt;I was trying to get Modified/Added rows in EJB DataControl but above suggested solution can't be implemented, because application module in not supported in EJB. &lt;i&gt;So in this article I'm trying to get the entity status in backing bean using BC4J&lt;/i&gt;, in my next article I will try to explain on how to achieve the same scenario using EJB.&lt;br /&gt;&lt;br /&gt;Results page looks like below.&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/-7a0bUym1gNs/UCD5NYE0tHI/AAAAAAAACUM/X7dWPA1Qhd8/s1600/FERS-Result.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="233" src="http://4.bp.blogspot.com/-7a0bUym1gNs/UCD5NYE0tHI/AAAAAAAACUM/X7dWPA1Qhd8/s400/FERS-Result.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/FindEntityRowStatusApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.2.0 + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps:&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/b&gt;Create Fusion Web Application with business components from tables based Employees table, open Employees.xml and select Java tab. Generate EmployeesImpl and add the below code in create method to generate sequence number for employee id using &lt;a href="http://docs.oracle.com/cd/E16764_01/apirefs.1111/e10653/oracle/jbo/client/remote/SequenceImpl.html" target="_blank"&gt;SequenceImpl&lt;/a&gt; class.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;/**&lt;br /&gt; * Add attribute defaulting logic in this method.&lt;br /&gt; * @param attributeList list of attribute names/values to initialize the row&lt;br /&gt; */&lt;br /&gt;protected void create(AttributeList attributeList) {&lt;br /&gt;	super.create(attributeList);&lt;br /&gt;	SequenceImpl seq = new SequenceImpl("EMPLOYEES_SEQ", getDBTransaction());&lt;br /&gt;	Number seqNextval = seq.getSequenceNumber();&lt;br /&gt;	setEmployeeId(seqNextval);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Open the EmployeesView&amp;nbsp;and select Java tab, generate EmployeesViewImpl class.&lt;br /&gt;&lt;br /&gt;In ViewController project, create index.jspx page and backingbean as "IndexBean" with scope as "ViewScope". Open the IndexBean and copy the below method code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;private RichTable empTable;&lt;br /&gt;private List selectedEmpArray = new ArrayList();&lt;br /&gt;private int modifiedRows = 0;&lt;br /&gt;private int newRows = 0;&lt;br /&gt;&lt;br /&gt;public IndexBean() {&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setEmpTable(RichTable empTable) {&lt;br /&gt;	this.empTable = empTable;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public RichTable getEmpTable() {&lt;br /&gt;	return empTable;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setModifiedRows(int modifiedRows) {&lt;br /&gt;	this.modifiedRows = modifiedRows;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public int getModifiedRows() {&lt;br /&gt;	return modifiedRows;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void setNewRows(int newRows) {&lt;br /&gt;	this.newRows = newRows;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public int getNewRows() {&lt;br /&gt;	return newRows;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * Get the selected rowKey&lt;br /&gt; * Add the rowKey to selectedEmpArray arrayList&lt;br /&gt; * @param selectionEvent&lt;br /&gt; */&lt;br /&gt;public void empSelectionEvent(SelectionEvent selectionEvent) {&lt;br /&gt;	RowKeySet empRKS = selectionEvent.getAddedSet();&lt;br /&gt;	if (empRKS.size() &amp;gt; 0) {&lt;br /&gt;		Iterator empRKSIterator = empRKS.iterator();&lt;br /&gt;		while (empRKSIterator.hasNext()) {&lt;br /&gt;			Key key = (Key)((List)empRKSIterator.next()).get(0);&lt;br /&gt;                        //Add the key if not existed in selectedEmpArray&lt;br /&gt;			if (!selectedEmpArray.contains(key)) {&lt;br /&gt;				selectedEmpArray.add(key);&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public BindingContainer getBindings() {&lt;br /&gt;	return BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * While loop the selectedEmpArray&lt;br /&gt; * Get the entity status for the rowKeys&lt;br /&gt; * @param actionEvent&lt;br /&gt; */&lt;br /&gt;public void fetchModifiedRows(ActionEvent actionEvent) {&lt;br /&gt;	if (selectedEmpArray.size() &amp;gt; 0) {&lt;br /&gt;		//Resetting the row counts&lt;br /&gt;		this.setModifiedRows(0);&lt;br /&gt;		this.setNewRows(0);&lt;br /&gt;&lt;br /&gt;		DCBindingContainer dcBindings = (DCBindingContainer)getBindings();&lt;br /&gt;		DCIteratorBinding EmpsDCIterBinding = dcBindings.findIteratorBinding("EmployeesView1Iterator");&lt;br /&gt;		RowSetIterator EmpsRSIter = EmpsDCIterBinding.getRowSetIterator();&lt;br /&gt;		ViewObject vo = EmpsDCIterBinding.getViewObject();&lt;br /&gt;&lt;br /&gt;		Iterator selectedEmpsIter = selectedEmpArray.iterator();&lt;br /&gt;		while (selectedEmpsIter.hasNext()) {&lt;br /&gt;			Row currentRow = EmpsRSIter.getRow((Key)selectedEmpsIter.next());&lt;br /&gt;			EmpsRSIter.setCurrentRow(currentRow);&lt;br /&gt;&lt;br /&gt;			ViewRowImpl myRow = (ViewRowImpl)vo.getCurrentRow();&lt;br /&gt;			EntityImpl entityImpl = (EntityImpl)myRow.getEntity(0);&lt;br /&gt;			if (EntityImpl.STATUS_MODIFIED == entityImpl.getEntityState()) {&lt;br /&gt;				this.setModifiedRows((this.getModifiedRows() + 1));&lt;br /&gt;			} else if (EntityImpl.STATUS_NEW == entityImpl.getEntityState()) {&lt;br /&gt;				this.setNewRows((this.getNewRows() + 1));&lt;br /&gt;			}&lt;br /&gt;		}&lt;br /&gt;	}&lt;br /&gt;	//Commit the transaction&lt;br /&gt;	commitAction();&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public String commitAction() {&lt;br /&gt;	BindingContainer bindings = getBindings();&lt;br /&gt;	OperationBinding operationBinding = bindings.getOperationBinding("Commit");&lt;br /&gt;	Object result = operationBinding.execute();&lt;br /&gt;	if (!operationBinding.getErrors().isEmpty()) {&lt;br /&gt;		return null;&lt;br /&gt;	}&lt;br /&gt;	return null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;/**&lt;br /&gt; * CreateInsert new row and get rowKey for the added row&lt;br /&gt; * Add the rowKey to the selectedEmpArray arrayList&lt;br /&gt; * @param actionEvent&lt;br /&gt; */&lt;br /&gt;public void createNewRow(ActionEvent actionEvent) {&lt;br /&gt;	BindingContainer bindings = getBindings();&lt;br /&gt;	OperationBinding oper = bindings.getOperationBinding("CreateInsert");&lt;br /&gt;	oper.execute();&lt;br /&gt;&lt;br /&gt;	DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt;	DCIteratorBinding EmpsIter = dcBindings.findIteratorBinding("EmployeesView1Iterator");&lt;br /&gt;	EmployeesViewImpl eImpl = (EmployeesViewImpl)EmpsIter.getViewObject();&lt;br /&gt;        //Add the key if not existed in selectedEmpArray&lt;br /&gt;	if (!selectedEmpArray.contains(eImpl.getCurrentRow().getKey())) {&lt;br /&gt;		selectedEmpArray.add(eImpl.getCurrentRow().getKey());&lt;br /&gt;	}&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Note:- Here createInsert is model driven component, when user clicks on the Create button the&amp;nbsp;selectionListener will not be executed for the first time. So in the above createNewRow method, &amp;nbsp;the rowKey value will be added to selectedEmpArray.&lt;br /&gt;&lt;br /&gt;Open index.jspx page.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;From datacontrol palette drag and drop EmployeesView1-&amp;gt;Table as ADF Table with&amp;nbsp;rowSelection as multiple.&lt;/li&gt;&lt;li&gt;Surround&amp;nbsp;the table with panel collection and add toolbar in that.&lt;/li&gt;&lt;li&gt;Bind the empolyees table as&amp;nbsp;binding="#{viewScope.IndexBean.empTable}"&lt;/li&gt;&lt;li&gt;Set the SelectionListener as "#{viewScope.IndexBean.empSelectionEvent}"&lt;/li&gt;&lt;li&gt;Go to Bindings tab and Create Action Binding, Data Collection as EmployeesView1 and Operation as CreateInsert.&lt;/li&gt;&lt;li&gt;From component palette drop af:commandButton and set actionListener as "#{viewScope.IndexBean.createNewRow}".&lt;/li&gt;&lt;li&gt;Go to Bindings tab and Create Action Binding, Data Collection as AppModuleDataControl and Operation as Commit. &lt;/li&gt;&lt;li&gt;From component palette drop af:commandButton and set actionListener as&amp;nbsp;#{viewScope.IndexBean.fetchModifiedRows}, disabled as "#{!bindings.Commit.enabled}", partialSubmit as "true".&lt;/li&gt;&lt;li&gt;Add&amp;nbsp;af:outputLabel and value as "No of Rows Modified - &amp;nbsp;#{viewScope.IndexBean.modifiedRows}", partialTriggers to commit button.&lt;/li&gt;&lt;li&gt;Add&amp;nbsp;af:outputLabel and value as&amp;nbsp;"No of Rows Newly added - #{viewScope.IndexBean.newRows}", &amp;nbsp;partialTriggers to commit button.&lt;/li&gt;&lt;/ul&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/08/how-many-rows-modifiedadded-in-adf-table.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-7a0bUym1gNs/UCD5NYE0tHI/AAAAAAAACUM/X7dWPA1Qhd8/s72-c/FERS-Result.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-8144284565725064894</guid><pubDate>Thu, 12 Jul 2012 17:22:00 +0000</pubDate><atom:updated>2012-07-12T10:22:55.055-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ViewCriteria</category><category domain='http://www.blogger.com/atom/ns#'>DataControl</category><category domain='http://www.blogger.com/atom/ns#'>Bean DataControl</category><category domain='http://www.blogger.com/atom/ns#'>af:query</category><category domain='http://www.blogger.com/atom/ns#'>JavaBean</category><category domain='http://www.blogger.com/atom/ns#'>NamedCriteria</category><title>Bean Data Control - Create Simple Search Form</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;In Oracle ADF, search form can be created with BC4J/EJB model using "View Criteria/Named Criteria" by dropping &lt;b&gt;"af:query"&lt;/b&gt; component in view layer. &lt;i&gt;Here in this article, I'm trying to build simple search form based on bean data control&lt;/i&gt;.&lt;br /&gt;&lt;br /&gt;The Results page look like below.&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/-B1vaLatS8uI/T_2fBzVOo4I/AAAAAAAACTw/ZKVAFw31Q4I/s1600/SearchForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="295" src="http://4.bp.blogspot.com/-B1vaLatS8uI/T_2fBzVOo4I/AAAAAAAACTw/ZKVAFw31Q4I/s400/SearchForm.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Enter the Department Id in search form and click search button will filter results.&lt;br /&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://3.bp.blogspot.com/-6tJdsvOcAHg/T_2fTOxUc_I/AAAAAAAACT4/k7p1L0Ufk_k/s1600/FilterForm.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="145" src="http://3.bp.blogspot.com/-6tJdsvOcAHg/T_2fTOxUc_I/AAAAAAAACT4/k7p1L0Ufk_k/s400/FilterForm.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/SearchFormApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;u&gt;Implementation Steps&lt;/u&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Create Fusion Web application, in model project create Employees java class. Open Employees.java and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class Employees {&lt;br /&gt;    private Integer employeeId;&lt;br /&gt;    private String firstName;&lt;br /&gt;    private String lastName;&lt;br /&gt;    private String email;&lt;br /&gt;    private String phoneNo;&lt;br /&gt;    private Date hireDate;&lt;br /&gt;    private String jobId;&lt;br /&gt;    private Integer salary;&lt;br /&gt;    private Integer departmentId;&lt;br /&gt;&lt;br /&gt;    public Employees() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Employees(int employeeId, String firstName, String lastName, String email, String phoneNo, Date hireDate,&lt;br /&gt;                     String jobId, int salary, int departmentId) {&lt;br /&gt;        this.setEmployeeId(employeeId);&lt;br /&gt;        this.setFirstName(firstName);&lt;br /&gt;        this.setLastName(lastName);&lt;br /&gt;        this.setEmail(email);&lt;br /&gt;        this.setPhoneNo(phoneNo);&lt;br /&gt;        this.setHireDate(hireDate);&lt;br /&gt;        this.setJobId(jobId);&lt;br /&gt;        this.setSalary(salary);&lt;br /&gt;        this.setDepartmentId(departmentId);&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setEmployeeId(Integer employeeId) {&lt;br /&gt;        this.employeeId = employeeId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Integer getEmployeeId() {&lt;br /&gt;        return employeeId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setFirstName(String firstName) {&lt;br /&gt;        this.firstName = firstName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getFirstName() {&lt;br /&gt;        return firstName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setLastName(String lastName) {&lt;br /&gt;        this.lastName = lastName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getLastName() {&lt;br /&gt;        return lastName;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setEmail(String email) {&lt;br /&gt;        this.email = email;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getEmail() {&lt;br /&gt;        return email;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setPhoneNo(String phoneNo) {&lt;br /&gt;        this.phoneNo = phoneNo;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getPhoneNo() {&lt;br /&gt;        return phoneNo;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setHireDate(Date hireDate) {&lt;br /&gt;        this.hireDate = hireDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Date getHireDate() {&lt;br /&gt;        return hireDate;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setJobId(String jobId) {&lt;br /&gt;        this.jobId = jobId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public String getJobId() {&lt;br /&gt;        return jobId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setSalary(Integer salary) {&lt;br /&gt;        this.salary = salary;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Integer getSalary() {&lt;br /&gt;        return salary;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public void setDepartmentId(Integer departmentId) {&lt;br /&gt;        this.departmentId = departmentId;&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public Integer getDepartmentId() {&lt;br /&gt;        return departmentId;&lt;br /&gt;    }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;Create PopulateData java class, open PopulateData.java and add the below code.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public class PopulateData {&lt;br /&gt;    private static List&lt;employees&gt; allEmployees;&lt;br /&gt;    static {&lt;br /&gt;        allEmployees = new ArrayList&lt;employees&gt;();&lt;br /&gt;        allEmployees.add(new Employees(100, "Steven", "King", "SKING", "515.123.4567", new Date(), "AD_PRES", 24000,&lt;br /&gt;                                       20));&lt;br /&gt;        allEmployees.add(new Employees(101, "Neena ", "Kochhar", "NKOCHHAR", "515.123.4568", new Date(), "AD_VP",&lt;br /&gt;                                       17000, 90));&lt;br /&gt;        allEmployees.add(new Employees(102, "Lex", "De Haan", "AHUNOLD", "515.423.4567", new Date(), "IT_PROG", 15000,&lt;br /&gt;                                       90));&lt;br /&gt;        allEmployees.add(new Employees(103, "Alexander", "Hunold", "AHUNOLD", "515.423.4567", new Date(), "IT_PROG",&lt;br /&gt;                                       10000, 20));&lt;br /&gt;        allEmployees.add(new Employees(104, "Bruce", "Ernst", "BERNST", "515.423.4568", new Date(), "IT_PROG", 5000,&lt;br /&gt;                                       50));&lt;br /&gt;        allEmployees.add(new Employees(105, "David", "Austin", "DAUSTIN", "515.423.4569", new Date(), "IT_PROG", 7000,&lt;br /&gt;                                       30));&lt;br /&gt;        allEmployees.add(new Employees(106, "Valli", "Pataballa", "VPATABAL", "515.423.4560", new Date(), "IT_PROG",&lt;br /&gt;                                       8000, 50));&lt;br /&gt;        allEmployees.add(new Employees(107, "Diana", "Lorentz", "DLORENTZ", "515.423.5567", new Date(), "IT_PROG",&lt;br /&gt;                                       9000, 50));&lt;br /&gt;        allEmployees.add(new Employees(108, "Nancy", "Greenberg", "NGREENBE", "515.124.4569", new Date(), "FI_MGR",&lt;br /&gt;                                       10000, 100));&lt;br /&gt;        allEmployees.add(new Employees(109, "Daniel", "Faviet", "DFAVIET", "515.124.4169", new Date(), "FI_ACCOUNT",&lt;br /&gt;                                       13000, 100));&lt;br /&gt;        allEmployees.add(new Employees(110, "John", "Chen", "JCHEN", "515.124.4269", new Date(), "FI_ACCOUNT", 14000,&lt;br /&gt;                                       100));&lt;br /&gt;        allEmployees.add(new Employees(111, "Ismael", "Sciarra", "ISCIARRA", "515.124.4369 ", new Date(), "FI_ACCOUNT",&lt;br /&gt;                                       12000, 60));&lt;br /&gt;        allEmployees.add(new Employees(112, "Jose Manuel", "Urman", "JMURMAN", "515.124.4469", new Date(),&lt;br /&gt;                                       "FI_ACCOUNT", 4000, 60));&lt;br /&gt;        allEmployees.add(new Employees(112, "Jose Manuel", "Urman", "JMURMAN", "515.124.4469", new Date(),&lt;br /&gt;                                       "FI_ACCOUNT", 7800, 60));&lt;br /&gt;        allEmployees.add(new Employees(113, "Luis", "Popp", "LPOPP", "515.124.4567", new Date(), "FI_ACCOUNT", 6900,&lt;br /&gt;                                       70));&lt;br /&gt;        allEmployees.add(new Employees(114, "Den", "Raphaely", "DRAPHEAL", "515.127.4561", new Date(), "PU_MAN", 11000,&lt;br /&gt;                                       90));&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public PopulateData() {&lt;br /&gt;        super();&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    public static List&lt;employees&gt; getAllEmployees() {&lt;br /&gt;        return allEmployees;&lt;br /&gt;    }&lt;br /&gt;}&lt;/employees&gt;&lt;/employees&gt;&lt;/employees&gt;&lt;/code&gt;&lt;/pre&gt;Create EmployeeServicejava class, open EmployeeService.java and add the below code. Create data control from EmployeeService Bean class.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;public List&lt;employees&gt; filterByDeptId(Integer departmentId) {&lt;br /&gt;        try {&lt;br /&gt;            List&lt;employees&gt; allEmployees = PopulateData.getAllEmployees();&lt;br /&gt;            if (departmentId != null) {&lt;br /&gt;                List&lt;employees&gt; filteredEmployees = new ArrayList&lt;employees&gt;();&lt;br /&gt;                for (Employees e : allEmployees) {&lt;br /&gt;                    if (e.getDepartmentId() == departmentId) {&lt;br /&gt;                        filteredEmployees.add(e);&lt;br /&gt;                    }&lt;br /&gt;                }&lt;br /&gt;                return filteredEmployees;&lt;br /&gt;            } else {&lt;br /&gt;                return allEmployees;&lt;br /&gt;            }&lt;br /&gt;        } catch (Exception e) {&lt;br /&gt;            e.printStackTrace();&lt;br /&gt;        }&lt;br /&gt;        return null;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public List&lt;employees&gt; getAllEmployees() {&lt;br /&gt;    return PopulateData.getAllEmployees();&lt;br /&gt;}&lt;/employees&gt;&lt;/employees&gt;&lt;/employees&gt;&lt;/employees&gt;&lt;/employees&gt;&lt;/code&gt;&lt;/pre&gt;In ViewController project, create jspx page and from data control palette&lt;br /&gt;&lt;ol style="text-align: left;"&gt;&lt;li&gt;&lt;span style="background-color: white;"&gt;Drop filterByDeptId as ADF Method Parameter&lt;/span&gt;&lt;/li&gt;&lt;li&gt;Drop filterByDeptId-&amp;gt;Employees-&amp;gt;Table as ADF Read-only Table&lt;/li&gt;&lt;/ol&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/07/bean-data-control-create-simple-search.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-B1vaLatS8uI/T_2fBzVOo4I/AAAAAAAACTw/ZKVAFw31Q4I/s72-c/SearchForm.png' height='72' width='72'/><thr:total>3</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-4651060650906400995</guid><pubDate>Mon, 02 Jul 2012 13:48:00 +0000</pubDate><atom:updated>2012-07-02T06:59:17.572-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>ViewObject</category><category domain='http://www.blogger.com/atom/ns#'>ADF Faces</category><category domain='http://www.blogger.com/atom/ns#'>ADF</category><category domain='http://www.blogger.com/atom/ns#'>AM</category><title>How to add a new row at the end of the ADF Table</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;I was reading through&amp;nbsp;OTN Discussion Forums where I found one topic "How to add a new row at the end of the ADF Table", I found couple of articles which explains how to insert new rows to the end of ADF Table. Here is the list below.&lt;br /&gt;&lt;ul style="text-align: left;"&gt;&lt;li&gt;&lt;a href="http://www.google.com/url?sa=t&amp;amp;rct=j&amp;amp;q=&amp;amp;esrc=s&amp;amp;source=web&amp;amp;cd=2&amp;amp;ved=0CFEQFjAB&amp;amp;url=http%3A%2F%2Fwww.oracle.com%2Ftechnetwork%2Fdeveloper-tools%2Fadf%2Flearnmore%2F002-adf-programmer-cheat-sheet2010-169115.pdf&amp;amp;ei=TJzxT4ysFs6qrAfDsuC9DQ&amp;amp;usg=AFQjCNEH8Nt0ghPR9t-AoiYqEOhmBbE8CA" target="_blank"&gt;Add new row at end of ADF Table - ADF Code Corner&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://lucbors.blogspot.in/2010/12/adf-11g-how-to-control-where-new-row-is.html" target="_blank"&gt;How to control where a new row is inserted&lt;/a&gt;&lt;/li&gt;&lt;li&gt;&lt;a href="http://mjabr.wordpress.com/2011/07/02/how-to-control-the-location-of-the-new-row-in-aftable/" target="_blank"&gt;How to control the location of the new row in af:table&lt;/a&gt;&lt;/li&gt;&lt;/ul&gt;&lt;br /&gt;Here is one more way to insert new rows to the end of ADF table by&amp;nbsp;overriding the view object's(ViewImpl) insertRow() method.&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;/**&lt;br /&gt; * This method will overrides the view object's insertRow()&lt;br /&gt; * First create a new row&lt;br /&gt; * Removes the row from the collection and then retain it for insertion into another location.&lt;br /&gt; * Navigates to the last row in the row set.&lt;br /&gt; * Navigates to next row&lt;br /&gt; * Inserts the same row to the row set&lt;br /&gt; * @param row&lt;br /&gt; */&lt;br /&gt;@Override&lt;br /&gt;public void insertRow(Row row) {&lt;br /&gt; super.insertRow(row);&lt;br /&gt; row.removeAndRetain();&lt;br /&gt; last();&lt;br /&gt; next();&lt;br /&gt; getDefaultRowSet().insertRow(row);&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/NewRowAdfTableApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;Run the index.jspx page and navigate the departments records, now click on Create button. Notice in employee table new row is added to end of the ADF Table.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-2vay3NYQ7CQ/T_GpHbyKJbI/AAAAAAAACTk/nqj33Ut4Hiw/s1600/CreateRow.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="163" src="http://2.bp.blogspot.com/-2vay3NYQ7CQ/T_GpHbyKJbI/AAAAAAAACTk/nqj33Ut4Hiw/s400/CreateRow.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/07/how-to-add-new-row-at-end-of-adf-table.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-2vay3NYQ7CQ/T_GpHbyKJbI/AAAAAAAACTk/nqj33Ut4Hiw/s72-c/CreateRow.png' height='72' width='72'/><thr:total>0</thr:total></item><item><guid isPermaLink='false'>tag:blogger.com,1999:blog-3873906122160366310.post-8679352532477729650</guid><pubDate>Tue, 26 Jun 2012 06:26:00 +0000</pubDate><atom:updated>2012-06-26T04:53:37.241-07:00</atom:updated><category domain='http://www.blogger.com/atom/ns#'>AttributeDef</category><category domain='http://www.blogger.com/atom/ns#'>EJB</category><category domain='http://www.blogger.com/atom/ns#'>SessionFacade</category><category domain='http://www.blogger.com/atom/ns#'>DCDataVo</category><category domain='http://www.blogger.com/atom/ns#'>Adapter DataControl</category><category domain='http://www.blogger.com/atom/ns#'>ViewObject</category><category domain='http://www.blogger.com/atom/ns#'>EJB DataControl</category><category domain='http://www.blogger.com/atom/ns#'>BC4J</category><category domain='http://www.blogger.com/atom/ns#'>AM</category><title>Get JPA Entity Attributes programmatically in managed bean</title><description>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Sometimes it is necessary to get database table field column names for further functional&amp;nbsp;process in applications. In one my previous article I have explained one of the use case -&amp;nbsp;&lt;a href="http://deepakcs.blogspot.in/2012/06/configure-comparison-of-row-objects-at.html" style="font-style: italic;" target="_blank"&gt;Configure Comparison of Row Objects at Run Time&lt;/a&gt;&lt;i&gt;, &lt;/i&gt;here application module(BC4J) is used to access the ViewObject attributes.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;In EJB data control doesn't create any application module or neither have access to application module Api's directly. When the ViewObject is accessed based on the Iterator a dummy object is created using &lt;a href="http://docs.oracle.com/cd/E15523_01/apirefs.1111/e10653/oracle/adf/model/bean/DCDataVO.html" target="_blank"&gt;DCDataVo&lt;/a&gt; Api.  DCDataVo provides little leverage to access certain model layer functionality, so that all &lt;a href="http://docs.oracle.com/cd/B31017_01/web.1013/b28967/adv_data_controls.htm" target="_blank"&gt;Adapter Data Control&lt;/a&gt;&amp;nbsp;can use the DCDataVo api to extend to build custom features.&lt;/i&gt;&lt;br /&gt;&lt;br /&gt;You can &lt;a href="http://ejbdatacontrol-samples.googlecode.com/files/EJBGetAttributesApp.zip" target="_blank"&gt;download the sample workspace from here&lt;/a&gt;&lt;br /&gt;[Runs with Oracle JDeveloper 11.1.2.0.0 (11g R2) + HR Schema]&lt;br /&gt;&lt;br /&gt;Here in the below code JPA entity attributes are accessed in managed bean using DCDataVo api.&lt;br /&gt;&lt;br /&gt;&lt;pre style="background: none repeat scroll 0% 0% rgb(240, 240, 240); border: 1px dashed rgb(204, 204, 204); color: black; font-family: arial; font-size: 12px; height: auto; line-height: 20px; overflow: auto; padding: 0px; text-align: left; width: 99%;"&gt;&lt;code style="color: black; word-wrap: normal;"&gt;/**&lt;br /&gt; * This method will get the View Object based on Iterator&lt;br /&gt; * Reads the entity attributes(column names)&lt;br /&gt; * @param actionEvent&lt;br /&gt; */&lt;br /&gt;public void compareAttributes(ActionEvent actionEvent) {&lt;br /&gt; DCBindingContainer dcBindings = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();&lt;br /&gt; DCIteratorBinding deptIter = dcBindings.findIteratorBinding("employeesFindAllIterator");&lt;br /&gt; ViewObject vo = deptIter.getViewObject();&lt;br /&gt; int count = 0;&lt;br /&gt; AttributeDef[] attrDefs = vo.getAttributeDefs();&lt;br /&gt; for (AttributeDef attrDef : attrDefs) {&lt;br /&gt;  byte attrKind = attrDefs[count].getAttributeKind();&lt;br /&gt;  //Condition to exclude the fk attributes&lt;br /&gt;  if (attrKind == 1) {&lt;br /&gt;   System.out.println(attrDef.getName());&lt;br /&gt;   count++;&lt;br /&gt;  }&lt;br /&gt; }&lt;br /&gt;}&lt;/code&gt;&lt;/pre&gt;&lt;br /&gt;Displaying the Employee entity attributes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-B292-cRGXhQ/T-Y77PKhiPI/AAAAAAAACOg/ID2loOA35JM/s1600/EJBGAA-attributes.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="173" src="http://4.bp.blogspot.com/-B292-cRGXhQ/T-Y77PKhiPI/AAAAAAAACOg/ID2loOA35JM/s550/EJBGAA-attributes.png" width="550" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;</description><link>http://deepakcs.blogspot.com/2012/06/get-jpa-entity-attributes-pro.html</link><author>noreply@blogger.com (Deepak Siddappa)</author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-B292-cRGXhQ/T-Y77PKhiPI/AAAAAAAACOg/ID2loOA35JM/s72-c/EJBGAA-attributes.png' height='72' width='72'/><thr:total>0</thr:total></item></channel></rss>