Posts

Showing posts with the label adf

ADF 12c BC Proxy User DB Connection and Save Point Error

Image
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). Proxy connection is established from prepareSession method in generic AM Impl class: If I would change salary value to negative and save data - DB constraint error would fire (negative not allowed). Unfortunately, end user would not see that error - he gets message about failed save point: ...

ADF Client Side Validation with JavaScript

Image
ADF Client Side Validation with JavaScript In my previous post I explained how to use JS client side formatter for ADF Faces input components - ADF Goes Client Side - UI Performance Boost with JavaScript. The same principle can be applied for client side validation. Most likely you are not going to implement complex validation rules on the client side, but for simple checks - it will be perfect. There will be no roundtrip to the server and this will allow to improve user experience. Client side validation check runs instantly when value is changed and there is no need to set Auto Submit = true to send value to the server. This rule checks value to be in certain range, similar simple checks can be implemented on client side (Im sure you will find similar rules in your project): If value is in range, client side formatter is applied as expected: Custom JSF converter is registered in faces-config.xml and can be added to the input field either manually or dropped through the wizard: Conver...

ADF Performance on Docker Lighting Fast

Image
ADF Performance on Docker Lighting Fast ADF performance depends on server processing power. Sometimes ADF is blamed for poor performance, but in most of the cases real issue is related to poor server hardware, bad programming style or slow response from DB. Goal of this post is to show how fast ADF request could execute and give away couple of suggestions how to minimize ADF request time. This would apply to ADF application running on any environment, not only Docker. Im using ADF Alta UI based list application with edit fragment. Rule number one - enable response compression. This will allow to transfer less data and obviously response will execute faster - shorter content download time. See in the screenshot below - JS file is compressed to 87 KB from original 411 KB. Initial page load in ADF generates around 3 MB of content (if this is very first access and static content is not cached yet on client side). With compression initial load of 3 MB will be around 300 - 400 KB. Thats a bi...

ADF PopUp Event Context Launcher

Image
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. In this example - popup is loaded from context info. Launcher component - output text is assigned with attribute, reading its value from binding. Our goal is to pass attribute value into popup: In order to be able to read attribute value from launcher parent component, make sure to set eventContext="launcher" for ADF popup: You can reference parent UI component from launcher property, this can be done in popup fetch listener - where value will be copied to managed bean property: We could process launcher parent component in managed bean, extract values, etc.: Value retrieved from popup launcher is displayed in the popup: Download sample application - PopUpEventContextApp.zip go to link download

ADF BC Create View Object From Query with Custom Implementation Class

Image
ADF BC Create View Object From Query with Custom Implementation Class I had a request to explain how to create dynamic ADF BC VO from SQL statement and set custom VO implementation class for newly created VO instance. Custom VO implementation class extends from ADF BC ViewObjectImpl and overrides super method: There is a method createViewObjectFromQueryStmt , in previous ADF versions this method had two parameters - VO instance name and SQL statement. In current ADF 12c - there is a second signature of the same method, which contains option to specify VO implementation class name. Dynamic VO from SQL with VO implementation class: ADF BC custom methods can be tested with ADF BC tester: Overridden method from custom VO implementation class is called: Download sample application - ADFVOFromSQLApp.zip. go to link download

ADF BC REST Service from ADF Library JAR

Image
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. Sample app is based on two JDEV projects - library and master applications. Library application contains ADF BC REST implementation for Employees VO: ADF Library is generated out of ViewController project, ADF BC REST is packaged through dependency: Model (enabled with ADF BC support) project in Master application imports ADF library: Run Master application by running REST project. There is improvement in JDEV 12.2.1.3 comparing to 12.2.1.2 - re-deployment...