Showing posts with label Workarounds. Show all posts
Showing posts with label Workarounds. Show all posts

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

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

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

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

Monday, November 3, 2014

JDev/ADF sample - MdsMetadataResourceProvider Error in ADF 11.1.1.7

  • MdsMetadataResourceProvider Error in ADF 11.1.1.7. If you have migrated ADF application to ADF 11.1.1.7 version recently, you may see error in the log related to the internal MetadataResourceXmlImpl class usage. Runtime behaviour will not be affected, but there could be many redundant error messages in the log.
    Download - ADFMetadataInternalApp.zip

Sunday, October 12, 2014

JDev/ADF sample - Workaround for ADF 12c Choice List Blank Selection Issue

  • 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

Tuesday, September 16, 2014

JDev/ADF sample - Handling Format for BigDecimal Numbers in ADF BC

  • 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

Saturday, December 21, 2013

JDev/ADF sample - Workaround for Infamous Bug 13626875

  • Workaround for Infamous Bug 13626875. There is such issue logged on Metalink - inputListOfValues Field Not Updated When Selecting A Value Violating A Unique Key. (Doc ID 1402074.1). This is related to LOV functionality and validation. As per Oracle statement - LOV list must include only valid values, list should not return invalid values, this is by LOV design. However, this doesn't sound logical in most of the cases - often LOV may contain complete list of values and for specific attribute we need to enforce validation to accept only a subset of all values available in the list. Despite Oracle answer as such functionality is not possible b design, there is workaround to make it work.
    Download - LOVValidationApp.zip

Saturday, December 8, 2012

JDev/ADF sample - Good To Know - Conflicting View Objects and Shared Entity

  • 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

Friday, November 30, 2012

JDev/ADF sample - Active Data Registration Error in ADF (Some Bugs Never Die)

    Download - ExcelExportFixSampleApp.zip

Sunday, September 9, 2012

JDev/ADF sample - What To Do When ADF Editable Table Misbehaves

  • 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

Monday, July 16, 2012

JDev/ADF sample - Issue with Show Printable Page Behavior in ADF 11g R2 (11.1.2.2.0)

  • 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

Saturday, July 14, 2012

JDev/ADF sample - Tips & Tricks How to Run Oracle BPM 11g PS5 Workspace from Custom ADF 11g Application

    Download - IntegratedBPMWorklistApp_v3.zip

Friday, March 16, 2012

JDev/ADF sample - Adding UI Facets into ADF Page Template Based on Facelets Type

    Download - FaceletsTemplateUI.zip

Tuesday, February 28, 2012

JDev/ADF sample - NullPointerException at ScopeIdAnalyzer - Calling PopUp from Declarative Component

  • NullPointerException at ScopeIdAnalyzer - Calling PopUp from Declarative Component. If you develop advanced ADF declarative components, I'm sure sooner or later you would face requirement to implement custom reusable popup. Ideally we would like to invoke custom reusable popup directly from button declared in the fragment or page. This works well on runtime, but JDeveloper 11g R2 IDE generates internal NullPointerException at ScopeIdAnalyzer - I will show how to workaround it.
    Download - DeclarativePopUpApp.zip

Saturday, December 3, 2011

JDev/ADF sample - Fix Rowset is Forward Only Error for ADF BC LOV Range Paging (11.1.2.1.0)

  • 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

Monday, July 11, 2011

JDev/ADF sample - Unique Key Validation for LOV Based on Reference Attribute

  • 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

Wednesday, December 23, 2009

JDev/ADF sample - Database Connection in ADF BC 11g

  • 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

Thursday, September 17, 2009

JDev/ADF sample - PropertyNotFoundException in Query Criteria LOV Component

  • 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.

Tuesday, April 14, 2009

JDev/ADF sample - Workaround for LOV on Primary Key Attribute in Create Mode

    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.