Tuesday, June 4, 2019

JDev/ADF sample - ADF Faces and Client Side Value with innerHTML

    Download - GitHub

Wednesday, February 20, 2019

JDev/ADF sample - Intercepting ADF Table Column Show/Hide Event with Custom Change Manager Class

  • Intercepting ADF Table Column Show/Hide Event with Custom Change Manager Class. Ever wondered how to intercept ADF table column show/hide event from ADF Panel Collection component? Yes, you could use ADF MDS functionality to store user preference for table visible columns. But what if you would want to implement it yourself without using MDS? Actually, this is possible through custom persistence manager class. I will show you how.
    Download - GitHub

Saturday, January 19, 2019

JDev/ADF sample - Oracle ADF BC Reusing SQL from Statement Cache

  • Oracle ADF BC Reusing SQL from Statement Cache. Oracle ADF BC by default is trying to reuse prepared SQL query from statement cache. It works this way when ADF BC runs with DB pooling off (jbo.doconnectionpooling=false). Normally we tune ADF application to run with DB pooling on (jbo.doconnectionpooling=true), this allows to release unused DB connection back to the pool when a request is completed (and in this case, statement cache will not be used anyway). If View Object is re-executed multiple times during the same request - in this situation, it will use statement cache too.
    Download - GitHub

Sunday, December 23, 2018

JDev/ADF sample - Understanding Attributes Enum in ADF BC Row Class

  • Understanding Attributes Enum in ADF BC Row Class. Did you ever wonder why Attributes Enum is generated by JDeveloper in Entity or View Row class? Attributes Enum holds a collection of attribute names and there is a set of static variables with attribute indexes. These indexes are used to locate attribute in getter/setter. Attributes Enum is a structure which is required for JDeveloper on design time to generate Java code. On runtime Attributes Enum is needed only as long as you are using a static variable index in the getter/setter.
    Download - GitHub

Sunday, November 25, 2018

JDev/ADF sample - Oracle ADF + Jasper Visualize.js = Awesome

  • Oracle ADF + Jasper Visualize.js = Awesome. This week I was working on a task to integrate Jasper Visualize.js into Oracle ADF application JSF page fragment. I must say integration was successful and Jasper report renders very well in Oracle ADF screen with the help of Visualize.js. Great thing about Visualize.js - it renders report in ADF page through client side HTML/JS, there is no iFrame. Report HTML structure is included into HTML generated by ADF, this allows to use CSS to control report size and make it responsive.
    Download - GitHub

Sunday, July 15, 2018

JDev/ADF sample - ADF Postback Payload Size Optimization

  • ADF Postback Payload Size Optimization. Recently I came across property called oracle.adf.view.rich.POSTBACK_PAYLOAD_TYPE. This property helps to optimize postback payload size. It is described in ADF Faces configuration section - A.2.3.16 Postback Payload Size Optimization. ADF partial request is executing HTTP post with values from all fields included. When postback property is set to dirty, it will include into HTTP post only changed values. As result - server will get only changed attributes, potentially this can reduce server time processing and make HTTP request size smaller. This especially can be important for large forms, with many fields.
    Download - GitHub

Tuesday, May 29, 2018

JDev/ADF sample - Effective Way to Get Changed Rows in ADF BC API

  • Effective Way to Get Changed Rows in ADF BC API. Did you ever wondered how to get all changed rows in the transaction, without iterating through entire row set? It turns out to be pretty simple with ADF BC API method - getAllEntityInstancesIterator, which is invoked for Entity Definition attached to current VO.
    Download - GitHub

Sunday, May 27, 2018

JDev/ADF sample - Oracle ADF BC REST - Performance Review and Tuning

  • Oracle ADF BC REST - Performance Review and Tuning. I thought to check how well ADF BC REST scales and how fast it performs. For that reason, I implemented sample ADF BC REST application and executed JMeter stress load test against it. You can access source code for application and JMeter script on my GitHub repository. Application is called Blog Visitor Counter app for a reason - I'm using same app to count blog visitors. This means each time you are accessing blog page - ADF BC REST service is triggered in the background and it logs counter value with timestamp (no personal data).
    Download - GitHub

Thursday, May 17, 2018

JDev/ADF sample - Microservice Approach for Web Development - Micro Frontends

  • Microservice Approach for Web Development - Micro Frontends. Wondering what micro frontends term means? Check micro frontends description here. Simply speaking, micro frontend must implement business logic from top to bottom (database, middleware and UI) in isolated environment, it should be reusable and pluggable into main application UI shell. There must be no shared variables between micro frontends. Advantage - distributed teams can work on separate micro frontends, this improves large and modular system development. There is runtime advantage too - if one of the frontends stops working, main application should continue to work.
    Download - GitHub

Thursday, March 22, 2018

JDev/ADF sample - ADF Declarative Component Example

  • ADF Declarative Component Example. ADF Declarative Component support is popular ADF framework feature, but in this post I would like to explain it from slightly different angle. I will show how to pass ADF binding and Java bean objects into component through properties, in these cases when component must show data from ADF bindings, such approach could offer robustness and simplify component development.
    Download - GitHub

Sunday, March 11, 2018

JDev/ADF sample - Find In Cache By Key ADF BC API Method Usage

  • Find In Cache By Key ADF BC API Method Usage. What if you need to verify - if row with given key exists in fetched rowset? This could be useful while implementing validation logic. ADF BC API method findByKey - will trigger SQL call and fetch row from DB, if row with given key doesn't exist in fetched rowset. Luckily there is ADF BC API method called findInCacheByKey, this method only checks for row in fetched rowset, without going to DB - very convenient in certain situations, when you actually don't want to bring record from DB, if it wasn't fetched.
    Download - GitHub

Sunday, February 25, 2018

JDev/ADF sample - Microservices with Oracle ADF Remote Regions

  • Microservices with Oracle ADF Remote Regions. ADF remote regions - functionality available in the latest ADF 12c versions. ADF remote region runs on different server and content is delivered to consuming module through ADF remote region servlet. This allows to decouple large enterprise system into separate modules, each running independently on separate servers. Gained advantage - system becomes more scalable and reliable, even if several modules will be down, system will continue to be functional.
    Download - GitHub

Monday, January 29, 2018

JDev/ADF sample - Avoid Blind SQL Call from ADF Task Flow Method

  • Avoid Blind SQL Call from ADF Task Flow Method. Keep an eye open on ADF Task Flow Method Call activities where methods from ADF Bindings are called. JDEV 12c sets deferred refresh for ADF binding iterators related to TF Method Call activities and this causing blind SQL to be executed. Blind SQL - query without bind variables.
    Download - ADFTFCallBindingApp.zip

Thursday, December 21, 2017

JDev/ADF sample - Recipe for JQuery Menu integration into ADF Faces

  • Recipe for JQuery Menu integration into ADF Faces. May be you are thinking to add some fresh looking element into your ADF app? I would propose JQuery menu. Advantage of such menu - it is purely client side implementation and it allows user to navigate through items really fast. Besides fast navigation, it looks great too and can be easily customized.
    Download - ADFJQueryMenuApp.zip

Tuesday, December 5, 2017

JDev/ADF sample - JET Composite Component in ADF Faces UI - Deep Integration

    Download - jetadfcomposite

Friday, November 10, 2017

JDev/ADF sample - ADF Performance Story - This Time Developer Was Wrong

  • ADF Performance Story - This Time Developer Was Wrong. ADF is fast. If ADF application is slow, most likely this is related to development mistakes. I would like to tell you one story, based on my ADF tuning experience. Problem description: ADF application runs fast in DEV, when DB size is small. Same application runs slow in TEST/PROD, when DB size is large. Question - what is slow. Answer - slow means forms are loading slow. Ok, lets go to the story.
    Download - ADFRangeSizeApp.zip

Sunday, September 17, 2017

JDev/ADF sample - ADF BC REST Service from ADF Library JAR

  • ADF BC REST Service from ADF Library JAR. I had assignment to enable ADF BC REST for existing ADF application, which was developed with multiple ADF libraries. ADF BC REST was supposed to be enabled for one of the ADF libraries and then accessed through Master application. All ADF BC REST samples usually show how to enable REST inside Master application itself. I was curious if it will work to enable ADF BC REST and package it into ADF library, which is consumed from Master application. It worked and I would like to share sample app.
    Download - adfbcrest.zip

Friday, September 8, 2017

JDev/ADF sample - Oracle JET Simple Table with Fake JSON Server

  • Oracle JET Simple Table with Fake JSON Server. What if you want to build JET UI, but there is no back-end REST service ready yet. You could use static JSON data inside JET app and load it from the JSON file. This works, but data retrieval logic will need to be changed after REST service will be ready. This is not productive. Ideally you would like to have fake REST service to simulate REST calls from JET UI, until real REST back-end is ready.
    Download - jetsimplecrud

Sunday, September 3, 2017

JDev/ADF sample - ADF 12c Table CRUD Fix for Auto Focus

  • ADF 12c Table CRUD Fix for Auto Focus. I had a post about how to improve user data entry for ADF table with auto focus for new row - Improving ADF UI Table CRUD Functionality with Auto Focus. If you follow comments thread for that post - you will see described approach doesn't work exactly as it should in ADF 12c (focus is set for new row but later is lost after tab navigation - it should move focus to another column). Thanks to the community we have simple fix for this issue, read OTN Forum thread - Set Focus on CreateINsert row in ADF Table. I hope Oracle will fix this functionality in the next ADF versions (currently they say it is expected behaviour, and I don't agree with this). But for now - fix does the job.
    Download - ADFTableFocusApp_v2.zip

Wednesday, August 30, 2017

JDev/ADF sample - ADF Client Side Validation with JavaScript

    Download - ADFFormattingApp_v2.zip

Saturday, July 29, 2017

JDev/ADF sample - Oracle JET Busy Context API to Control Asynchronous REST Calls

  • Oracle JET Busy Context API to Control Asynchronous REST Calls. I have received feedback from users working with JET UI - sometimes it is not obvious that action button was pressed, users tend to press same button again very fast, which leads to parallel REST calls executing at the same time. In JET - REST call is executed asynchronously, this makes user to believe action was done instantly when button was pressed. However, REST call still may run in the background - while user will be trying to call same service again. While in most of the cases such behaviour is fine, still there are use cases when we want to block action button, until REST response is not received (while response is executed, button will be disabled - this will give visual feedback to the user about action still executing). JET provides Busy Context API to handle asynchronous REST calls in synchronous way.
    Download - JETCRUD

Saturday, July 22, 2017

JDev/ADF sample - ADF Goes Client Side - UI Performance Boost with JavaScript

  • ADF Goes Client Side - UI Performance Boost with JavaScript. If you would like to boost ADF UI performance, you should look into client side validation and formatting options possible to be done in ADF UI. Today I will describe how you can implement client side converter, to format number value on client side, without making request to the server. Same approach could be used to implement client side validators. You can raise error message and it will be assigned to UI field in the same way, just like any standard ADF error message. While this approach is documented long ago in Oracle ADF developer guide - How To Create Client Side Converter, it is not well known and not often used.
    Download - ADFFormattingApp.zip

Sunday, July 16, 2017

JDev/ADF sample - ADF BC - Create View Object From Query with Custom Implementation Class

    Download - ADFVOFromSQLApp.zip

Monday, July 10, 2017

JDev/ADF sample - ADF 12c BC Proxy User DB Connection and Save Point Error

  • ADF 12c BC Proxy User DB Connection and Save Point Error. If you are modernising Oracle Forms system, high chance you need to rely on DB proxy connection. Read more about it in my previous post for ADF 11g - Extending Application Module for ADF BC Proxy User DB Connection. It works in the same way for ADF 12c, but there is issue related to handling DB error, when DB proxy connection is on. DB error is propagated to ADF but is being substituted by save point error (as result - user would not see original error from DB). It seems like related to JDBC driver in 12c. The workaround is to override ADF SQL builder class and disable save point error propagation (there might be better ways to workaround it).
    Download - AMExtendApp_v3.zip

Thursday, July 6, 2017

JDev/ADF sample - Working with Location and Permissions in JET Hybrid

    Download - rslocationapp

Saturday, July 1, 2017

JDev/ADF sample - Oracle JET Router State Control

  • Oracle JET Router State Control. In my use case there is requirement to navigate to JET module, without displaying it in menu structure. Navigation is a simple task, more complex is to make sure current menu item will be unselected after navigation to invisible module (so that later we are able to re-open it).
    Download - JETModularArchitecture

Tuesday, June 27, 2017

JDev/ADF sample - Oracle JET Modular Architecture Example

  • Oracle JET Modular Architecture Example. One of my favourite parts in Oracle JET - modular code structuring support. This allows to split application functionality into modules and reusable functions. In this post I will show how you could leverage Oracle JET modular architecture not only by implementing common code functions, but also by managing data maintained in common modules.
    Download - JETModularArchitecture

Sunday, June 25, 2017

JDev/ADF sample - ADF BC Attribute - Collection Storage Mode Property

  • ADF BC Attribute - Collection Storage Mode Property. I would like to describe one interesting property for ADF BC attribute. This property is called Storage. There are two possible values: row (default) and collection. By default attribute value is saved in row storage, but alternatively it can be saved in collection storage. ADF BC implements collection storage using map which comes from session scope. This allows to keep value even between ADF BC requests, this is ideal for transient attributes.
    Download - ADFBCCheckboxApp.zip

Monday, June 19, 2017

JDev/ADF sample - Fixes for ADF Cloud User Experience Rapid Development Kit (RDK) UI Layout Issues

  • Fixes for ADF Cloud User Experience Rapid Development Kit (RDK) UI Layout Issues. If you was evaluating Oracle RDK UI template, probably you noticed information popup coming up, when RDK home page is loaded. Popup is loaded through showPopupBehavior listener, which is executed on Welcome page load event. Such popup is not required in practice, and usually is disabled. But as soon as you disable it, there will be layout issues with Welcome page. User information widget will not align the name and menu navigation items will not be ordered correctly.
    Download - AppsCloudUIKit_v3.zip

Wednesday, June 14, 2017

JDev/ADF sample - Nice Trick to Get ADF LOV Description Text

    Download - ADFLovDescriptionApp.zip

Saturday, June 3, 2017

JDev/ADF sample - Running ADF BC REST Service Together with ADF Faces Application

  • Running ADF BC REST Service Together with ADF Faces Application. ADF 12c provides out of the box support for ADF BC REST API. It is straightforward to create ADF BC REST service and run it. But what if you would like to expose ADF BC REST for existing ADF application with ADF Faces UI. This could be useful if there is a requirement to handle ADF Bindings access to ADF BC along with light ADF BC REST service API implementation for Oracle JET or other JavaScript clients. The same ADF application could handle two types of client access - ADF Faces and REST.
    Download - ADFFacesRESTApp.zip

Tuesday, May 30, 2017

JDev/ADF sample - ADF PopUp Event Context Launcher

  • ADF PopUp Event Context Launcher. I will describe how you could use ADF popup event context to pass parameters into popup. This could be useful if you want to develop reusable popup, which should accept different type of parameters from various launcher components.
    Download - PopUpEventContextApp.zip

Wednesday, May 3, 2017

JDev/ADF sample - Batch Requests Support in ADF BC REST

  • Batch Requests Support in ADF BC REST. ADF BC REST provides a set of enterprise features for REST, one of them support for batch requests. In single REST batch call we can execute multiple update, insert, delete and get operations. This is important functionality, it allows to minimize number of REST calls from the client and improves client performance. Take a read about it in developer guide - 22.13.7 Making Batch Requests.
    Download - jetcrud

Monday, April 24, 2017

JDev/ADF sample - ADF BC Groovy Expression Security Policy Configuration

  • ADF BC Groovy Expression Security Policy Configuration. Today I'm going to explain how to configure Groovy expression security policy. This could be helpful, if you dont want to change trustMode property to trusted everywhere across the app, but looking for single configuration point.
    Download - GroovyPermissionApp.zip

Monday, April 10, 2017

JDev/ADF sample - ADF Multi Task Flow Binding and Tab Order

  • ADF Multi Task Flow Binding and Tab Order. I had a post while ago about ADF multi task flow binding and loading dynamic regions - Building Custom UI Shell with ADF 11g R2. In that sample, new region was opened in the first tab position. Meaning tab order was from right to left. It is more natural to have left to right tab opening order. This can be done too, check updated sample app - we need to control disclosed property and add new region to the end of array.
    Download - MultiTaskFlowApp_TabOrder.zip

Wednesday, March 29, 2017

JDev/ADF sample - Oracle JET Slider in Foreach Loop

  • Oracle JET Slider in Foreach Loop. While working in the project last week, I had a question from development team - how to render multiple Oracle JET Slider components in foreach loop. I thought this could be useful tip for other developers too.
    Download - JETSliderSample

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