Sunday, March 12, 2017

JDev/ADF sample - Improved Display for Empty Field Values in ADF Form

  • Improved Display for Empty Field Values in ADF Form. I had a task in the project, to improve display for empty field in ADF form. By default, if there is no row data in the result - all input text entries in ADF form will be hidden, user will see only labels. This is not ideal, most of time users would prefer to see disabled input text boxes instead.
    Download - ADFDataEntryUIApp.zip

Friday, February 17, 2017

JDev/ADF sample - ADF Editable Table - Recommendation For Data Entry Optimization

  • ADF Editable Table - Recommendation For Data Entry Optimization. I will explain data entry use case related to ADF table. Specifically I will talk about a bit more complex case, when some columns in the table are set with AutoSubmit=true, to force values to be submitted to the server on change. This can be required when validation rule must be processed on value change or there are dependent re-calculated fields in the same row.
    Download - GroovyADFApp_v3.zip

Tuesday, February 7, 2017

JDev/ADF sample - Setting Invalid Fields for the UI in ADF BC Groovy

  • Setting Invalid Fields for the UI in ADF BC Groovy. What if you have entity level validation rule and want to attach validation error message to specific field. By default this is not possible - all entity level validation error messages are displayed in the popup and are not attached to the fields (differently than attribute level validation rule messages).
    Download - GroovyADFApp.zip

Friday, February 3, 2017

JDev/ADF sample - ADF 12c New Groovy API to Work with View Object Methods

  • ADF 12c New Groovy API to Work with View Object Methods. I have interesting topic to share - new Groovy API in ADF to work with View Object, apply View Criteria, execute it. I have discovered it while experimenting with new features and functionality in ADF 12c. Starting from ADF 12.2.1, we have an option to code Groovy in separate file with extension .bcs - ADF BC Groovy Improvements in ADF 12.2.1. This makes sense especially with this new Groovy API - it is more convenient to code/maintain more complex Groovy logic in separate file. As Oracle docs say - Groovy runs faster when it is coded in separate .bcs file, probably there is no need to parse XML to extract and execute expression.
    Download - GroovyADFApp.zip

Sunday, January 29, 2017

JDev/ADF sample - Contextual Event API Improvements in ADF 12.2.1.x

  • Contextual Event API Improvements in ADF 12.2.1.x. ADF 12.2.1.x brings improved API support for Contextual Event implementation - this should simplify Contextual Event usage. Now Contextual Events can be produced without referencing ActionEvent or SelectionEvent, also there is no need to define Data Control to implement Contextual Event handler. Read more in ADF 12.2.1.x documentation - 46.4 Creating Contextual Events Using Managed Beans. I will provide example and explanation how to use these improvements.
    Download - ContextualEventApp.zip

Sunday, January 22, 2017

JDev/ADF sample - SQL Bind Variable Support in ADF BC REST

  • SQL Bind Variable Support in ADF BC REST. Is not that obvious from Oracle ADF BC REST developer guide how to provide value for bind variable defined directly in the View Object SQL statement. I did research around this and would like to post few hints to make your life easier, if you have same requirement - pass values from REST request to View Object required bind variables. This topic is especially useful, when you want to reuse existing ADF BC implementation for ADF BC REST access.
    Download - jetcrud

Wednesday, January 18, 2017

JDev/ADF sample - Multi Language Support in Oracle JET

  • Multi Language Support in Oracle JET. There is great post from Geertjan Wielenga about Translating Oracle JET Applications. If you want to introduce multi language support into JET app - this is great place to start reading from. We are building production Oracle Cloud app with ADF BC REST and JET. This app requires multi language support - English and Lithuanian. I will describe below how we integrated multi language into various areas in the app.
    Download - JETPlaygroundApp

Saturday, January 7, 2017

JDev/ADF sample - Oracle JET Router API Example

  • Oracle JET Router API Example. One of the examples of JET Router API usage - sign-in/sign-out implementation. After sign-in we need to change menu structure and allow access to application modules, on sign-out menu structure should be changed again. JET Router API allows to manage application navigation and menu structure from JavaScript. Check complete API methods list here - JSDoc: Class: Router.
    Download - JETPlaygroundApp

Tuesday, December 27, 2016

JDev/ADF sample - ADF BC REST 12.2.1.2 Custom Method JDeveloper Workaround

  • ADF BC REST 12.2.1.2 Custom Method JDeveloper Workaround. Some of you who would try to implement custom method with ADF BC REST may face JDeveloper 12.2.1.2 wizard issue. JDeveloper 12.2.1.2 wizard is refusing to register ADF BC REST custom method, but it works perfectly on ADF runtime. Seems to be JDeveloper 12.2.1.1 - 12.2.1.2 bug. There is a workaround to modify REST service configuration manually and include custom method binding.
    Download - jetcrud

Monday, December 26, 2016

JDev/ADF sample - ADF REST Framework Version 2 (and later) - 12.2.1.2

    Download - jetcrud

Wednesday, December 21, 2016

JDev/ADF sample - Skip LOV Validation for ADF BC Bulk Insert

  • Skip LOV Validation for ADF BC Bulk Insert. This post is about ADF BC LOV. I will describe how you could optimize bulk insert of new rows into VO, when some of the attributes are assigned with LOVs. By default ADF would validate new row attribute value through LOV (LOV Validation and Programmatic Row Insert Performance) for each new row. This will lead to bad performance, especially if you insert a set of new rows programmatically - there will be multiple SQL queries executed to check if LOV attribute value exists.
    Download - LOVValidationBulkInsertApp.zip

Saturday, December 17, 2016

JDev/ADF sample - JET Application - Generate with Yeoman - Debug in NetBeans

  • JET Application - Generate with Yeoman - Debug in NetBeans. Let's take a look today how to debug JET application which is initially generated with Yeoman. We could debug in NetBeans, but by default application generated with Yeoman is not runnable in NetBeans, we need to add manually some config files - I will describe how. Also note - JET application created with NetBeans can't be directly served with grunt from command line, it also would require manual changes in the config. It would be nice if Oracle would make JET applications generated with Yeoman automatically runnable in NetBeans and vice versa.
    Download - basicjetapp

Saturday, December 10, 2016

JDev/ADF sample - Early ADF Model Update with Process Updates Method

  • Early ADF Model Update with Process Updates Method. This use case specifically useful for ADF UI value change listener. If there is business logic to be invoked when field value is changed, we can can call ADF BC custom method from assigned value change listener. However new value is not yet propagated down to ADF BC model - we would need to pass it as parameter to custom method. What if want to have new value to be available in ADF BC model without passing new value from value change listener as parameter? This is possible if we call processUpdates method in value change listener, before calling custom ADF BC method.
    Download - ADFProcessUpdatesApp.zip

Monday, December 5, 2016

JDev/ADF sample - Simple CRUD Implementation with Oracle JET - Part III

    Download - from GitHub jetcrud

Thursday, December 1, 2016

JDev/ADF sample - Better Oracle JET Code Structuring with Your Own Modules - Part II

  • Better Oracle JET Code Structuring with Your Own Modules - Part II. You can end up into long lines of JavaScript code when implementing more complex use cases in JET. This will complicate maintenance and make code hardly readable. To prevent this - plan code structure carefully and use your own modules. Structure code into different modules - to reuse common code across multiple use cases.
    Download - from GitHub jetcrud

Saturday, November 26, 2016

JDev/ADF sample - ADF 12.2.1.1 New Feature - Masonry Layout Custom Size Dashboard

    Download - from GitHub ADFAltaApp

Saturday, November 19, 2016

JDev/ADF sample - Oracle JET CRUD - Search and Edit Form - Part I

  • Oracle JET CRUD - Search and Edit Form - Part I. I'm going to post a series of articles about CRUD functionality (on top of ADF BC) implementation in JET. I already had a couple of posts about JET CRUD implementation, this new series will bring improved and simplified structure for JET code implementation.
    Download - GitHub repository

Thursday, November 10, 2016

JDev/ADF sample - ADF LOV Auto Suggest Functionality

  • ADF LOV Auto Suggest Functionality. ADF Faces LOV component can be easily enabled with auto suggest functionality. This is really powerful feature and should save time for user to search for required list values.
    Download - ADFLovAutoSuggestApp.zip

Thursday, November 3, 2016

JDev/ADF sample - Oracle JET Composite Component and ADF BC REST

  • Oracle JET Composite Component and ADF BC REST. I decided to implement sample app for JET composite component. This is powerful thing, it allows to build pretty much any UIs with HTML - package as components and reuse in the apps. Not only UI - JET composite component gets data as any other standard JET component. This allows to build your own components for forms, tables, various widgets. It allows to simplify code complexity, you could hide frequently used code into JET components and use component with parameters only on the page.
    Download - JETSimpleCompositeApp.zip

Thursday, October 27, 2016

JDev/ADF sample - ADF Regions and Shared Data Control Bindings Use Case

  • ADF Regions and Shared Data Control Bindings Use Case. While teaching ADF trainings and talking to ADF developers, often I can see people think about ADF bindings as about some mistery and try to avoid using full potential of ADF Data Control. I would like to give simple, but practical example in this post, which describes how to use ADF bindings and access these bindings across different ADF regions.
    Download - BindingAccessApp.zip

Tuesday, October 18, 2016

JDev/ADF sample - Oracle JET Example - Implementing Editable Collection Table

    Download - JETEditableTableApp.zip

Saturday, October 15, 2016

JDev/ADF sample - JDeveloper 12.2.1.1 Bug and Workaround - Wrong Instance Name for Method Action Binding

    Download - ADFOperationBindingApp.zip

Thursday, October 6, 2016

JDev/ADF sample - Oracle JET and ADF BC REST Security Integration Approach

  • Oracle JET and ADF BC REST Security Integration Approach. I have promised to atendee of my OOW'16 session (Building Enterprise-Grade Mobile Apps with Oracle JET and Cordova [CON5731]) to post a blog about ADF BC REST security and integration with Oracle JET. This post is to demonstrate how we could reuse cookie ID generated by ADF BC REST Web session for REST requests from JET.
    Download - jet_adfbc_security.zip

Tuesday, September 27, 2016

JDev/ADF sample - BPM Worklist API 12.2.1.1 and Custom ADF 12.2.1.1 Application

    Download - adfbpm12211.zip

Saturday, September 17, 2016

JDev/ADF sample - Dynamic Flying Dashboard UI in ADF 12.2.1.1

    Download - ADFIntegrationDashboard_v2.zip

Thursday, September 8, 2016

JDev/ADF sample - Workaround for ADF 12.2.1.1 Match Media Behavior Tag

  • Workaround for ADF 12.2.1.1 Match Media Behavior Tag. If you run ADF 12.2.1.1 application with adaptive UI implemented by af:matchMediaBehavior tag (ADF 12.2.1 Responsive UI Improvements), most likely you will face Null Pointer Exception in Match Media Behavior tag class. Apparently af:matchMediaBehavior tag expects default value to be set on UI component. If default value is not set explicitly, it fails to read it and generates exception (this was not the case in ADF 12.2.1).
    Download - ADFResponsiveUIApp_v2.zip

Tuesday, August 30, 2016

JDev/ADF sample - Generic BigDecimal Formatter in ADF 12.2.1.1

    Download - ADFFormattingApp_12211.zip

Wednesday, August 10, 2016

JDev/ADF sample - Calling Mobile Cloud REST Service from Oracle JET

    Download - release_jet_mcs_v1.zip

Monday, August 1, 2016

JDev/ADF sample - Oracle MCS with ADF BC REST Connector

  • Oracle MCS with ADF BC REST Connector. We already learned how to deploy and access ADF BC REST services from Oracle Java Cloud - ADF BC REST 12.2.1.0 Running Live in Oracle Java Cloud. It's time to see how ADF BC REST can be consumed by Oracle Mobile Cloud Service (MCS). In my point of view, key benefit of MCS is ability to simplify Web Service access for mobile clients, by aggregating these Web Services from different sources and simplifying them. I will try to describe it in very structure way, how to define MCS interface based on ADF BC REST.
    Download - employees_v3.0.zip

Wednesday, July 27, 2016

JDev/ADF sample - ADF BC REST 12.2.1.0 Running Live in Oracle Java Cloud

  • ADF BC REST 12.2.1.0 Running Live in Oracle Java Cloud. It passed almost two years since my previous post about Oracle Java Cloud and ADF - End-To-End ADF Cloud Deployment Process. There is huge improvement in Oracle Cloud, great progress done in these two years by Oracle. Access and management of Oracle Cloud environment is so smooth now, it is even hard to say you are working with your own on premise servers or cloud machines. This is great, I'm impressed - well done Oracle.
    Download - ADFBCRestApp_v9.zip

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