Sunday, July 17, 2016

JDev/ADF sample - Workaround for ADF BC REST Custom Method Configuration

  • Workaround for ADF BC REST Custom Method Configuration. This post is based on JDEV 12.2.1.1, it seems like there is issue with ADF BC REST custom method definition in this release. I'm glad it is not runtime issue, but related to design time JDEV wizard incorrect functionality. I will explain how to bypass it, when you want to expose custom REST method in 12.2.1.1.
    Download - ADFBCRestApp_v8.zip

Tuesday, July 12, 2016

JDev/ADF sample - ADF BC REST Authentication with JSESSIONID Cookie

    Download - ADFBCRESTApp_v7.zip

Saturday, July 9, 2016

JDev/ADF sample - ADF 12.2.1.1 Improved Support for Programmatic View Object

  • ADF 12.2.1.1 Improved Support for Programmatic View Object. ADF 12.2.1.1 brings improved support for programmatic VO creation. Such VO's are handy, when we want to base VO on alternative data source, such as PL/SQL ref cursor. In ADF 12.2.1.1 developer don't need to worry which framework methods to override, now it is enough to extend from Programmatic View Object Implementation class. This is special framework helper class, designed for programmatic VO support. See example below.
    Download - ADF12211App.zip

Saturday, June 18, 2016

JDev/ADF sample - ADF BC Range Paging and ADF UI Table Pagination Use Case

  • ADF BC Range Paging and ADF UI Table Pagination Use Case. ADF UI table pagination and ADF BC range paging sounds like a perfect combination. But to make it work perfect, a bit of extra effort is required. In the case of search/edit implementation, it can't remember updated record when navigating back to search screen (VO runs with Range Paging and UI table is displayed with pagination). I will explain how to solve it and show how to keep UI table displaying current page and prevent jumping to the first page.
    Download - SearchEditApp.zip

Tuesday, June 14, 2016

JDev/ADF sample - Using the Oracle JET QuickStart Template

  • Using the Oracle JET QuickStart Template. I will show in the post, how you can create single page applications with multiple modules in Oracle JET. As a starting point, you should use the Oracle JET QuickStart template, read about it here. This template comes with sample structure and you could follow it to split application functionality into different groups.
    Download - JETCRUDApp_v10.zip

Saturday, June 11, 2016

JDev/ADF sample - How To Control Row Removal in ADF BC

  • How To Control Row Removal in ADF BC. There is a flaw in ADF BC remove operation. Row could be successfully removed in ADF BC - it dissapears from UI as well, but if there is DB integrity constraint violation - row is not removed in DB and error message is displayed to the user. This could be misleading to the user, he sees message about failed removal, but at the same time row is not present anymore.
    Download - ADFDeleteControlApp.zip

Tuesday, June 7, 2016

JDev/ADF sample - Oracle JET Executing Dynamic ADF BC REST URL

  • Oracle JET Executing Dynamic ADF BC REST URL. I'm going to explain how to call ADF BC REST service from JET API and how to control parameters passed through to REST URL. Most of the time, REST should return data based on different parameter values, URL is not static. I will be exploring two cases - search functionality, where parameter value is entered by the user and LOV functionality, where current employee key is submitted to fetch colleagues list.
    Download - JETCRUDApp_v9.zip

Saturday, May 28, 2016

JDev/ADF sample - Oracle JET Handling ADF BC 12.2.1 REST Validation Event

  • Oracle JET Handling ADF BC 12.2.1 REST Validation Event. I already had a post about how to handle ADF BC validation messages in Oracle JET - Handling ADF BC 12.2.1 REST Validation in Oracle JET. There is an improvement I would like to share. JET submits data to ADF BC REST and there happens validation. In JET perspective data is correct, however it may fail validation in ADF BC and we need to reset values back to original in JET. Previously I was re-executing entire JET collection, drawback of this approach - current selected row was lost and control was returned to the first page in the table configured with pagination.
    Download - JETCRUDApp_v9.zip

Thursday, May 19, 2016

JDev/ADF sample - Oracle JET Master-Detail with ADF BC REST

  • Oracle JET Master-Detail with ADF BC REST. One of the most typical use cases in enterprise applications - Master-Detail relationship implementation. I have decided to implement it in JET and to share this practical implementation with you. Hopefully it will be useful, when you will be learning and building JET applications.
    Download - JETCRUDApp_v8.zip

Monday, May 16, 2016

JDev/ADF sample - ADF Hidden Gem - Export Collection Listener

  • ADF Hidden Gem - Export Collection Listener. How many times you complained about ADF export collection listener generated output? There are two options for the output - CSV and excelHTML. Both of them are not really Excel friendly (Excel complains, each time when such file is opened) and produced output lacks formatting. Luckily there is a way to specify custom formatter for ADF export collection listener and set your own output type. In this way we can produce better and customized output file for Excel, you can construct Excel document with different formatting and layout.
    Download - GitHub Repository

Saturday, May 14, 2016

JDev/ADF sample - Oracle JET Input Search with ADF BC REST

  • Oracle JET Input Search with ADF BC REST. LOV is popular component in ADF, it allows to seach for data entry in the list, select it and assign to the attribute. I was researching, how similar concept can be implemented in Oracle JET, based on data from ADF BC REST service. JET Input Search component seems to be useful for LOV like behavior implementation.
    Download - JETCRUDApp_v7.zip

Tuesday, May 10, 2016

JDev/ADF sample - Oracle JET 2.0.1 - Upgrade for CRUD Sample

    Download - JETCRUDApp_v6.zip

Tuesday, April 26, 2016

JDev/ADF sample - Optimize ADF HTTP Response Size with ChangeEventPolicy

  • Optimize ADF HTTP Response Size with ChangeEventPolicy. You should read this post, if you are looking how to reduce ADF HTTP response size. This can be important for ADF application performance tuning, to improve PPR request response time. By default in ADF 12.2.1, iterator is assigned with ChangeEventPolicy = ppr. This works great for UI component bindings refresh, no need to set individual partial triggers. On other side, this generates extra content in ADF HTTP response and eventually increases response size. I would recommend to use ChangeEventPolicy = ppr, only when its really needed - dynamic forms, with unknown refresh dependencies. Otherwise set ChangeEventPolicy = none, to generate smaller response.
    Download - ChangeEventPolicyPPRApp.zip

Sunday, April 17, 2016

JDev/ADF sample - ADF 12c Custom Property Groovy and AllowUntrustedScriptAccess Annotation

  • ADF 12c Custom Property Groovy and AllowUntrustedScriptAccess Annotation. To execute Groovy expression in ADF 12c (to call Java method from Groovy), you must specify trusted mode. Read more about it in my previous post - ADF BC 12c New Feature - Entity-Level Triggers. Setting mode to trusted, works in most of the cases. It doesn't work if we want to execute Groovy expression (calling Java method in ViewRow or Entity class) for custom property. In a case of custom property and Groovy calling custom method, we need to annotate Java class with AllowUntrustedScriptAccess. This makes a trick and Groovy expression can call custom method.
    Download - ADF12cGroovyCustomPropertyApp.zip

Sunday, April 10, 2016

JDev/ADF sample - Monitoring ADF 12c Client Request Time with Click History

  • Monitoring ADF 12c Client Request Time with Click History. You must be excited to read this post, I will describe one very useful feature, available in ADF 12c. This feature - Click History. You can follow steps described by Duncan Mills, to enable and read click history data in server log. There is one more option available - we can read click history data from ADF request (captured by filter class) and log it in custom way (for later analysis). Click history gives such information as client request start/end time (you can calculate client request duration), component client ID, component type, action event type, etc. All this is useful to understand application performance perceived by the client.
    Download - DashboardApp.zip

Thursday, April 7, 2016

JDev/ADF sample - ADF BC View Criteria Query Execution Mode = Both

  • ADF BC View Criteria Query Execution Mode = Both. View Criteria is set to execute in Database mode by default. There is option to change execution mode to Both. This would execute query and fetch results from database and from memory. Such query execution is useful, when we want to include newly created (but not commited yet) row into View Criteria result. Newly created row will be included into View Criteria resultset.
    Download - ViewCriteriaModeApp.zip

Wednesday, March 30, 2016

JDev/ADF sample - Change ADF BC Data Update Locking with FOR UPDATE WAIT

  • Change ADF BC Data Update Locking with FOR UPDATE WAIT. Each time when data is changed and updated through ADF BC, before posting changes to DB, SQL query with FOR UPDATE NOWAIT is generated and executed. In case if other process locks row to be updated, or another user in the same moment is updating it, error will be generated and update will be stopped. There might be use cases, when you would like to wait for certain period of time, until row will be unlocked and then commit row changes. This is especially true, if 3rd party (PL/SQL) process is updating rows and you have defined change indicator attribute in ADF BC (see my previous post - ADF BC Version Number and Change Indicator to Track Changed Rows).
    Download - LockUpdateApp.zip

Friday, March 25, 2016

JDev/ADF sample - ADF BC Version Number and Change Indicator to Track Changed Rows

  • ADF BC Version Number and Change Indicator to Track Changed Rows. One of the common use cases in enteprise applications is to track concurrent user changes. There are two types of changes possible - when two real users are changing data in the same row, or when single user is changing data and same row is updated by PL/SQL procedure/function (all happen in the same user session). In the first case, we would like to inform a user - row data was changed (two different users changing data). In the second case, there is no need to inform user (data wasn't changed by another real user, it was changed by PL/SQL function/procedure invoked in the same session).
    Download - ADFChangedRowApp.zip

Thursday, March 17, 2016

JDev/ADF sample - Accessing Oracle Mobile Cloud Service (MCS) REST from Postman

    Download - Postman_MCS_1.json

Saturday, March 5, 2016

JDev/ADF sample - Oracle JET and ADF BC REST Basic Authentication

  • Oracle JET and ADF BC REST Basic Authentication. You might be interested to check my previous sample about CRUD implementation in JET - Handling ADF BC 12.2.1 REST Validation in Oracle JET. I'm going to describe how to access secure ADF BC REST service from JET, based on the CRUD sample app. We need to pass authorization header on each REST request, this way server can authenticate user and authorize access to the REST resource. There are couple of other tips applied on ADF BC REST service side, all described below.
    Download - JETCRUDApp_v5.zip

Tuesday, March 1, 2016

JDev/ADF sample - ADF BC REST Support for List Of Values (LOV) Data

  • ADF BC REST Support for List Of Values (LOV) Data. ADF BC REST service out of the box supports LOV list data. You can define LOV for ADF BC View Object attribute and use it straight away in REST service. This is especially useful when LOV list is filtered based on other attributes from current row - no need to collect and send these attributes to the service separately, filtering logic will be handled for you in ADF BC backend. One more benefit - you can reuse existing ADF BC with LOV's implementation and expose it through REST service.
    Download - ADFBCRestApp_v6.zip

Sunday, February 28, 2016

JDev/ADF sample - Oracle JET Live List with WebSocket

    Download - JETWebSocket_v2.zip

Wednesday, February 24, 2016

JDev/ADF sample - Extending ADF Cloud User Experience Rapid Development Kit (RDK)

    Download - AppsCloudUIKit_v2.zip

Tuesday, February 23, 2016

JDev/ADF sample - Basic Authentication Hint for ADF BC REST

  • Basic Authentication Hint for ADF BC REST. If you follow step by step ADF BC REST developer guide - 16.5 Granting Client Access to the ADF REST Resource, still you would not be able to implement basic authentication for the REST service. Thats because one step is missing, it is not described (and required setting is not auto generated by JDEV). In order to enable basic authentication for ADF BC REST service, you should manually define security constraint (based on context root) for RESTServlet resource.
    Download - ADFBCRestApp_v5.zip

Friday, February 19, 2016

JDev/ADF sample - ADF and Cloud User Experience Rapid Development Kit

    Download - AppsCloudUIKit_RS.zip

Friday, February 12, 2016

JDev/ADF sample - When JET Comes To Rescue - Live Data Charts in ADF

  • When JET Comes To Rescue - Live Data Charts in ADF. I have described previously, how you can run JET in ADF UI - Improved JET Rendering in ADF. This was technical steps explanation. Today I will describe a case, when such rendering can be important and useful. The case is related to live data delivered through WebSocket and rendered in chart. WebSocket client must be implemented in JavaScript, but we can't access ADF DVT component values in JavaScript and update them, without making a call to the server and reloading binding value. Which would require client/server roundtrip.
    Download - JETWebSocketADF.zip

Saturday, February 6, 2016

JDev/ADF sample - Oracle JET and WebSocket Integration for Live Data

  • Oracle JET and WebSocket Integration for Live Data. I was researching how to plugin WebSocket into JET. I would like to share my findings and explain how it works. It is amazing, how scalable and quick it is to send JSON message through WebSocket channel and render it in JET. Luckily WebSocket client is implemented in JavaScript, this integrates perfectly with Oracle JET (also based on JavaScript).
    Download - JETWebSocket.zip

Saturday, January 23, 2016

JDev/ADF sample - Database Change Notification Listener Implementation

  • Database Change Notification Listener Implementation. Oracle DB could notify client, when table data changes. Data could be changed by third party process or by different client session. Notification implementation is important, when we want to inform client about changes in the data, without manual re-query. I had a post about ADS (Active Data Service), where notifications were received from DB through change notification listener - Practical Example for ADF Active Data Service. Now I would like to focus on change notification listener, because it can be used in ADF not only with ADS, but also with WebSockets. ADF BC is using change notification to reload VO, when configured for auto refresh - Auto Refresh for ADF BC Cached LOV.
    Download - WebSocketReusableApp.zip

Saturday, January 16, 2016

JDev/ADF sample - Automatic ADF Logout on Browser Close with WebSocket

  • Automatic ADF Logout on Browser Close with WebSocket. Every ADF project could have a requirement to handle browser close event effectively. Differently than desktop applications where we could handle such events, browser doesn't send any event to the server, when browser page is closed. This is especially important for transactional data, when user locks data row and lock must be released automatically, in case if user is closing browser without unlocking. Besides transactional data management, it is important for performance improvement - Web session will be closed instantly and WebLogic resources will be released. There was no reliable solution to handle this, now we can do it with WebLogic 12c and WebSockets. WebLogic 12c supports WebSockets natively, there is no need to configure anything or add libraries.
    Download - ADFSessionHandlingWebSocket.zip

Friday, January 15, 2016

JDev/ADF sample - Edit Use Case for ADF 12.2.1 Dashboard with Masonry Layout

    Download - DashboardApp_v4.zip

Sunday, January 10, 2016

JDev/ADF sample - Handling ADF BC 12.2.1 REST Validation in Oracle JET

  • Handling ADF BC 12.2.1 REST Validation in Oracle JET. CRUD use case would not be complete without validation logic implementation. Oracle JET allows to implement standard and custom validators on the client. Probably most of the simple to average complexity logic will be implemented in Oracle JET. Complex use cases can be handled in ADF BC validation rules, data will be validated through REST calls. When validation fails in ADF BC, error message is propagated through REST back to Oracle JET client, where we can parse it and attach to the UI field.
    Download - JETCRUDApp_v4.zip

Tuesday, December 29, 2015

JDev/ADF sample - Very Practical CRUD with JET and ADF BC - POST and DELETE Methods

    Download - JETCRUDApp_v3.zip

Monday, December 28, 2015

JDev/ADF sample - ADF BC Groovy Improvements in ADF 12.2.1

  • ADF BC Groovy Improvements in ADF 12.2.1. Groovy scripting is improved in ADF 12.2.1. There are no inline Groovy expressions anymore. Expressions are saved in separate Groovy language file, external codesource. Each EO/VO will be assigned with separate file to keep Groovy expressions. This improves Groovy script maintenance (easier to check all Groovy expressions from EO/VO located in one file), also it improves runtime performance (as JDeveloper ADF code audit rule suggests).
    Download - ADFGroovyApp.zip

Saturday, December 26, 2015

JDev/ADF sample - Very Practical CRUD with JET and ADF BC - PATCH Method

  • Very Practical CRUD with JET and ADF BC - PATCH Method. I'm going to share few more tips, how to implement CRUD in JET and call ADF BC 12.2.1 REST service. You are going to learn how to implement table row selection and how to call REST PATCH method to update data through ADF BC REST service. Why very practical? You can take sample application code and use it in your project. Less theory and more practical hints - this is my approach.
    Download - JETCRUDApp_v2.zip

Sunday, December 20, 2015

JDev/ADF sample - Oracle JET Collection Paging Control and ADF BC REST Pagination Perfect Combination

    Download - JETCRUDApp_v1.zip

Thursday, December 17, 2015

JDev/ADF sample - Improved JET Rendering in ADF

    Download - DashboardApp_v3.zip

Sunday, December 13, 2015

JDev/ADF sample - Checking for Data Consistency with ADF BC REST 12.2.1

  • Checking for Data Consistency with ADF BC REST 12.2.1. ADF BC REST supports HTTP ETag to check for data consistency. This is common approach to implement caching and optimistic locking in REST.  ADF BC REST relies on EO change indicator attribute, when change indicator attribute value is updated, new ETag is generated. All clients with previous ETag value should be prevented from updating data, without refreshing to the latest state. Read more - 22.9.1 Checking for Data Consistency When Updating ADF REST Resource Items. There are issues with data consistency check in ADF BC REST, hopefully it will be fixed in the future (read below).
    Download - ADFBCRestApp_v4.zip

Saturday, December 12, 2015

JDev/ADF sample - Range Paging and ADF 12.2.1 ADF BC REST

  • Range Paging and ADF 12.2.1 ADF BC REST. ADF 12.2.1 ADF BC REST service is compatible with range paging mode of ADF BC View Object. Range paging generates SQL query with rownum to retrieve only a subset of rows to be returned to the REST service. This can be especially effective when executing SQL query against large tables. Range paging size is determined dynamically by parameter in REST URL.
    Download - ADFBCRestApp_v3.zip

Tuesday, December 8, 2015

JDev/ADF sample - CRUD with ADF 12.2.1 ADF BC REST

    Download - ADFBCRestApp_v2.zip

Sunday, November 29, 2015

JDev/ADF sample - ADF and Oracle JET - Integration Pattern with ADF Regions

    Download - DashboardApp_v2.zip

Friday, November 13, 2015

JDev/ADF sample - Oracle JET and ADF Faces Integration in ADF

  • Oracle JET and ADF Faces Integration in ADF. Oracle JET provides a set of UI components, based on a combination of HTML and JavaScript. ADF Faces is an Ajax-enabled rich JavaServer Faces component framework that uses JavaScript to render client-side components, implement rich component functionality, validate user input and convert user data input. Although it is not officially documented, but obviously Oracle JET components can be integrated into JSF pages implemented with ADF Faces. I think such integration provides many benefits to ADF Faces. Use cases where performance is critically important can be implemented with Oracle JET client components and rich functionality can be implemented with ADF Faces, all in the same ADF application. Probably I would not create dependencies between Oracle JET and ADF Faces components rendered on the same page. Oracle JET should render data coming from REST services, while ADF Faces should work with data obtained from ADF Bindings layer.
    Download - SimpleADFApp.zip

Wednesday, November 11, 2015

JDev/ADF sample - ADF 12.2.1 Responsive Dashboard with Masonry Layout

  • ADF 12.2.1 Responsive Dashboard with Masonry Layout. ADF 12.2.1 is a breakthrough in responsive UI. Never before it was so easy to implement good looking and high performance ADF UI. Masonry layout component allows to develop responsive dashboard made from separate tiles. Tiles can be reordered, resized and even removed. Tiles layout is dynamically constructed based on available screen size.
    Download - DashboardApp.zip

Sunday, November 8, 2015

JDev/ADF sample - Oracle JET - Rendering Table from ADF BC REST Service

  • Oracle JET - Rendering Table from ADF BC REST Service. Oracle JET - new tool for us to build UI applications with JavaScript. Right now there is no out of the box integration with ADF Faces, I heard on OOW there might be some sort of integration available in the future. At the end of the day this is only JavaScript and you can integrate it into existing ADF page by yourself. Probably you would not want this, ADF Faces offers very rich set of functionalities and there is no need in extra components. Unless you would like to use WebSockets in ADF and would like to push data from JavaScript into DVT components - it could be easier to do this with JET, instead of going through ADF Bindings layer.
    Download - SimpleJETApp.zip

Thursday, November 5, 2015

Wednesday, October 28, 2015

JDev/ADF sample - ADF 12.2.1 ADF BC Support for REST

    Download - ADFBCRestApp.zip

Tuesday, October 27, 2015

JDev/ADF sample - ADF 12.2.1 Responsive UI Improvements

  • ADF 12.2.1 Responsive UI Improvements. ADF 12.2.1 provides much better responsive UI support comparing to previous version ADF 12.1.3. Previously we were using CSS media queries to hide/show facets. This worked, but it was not great from performance point of view. Same region was duplicated into different facets, both loaded into memory, but only one displayed. ADF 12.2.1 comes with new tag af:matchMediaBehaviour, this tag is using CSS media query to detect screen size, and it updates layout component property. No need anymore to use different facets, we can update properties directly.
    Download - ADFResponsiveUIApp.zip

Saturday, October 17, 2015

JDev/ADF sample - Switching Alta UI and Skyros on Runtime ADF 12c

  • Switching Alta UI and Skyros on Runtime ADF 12c. Skyros UI can be useful for heavy data entry screens. Both Alta UI and Skyros can be integrated into one application, depending on the form/module opened - application UI can be switched and render based on selected skin. This could be good compromise for front end screens implemented with Alta UI and heavy data entry screens with Skyros.
    Download - ADFAltaApp_v12.zip

Saturday, October 10, 2015

JDev/ADF sample - Dashboard Implementation with ADF 12c Alta UI

  • Dashboard Implementation with ADF 12c Alta UI. Alta UI in ADF 12c provides great options for dashboard implementation. You can use so called 'info tiles' as blocks displaying summary information. These blocks are clickable and based on active tile, content can be rendered. It looks not only modern, but also user friendly.
    Download - ADFAltaApp_v11.zip

Tuesday, September 29, 2015

JDev/ADF sample - Smart Combo Box LOV Based on Description Attribute

    Download - SmartComboLOV_v2.zip

Friday, September 25, 2015

JDev/ADF sample - Master-Detail Pattern Implementation in ADF 12c Alta UI

  • Master-Detail Pattern Implementation in ADF 12c Alta UI. ADF 12c and Alta UI change the way how we used to implement UI in ADF. Let's take a look into Master-Detail. Before Alta UI usual implementation for Master-Detail would be based on vertical layout with master on the top and details below. Alta UI provides different patterns like left-right, bottom-top for Master-Detail implementation - Oracle Alta UI Patterns. I would recommend to watch a demo from Shay Shmeltzer, he explains how to build left-right Master-Detail - Developing Your First Oracle Alta UI page with Oracle ADF Faces. In my post I'm taking a step further and explaining how to manage Master-Detail relationship between different regions.
    Download - ADFAltaApp_v10.zip