- 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
- 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
- Workaround for ADF 12c Choice List Blank Selection Issue. I would like to share a workaround for Choice List component in ADF 12c. There is specific issue, related to blank selection - as soon as user selects blank selection in the choice list, it starts to invoke value change listener for that list, each time when any other element is selected in the table. This is quite annoying and could lead to unexpected results, especially if you depend on logic implemented in value change listener.
Download - ADFChoiceList12cApp.zip
- Handling Format for BigDecimal Numbers in ADF BC. This may not be as straightforward as it sounds - to define a format for a number attribute in ADF BC. Especially if you are going to have large number (more than 15 digits). Most likely you are going to experience precision/scale and rounding issues, for BigDecimal and Number type attributes with format mask applied. Sounds frustrating? Yes it is. I hope my blog post will help you to implement proper number formatting.
Download - ADFFormattingApp.zip
- Good To Know - Conflicting View Objects and Shared Entity. While killing various issues and helping developers to get up to speed, during this week I encountered interesting ADF behavior - I would like to share it with you. Firstly it took some time to locate it and then I managed to reproduce it with sample application. Use case: 1 EO and 2 separate VO's, based on the same EO. You should admit, is quite common use case - often we share EO's across different forms and usually we implement dedicated VO's for each form (in most of the cases, hardly we can reuse the same VO with different View Criterias applied, because each form usually have different joins and different Master-Detail View Link relationships). Two separate VO's were conflicting during insert operation, more specifically - overridden create(AttributeList) method was invoked by the framework incorrectly. This method was overridden on VO (not on EO) level for a reason, because even VO's were based on the same EO - DB sequences for each of them were supposed to be different. I will describe it below - I hope it will be more clear at the end of this post, what I'm trying to explain (at this stage I believe is not) :).
Download - EOSharedAccessApp.zip
- What To Do When ADF Editable Table Misbehaves. You know sometimes its a challenge to get correct behavior for ADF editable table - meaning, to have it as much as possible aligned with smooth user experiences. One of the challenges to control when validation rules are fired - often validation is fired too early or too often (same validation error messages are repeated multiple times). In some cases this can be resolved by setting Change Event Policy = None on iterator (default is Auto PPR), but still this doesn't cover all scenarios. There is special case when ADF editable table is set to support multi-selection. With multi-selection enabled, even setting Change Event Policy to None doesn't help - validation is still fired too early. But there is solution - set Immediate property to True for ADF editable table component - this will allow to skip annoying validation messages when editing data. Validation failure messages will show up on transaction commit - invalid fields will be highlighted in red.
Download - AutoPPRApp.zip
- Issue with Show Printable Page Behavior in ADF 11g R2 (11.1.2.2.0). You may experience strange issue in ADF 11g R2 (11.1.2.2.0, 11.1.2.1.0), related to printable page behavior. After af:showPrintablePageBehavior operation is applied, ADF fails to register Active Data for command component on runtime. It doesn't seem to break application completely, but obviously is annoying for the users. Same issue related to Active Data registration is reproduced after applying export to Excel operation. This seems to be a bug and most likely will be fixed in the next ADF versions. There are workarounds how to overcome Active Data registration bug, I will describe them at the end of this post.
Download - PrintPageBehaviorApp.zip
- Fix Rowset is Forward Only Error for ADF BC LOV Range Paging (11.1.2.1.0). This post is based on latest production JDeveloper - 11g R2 (11.1.2.1.0). ADF BC applications typically are working with database, when SQL statements are complex and slow - its good to apply Range Paging for VO's in ADF BC. Range Paging enables ADF BC to prepare SQL statement to retrieve only predefined subset of rows from database - significantly improving data retrieval performance. LOV is one of the elements in ADF applications where we can expect lots of rows to be retrieved - means good candidate to apply Range Paging.
Download - LOVRangePagingFix.zip
- Unique Key Validation for LOV Based on Reference Attribute. While ago I was blogging how to Define LOV on a Reference Attribute in Oracle ADF 11g. Such type of LOV's are defined on description text, not on key. This approach works well, however there are some limitations when applying Unique Key business rule for such type of LOV's. Because LOV is based on read-only reference attribute, and Unique Key business rule is applied for LOV key, updated in the background - Unique Key business rule is not fired correctly for LOV based on reference attribute. I have tested this with JDev PS3, PS4 and R2 releases - same behavior is reproduced - Unique Key business rule is not working for such type of LOV's. User requirement is a must, and I will describe today how to implement Unique Key validation for LOV based on reference attribute, may be not exactly following ADF best practices.
Download - UniqueKeyADFSample.zip
- Database Connection in ADF BC 11g. My colleague was facing ADF BC development question and asked me to help. He sent me whole application, so I was able to open it directly with my local JDeveloper 11g. While investigating actual question, I noticed strange behavior in ADF BC. For example, attribute types were not recognized and I was getting log messages - oracle.jbo.domain.Number not found. Check this blog post for solution.
Download - DatabaseConnectionADFBC.zip
- PropertyNotFoundException in Query Criteria LOV Component. Recently I have noticed strange errors while using LOV components in Query Criteria. Well, its known issue that you can't have two or more return elements in LOV component present in Query Criteria. But, in my case I was returning only one element - key attribute, and still I was getting error. This error was - javax.el.PropertyNotFoundException. Lucky me - I found the reason for this error, now my LOV is working properly in Query Criteria as well. I will describe what was a trick.
Download - LOVQueryCriteriaWorkaround.zip
Spanish Summary:En este post se describe como solucionar un bug de la herramienta que se produce cuando se intenta crear LOV (Lista de Valores) con 2 valores de retorno.
Download - LOVPrimaryKeyCreate.zip
Spanish Summary:Este post es una actualización de un post anterior en el que Andrejus muestra como evitar un bug que se produce cuando queremos trabajar con una Lista de Valores (LOV) sobre un campo de una tabla. El post anterior solo consideraba el uso de LOV cuando la tabla estaba en modo de consulta, sin embargo esta actualización considera las tablas en modo creacion y lectura.