Thursday, October 23, 2014

JDev/ADF sample - ADF BC View Object SQL Query Customization with MDS

    Download - MDSCustomizationsApp_v2.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

Wednesday, October 8, 2014

JDev/ADF sample - New Alta UI for ADF UI Shell Application

    Download - MultiTaskFlowApp_v12c.zip

Saturday, September 27, 2014

JDev/ADF sample - Suppressing ADF LOV Like Operator Filtering

  • Suppressing ADF LOV Like Operator Filtering. ADF LOV component provides filtering option with STARTSWITH operation. This is used to check if similar value exists in the LOV, if such value exists - LOV popup is opened with all the suggested values. If user types 10 and there are 100, 1000 in the LOV, instead of accepting value 10 - LOV popup will be opened and all three values 10, 100, 1000 will be displayed. While this is useful, there is no option to turn off such functionality. My post describes a solution, that can be used to disable suggested LOV filtering.
    Download - ADFTableApp.zip

Tuesday, September 23, 2014

JDev/ADF sample - ADF Region Data Synchronisation with Change Event Policy

  • ADF Region Data Synchronisation with Change Event Policy. This post applies for multiple ADF regions, based on the same Data Control. I will show you can avoid using ADF Contextual Events to synchronise two ADF regions, when both are based on the same Data Control and this Data Control is shared between the two.
    Download - RegionCommunicationApp.zip

Saturday, September 20, 2014

JDev/ADF sample - JDeveloper 12c ADF View Token Performance Improvement

  • JDeveloper 12c ADF View Token Performance Improvement. There is known limitation in ADF 11g, related to accessing application in the same session from multiple browser tabs. While working with multiple browser tabs, eventually user is going to consume all view tokens, he will get timeout error once he returns back to the previous browser tab. Unused browser tab is producing timeout, because ADF 11g is sharing the same cache of view tokens for all browser tabs in the same session. This means the recent mostly used browser tab is going to consume all view tokens, other browser tab would loose the last token and screen state will be reset. This behaviour is greatly improved in ADF 12c with separate view token cache supported per each browser tab. If your application is designed to allow user access through multiple browser tabs in the same session, you should upgrade to ADF 12c for better performance.
    Download - ViewTokensTest.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

Wednesday, September 10, 2014

JDev/ADF sample - ADF BC View Object Change Notification Listener

  • ADF BC View Object Change Notification Listener. ADF BC allows to define triggers to listen for row changes on VO level. We can listen for row updates, inserts and deletes. This can be useful, if you would like to invoke specific audit method or call custom methods to populate dependent transient VO's with updated data.
    Download - ADFBCListenerApp.zip

Sunday, September 7, 2014

JDev/ADF sample - Calculating HTML ID for ADF UI Table Row

  • Calculating HTML ID for ADF UI Table Row. Each row in ADF UI table is assigned with ID, this is how rows are referenced in HTML. I had a blog post describing how to set a focus for newly inserted row - Improving ADF UI Table CRUD Functionality with Auto Focus. I'm getting ID for selected row using getClientRowKey method and this method returns row identifier, the one which is used in HTML. Blog reader was trying to use the same method to get ID for any row from the table, but it didn't worked for him. The trick is how to construct a key properly, to use this key to retrieve ID. I'm going to describe it in this quick sample application below.
    Download - ADFTableFocusApp_v2.zip

Saturday, September 6, 2014

JDev/ADF sample - Automatically Applying Get Posted Attribute Method for Row Refresh

  • Automatically Applying Get Posted Attribute Method for Row Refresh. There is out of the box ADF BC method available to refresh current row, see this post for details - Refreshing Single Row Without Full Rollback. There could be use cases, when refresh method is not sufficient (particularly for a row with dependent LOV's) - it may not reset data correctly. Also there is extra SQL query sent to DB, to fetch row data by key. Even it works well most of the time, still it is good to know the alternative. I'm going to present alternative row refresh approach here, using getPostedAttribute method.
    Download - CustomRowRefreshApp.zip

Friday, August 29, 2014

JDev/ADF sample - End-To-End ADF Cloud Deployment Process

  • End-To-End ADF Cloud Deployment Process. ADF and ADF BC perfectly runs on Oracle Java Cloud. You could deploy regular ADF application straight away from familiar JDeveloper environment without any hassle. With this blog post I would like to walk through the process of migrating DB model to the cloud and deploying ADF application (enabled with ADF Security) to the cloud.
    Download - TreeComponentsCloud.zip

Sunday, August 24, 2014

JDev/ADF sample - Transactional Data Caching for ADF Mobile MAF Application

    Download - MAFMobileLocalApp_v4.zip

Tuesday, August 19, 2014

JDev/ADF sample - Accessing ADF Iterator Binding from Value Change Listener

  • Accessing ADF Iterator Binding from Value Change Listener. This is a quick hint about how to access ADF iterator binding from value change listener method. Let's say you have generic value change listener, reusable with any kind of input components and you want to get information about underlying ADF BC View Object structure in that listener. Value Change Listener provides access to UI Component, we should evaluate component expression and look up in the bindings for component binding name.
    Download - ADFIteratorAccessApp.zip

Tuesday, August 12, 2014

JDev/ADF sample - Data Caching Implementation for ADF Mobile MAF Application

  • Data Caching Implementation for ADF Mobile MAF Application. If you are building mobile application with web service call integration, you must take into account data caching strategy. Without data caching, mobile application will try to establish too many connections with the server - this will use a lot of bandwidth and slow down mobile application performance. This post will be focused around the scenario of implementing simple data caching strategy. In my next post, I'm planning to review MAF persistence framework from Steven Davelaar - this framework is powerful and flexible. Simple data caching strategy makes sense for smaller use cases, when we don't need to use additional framework for persistence.
    Download - MAFMobileLocalApp_v3.zip

Thursday, August 7, 2014

JDev/ADF sample - ADF Thematic Map in ADF 12c (12.1.3)

    Download - ThematicMapApp.zip

Tuesday, August 5, 2014

JDev/ADF sample - Standard ADF BC Passivation/Activation for Transient View Object

  • Standard ADF BC Passivation/Activation for Transient View Object. If you want to implement transient View Object in ADF BC, you must make sure it will be passivation/activation ready, otherwise you may loose data. There are several ways how to achieve passivation/activation for such View Objects - override passivation/activation lifecycle and handle transient View Object rows programmatically or reinitialise transient View Object rows from Application Module prepareSession method. There is one more solution, I'm going to describe it in this post. It is based on dummy SQL based View Object, designed to to store transient attribute values.
    Download - ADFTransientVOPassivationApp.zip

Sunday, August 3, 2014

JDev/ADF sample - Handling Rollback Operation for ADF Input Components with Immediate Property

  • Handling Rollback Operation for ADF Input Components with Immediate Property. One of my colleagues is implementing advanced dynamic ADF BC/ADF UI functionality. To force validation to be invoked properly, he must use ADF UI input components set with Immediate=true property. This allows to keep validation messages always displayed, even if user navigates to edit another dynamic ADF UI input attribute, until form is submitted or canceled. However, as by JSF design - usage of input components with Immediate=true, blocks execution of command components, if there are validation errors available. This means - user can't use Cancel button to reset the form with validation errors, until he would fix these errors manually. However, there is a potential solution - we could use ADF subform component to isolate input components, with a combination of ADF View reload to refresh rendered UI.
    Download - ADFAttributeImmediateApp.zip

Saturday, July 26, 2014

JDev/ADF sample - Oracle BPM 12c Installation Improvements and Issues with Mac

  • Oracle BPM 12c Installation Improvements and Issues with Mac. Oracle BPM 12c is improved with a great installation process - simplified and stable. You only need to download single installation package, run a wizard and after several clicks it gets installed. All required products are installed for you out of the box, no extra configuration is needed - JDeveloper, BPM/SOA extensions, BPM/SOA schemas in Java DB. Developer can focus on his development tasks, no need to spend days to install and configure development environment. You should read official guide - Quick Start for Oracle Business Process Management Suite.
    Download - BpmApplication.zip

Friday, July 25, 2014

JDev/ADF sample - MDS Support for Mobile Application Framework (MAF) in JDeveloper 12c (12.1.3)

    Download - MAFMobileLocalApp_v2.zip

Thursday, July 17, 2014

JDev/ADF sample - ADF Mobile 12c (MAF) Support for Master-Detail Data Control

  • ADF Mobile 12c (MAF) Support for Master-Detail Data Control. ADF 12c is shipped with renamed mobile platform framework - Oracle Mobile Application Framework (MAF). Previously this was named ADF Mobile. 12c MAF is based on ADF Mobile and provides additional functionality and improvements. Everyone familiar with ADF Mobile 11g, should get up to speed with 12c without issues. I would like to highlight one interesting improvement implemented in 12c MAF - out of the box support for Master-Detail relationship. In previous 11g release, master record key was not preserved across different pages - developer was forced to store selected key in memory, to call execute method through invoke action in the second page and finally to reset a key. There was an alternative solution, described by Steven Davelaar - ADF Mobile – Preserving the Current Row Across Pages. Approach described in Steven's blog seems to be integrated into 12c MAF, there is no need to manage selected Master key manually, framework does this for you.
    Download - MAFMobileLocalApp.zip

Saturday, July 12, 2014

JDev/ADF sample - ADF 12c (12.1.3) Line Chart Overview Feature

  • ADF 12c (12.1.3) Line Chart Overview Feature. ADF 12c (12.1.3) is shipped with completely rewritten DVT components, there are no graphs anymore - they are called charts now. But there are much more, besides only a name change. Previous DVT components are still running fine, but JDeveloper wizards are not supporting them anymore. You should check ADF 12c (12.1.3) developer guide for more details, in this post I will focus on line chart overview feature. You should keep in mind, new DVT chart components do not work well with Google Chrome v.35 browser (supposed to be fixed in Google Chrome v.36) - check JDeveloper 12c (12.1.3) release notes.
    Download - ADF12DvtApp.zip

Thursday, July 10, 2014

JDev/ADF sample - ADF 12c (12.1.3) New Feature - ADF Query Item Reordering and Custom Operators

  • ADF 12c (12.1.3) New Feature - ADF Query Item Reordering and Custom Operators. There are quite many new features in ADF 12c (12.1.3). One of them - ADF Query item reordering on runtime, user can choose the order to display criteria items displayed in ADF Query. View Criteria wizard in JDeveloper is updated, besides Criteria UI Hints (as we had before), now developer have access to Item UI Hints (here you can set item visibility, multiple values selection and removable support). Important addition - new tab in the wizard to define and manage Custom Operators for View Criteria items (this was possible before directly in the source code, now we have a wizard).
    Download - ADF12cQueryApp.zip

Tuesday, July 8, 2014

JDev/ADF sample - ADF BC 12c New Feature - Entity-Level Triggers

  • ADF BC 12c New Feature - Entity-Level Triggers. We have triggers support in ADF 12c! Powerful new feature is available - Entity-Level triggers. Previously it was often confusing if certain use case belongs to validation rule, or it is more generic business logic. Everything was implemented as part of validation rule in the EO. ADF 12c provides cleaner approach by supporting option of Entity-Level triggers, along with regular validation rules. Validation logic can be implemented as part of validation rule, non-validation (but still dependent on data management lifecycle) logic can be implemented as part of new Entity-Level trigger.
    Download - ADF12cApp.zip

Saturday, June 28, 2014

JDev/ADF sample - ADF 12c (12.1.3.0.0) - View Object Declarative Mode is Default

    Download - ADFBC12cApp.zip

Friday, June 27, 2014

JDev/ADF sample - Time Selector for ADF Graph and Data Filtering

  • Time Selector for ADF Graph and Data Filtering. ADF graph with date/time data in X axis, could be configured with time selection and scrolling functionality. This could be very useful for such use cases, where we want to analyse specific set of data in the selected period of time. User could select a time range in the graph and display data from the selected range. We are going to include similar functionality into new release of our Red Samurai ADF Performance Audit Tool.
    Download - ADFGraphApp.zip

Friday, June 20, 2014

JDev/ADF sample - ADF BC Reserved Mode for DB Connection Critical Applications

  • ADF BC Reserved Mode for DB Connection Critical Applications. With this post I would like to explain how you can control ADF BC mode and switch from default managed to reserved mode and back. With default managed mode, there is no guarantee in ADF BC for DB connection to stay assigned for the user session. Why it is highly recommended to design your ADF application in such way to be compatible with default managed mode, there are exceptional scenarios when we want to guarantee DB connection to stay the same between requests. Reserved mode allows to guarantee DB connection and there is a way to switch between modes on runtime. You can read more in ADF developer guide - 40.4 Setting the Application Module Release Level at Runtime.
    Download - ReservedModeADFApp.zip

Tuesday, June 10, 2014

JDev/ADF sample - Better Control for ADF UI Shell Tab Closing Order

    Download - MultiTaskFlowApp_v5.zip

Saturday, June 7, 2014

JDev/ADF sample - ADF UI Shell Usability Improvement - Tab Contextual Menu

    Download - MultiTaskFlowApp_v4.zip

Friday, May 30, 2014

JDev/ADF sample - Improving ADF UI Shell - Tab Closing Icon Adjustment

  • Improving ADF UI Shell - Tab Closing Icon Adjustment. Default tab closing icon in ADF UI Shell is located in the top right corner. Users are not really happy about this and there is a demand to have the same positioning as you can see in the Web browsers - directly on the tab. Tab placeholders are implemented in ADF UI Shell with af:navigationPane and af:commandNavigationItem components. Component af:navigationPane supports item removal, this means we can implement tab closing functionality directly in the tab. Unfortunately, out of the box ADF UI Shell template in ADF 11g and 12c is not updated with this adjustment. I will explain how you can implement by yourself, you would need to change ADF UI Shell source code.
    Download - MultiTaskFlowApp_v3.zip

Tuesday, May 27, 2014

JDev/ADF sample - Tab Navigation Performance in UI Shell and Multi Task Flow

  • Tab Navigation Performance in UI Shell and Multi Task Flow. I was investigating performance impact of navigating between tabs in UI Shell template. To compare, as alternative solution for UI Shell, I was using dynamic tabs with Multi Task Flow binding (Building Custom UI Shell with ADF 11g R2). When you switch between tabs in UI Shell, you could notice slight delay. This is normal delay (differently to browser tabs, where no delay), as there should be generated response from the server and JSF tree must be updated. However, it is not clear what is the impact of such delay to application performance. The goal of my post is to answer this question.
    Download - MultiTaskFlowApp_v2.zip

Tuesday, May 20, 2014

JDev/ADF sample - Personalising ADF Query with MDS User Persistence

  • Personalising ADF Query with MDS User Persistence. I bet you are familiar with ADF Query UI having many criteria items. This may look irritating to the users, as there are so many options to use for the search. I will describe alternative approach in this post, with MDS user persistence and personalisation involved. It might be more user friendly, to offer only few criteria items by default and allow to add other items through ADF Query advanced option, together with MDS user persistence feature enabled for personalisation. Post is based on sample application from - ADF Query Saved Search in ADF 12c.
    Download - SavedSearchApp_v2.zip

Thursday, May 15, 2014

JDev/ADF sample - Implementing Dynamic Date Type Formatting with ADF BC

    Download - DynamicFormatADFApp.zip

Sunday, May 11, 2014

JDev/ADF sample - Comparing ADF View Object and Row Fetch Execution Times

  • Comparing ADF View Object and Row Fetch Execution Times. I bet one of the most common doubts ADF developer, or may be DB admin, has - why VO SQL executes slower than the one identical from SQL Plus? This is often the case, but there is nothing VO SQL to blame about. Usually VO SQL executes in almost same time, as it would execute in SQL Plus - but there is extra added time of row fetch. When ADF UI page is rendering, data becomes available after VO is executed and rows are fetched from result. These two separate technical actions, look like one for ADF UI user - data will not be displayed, until it is not fetched. So, there is extra time for row fetch on top of VO SQL query execution. This is why - displaying data in ADF UI, could be slower than displaying it in SQL Plus.
    Download - ADFFetchApp.zip

Sunday, May 4, 2014

JDev/ADF sample - Retrieving WebLogic Server Name and Port in ADF Application

  • Retrieving WebLogic Server Name and Port in ADF Application. It could come handy to know how to get WebLogic server name and port in ADF application. Particularly this could be useful, when running ADF application in the cluster and there is a requirement to track WebLogic node with application session instance running. Usually it is not enough to get server host, as cluster node is accessed through load balancer and server IP is different, not the one visible in HTTP session.
    Download - WLSEnvironmentAccessApp.zip

Thursday, May 1, 2014

JDev/ADF sample - Adaptive Form with Dynamic ADF Attribute Value Binding

  • Adaptive Form with Dynamic ADF Attribute Value Binding. You can implement adaptive forms, generated on runtime using ADF Dynamic Form component in 11g R1 or 11g R2 (keep in mind - ADF Dynamic Form component is not supported with Facelets). In 12c you could use new ADF Dynamic Component to generate adaptive forms. All good, but customisation options are limited. For example, if you would need to define Value Change Listener for adaptive form UI component, this would be quite tricky as there is no direct access to ADF UI component properties.
    Download - DynamicAttributeBindingApp.zip

Monday, April 28, 2014

JDev/ADF sample - EntityLevelOnly Property To Delay Unique Key Validator

  • EntityLevelOnly Property To Delay Unique Key Validator. Idea for this post was kindly suggested by real ADF BC guru and evangelist - Steve Muench. You can check famous ADF Not Yet Documented Examples on Steve's blog - Dive into ADF. The main idea is about composite Unique Key, based on multiple EO attributes. Ideally, users should be allowed to change composite Unique Key values, without getting validation errors too early (before trying to save changes). However, this is not the case by default - and I will explain in this post, how to make it work properly with EntityLevelOnly = true property.
    Download - ComplexUniqueKeyApp.zip

Sunday, April 27, 2014

JDev/ADF sample - Check Box Support in ADF Query (11g R2 and 12c)

  • Check Box Support in ADF Query (11g R2 and 12c). Few years passed since my previous post about check box support in ADF Query - Yes-No Check Box in Query Criteria. It was not working before, but there are improvements in the latest ADF releases. I will describe approach to handle multiple values from the same column, using check box in ADF Query. By default, you could render multiple values with choice list - but there is a way to use a group of choice lists (when column values will be known in advance).
    Download - ADFQueryCheckboxApp.zip

Friday, April 18, 2014

JDev/ADF sample - Case Insensitive Search in LOV - Effective and Generic

  • Case Insensitive Search in LOV - Effective and Generic. Search in LOV dialog window, by default is not case insensitive. You could define View Criteria for LOV VO with case insensitivity and select this criteria to be displayed in LOV dialog. You could do this for one or two, may be for ten LOV's - but I'm sure you are going to get tired pretty soon. Much more effective is to implement generic solution to convert LOV search criteria to be UPPER case automatically.
    Download - ADFDynamicReportUI_v6.zip

Saturday, April 12, 2014

JDev/ADF sample - ADF Query Design Revisited with ADF 12c Panel Drawer

    Download - ADFQueryPreviewApp.zip

Saturday, April 5, 2014

JDev/ADF sample - MDS Seeded Customization Approach with Empty External Project

  • MDS Seeded Customization Approach with Empty External Project. Great feature in ADF - MDS Seeded customisations support. This is particularly useful for independent software vendors, who are developing their own products on top of ADF framework. With MDS Seeded customisation, maintenance for multiple customers becomes easier. We could create customisation, instead of changing original source code - this makes it easier to maintain a product. I would like to share one important hint, related to technical architecture for MDS Seeded customisations - this will be related to the way how MDS Seeded customisations are organised and maintained. By default, you would create MDS Seeded customisation files in the original application, however this is not very clean approach. There is a way to create and keep all MDS Seeded customisation files in empty external application. I will describe in the post, how this can be achieved with a few easy steps.
    Download - MDSCustomizationsApp.zip

Friday, April 4, 2014

JDev/ADF sample - Hide All Search Operators for ADF View Criteria Item

  • Hide All Search Operators for ADF View Criteria Item. During this week work, I received interesting question from ADF developer - how to hide all operators for specific ADF View Criteria item. There is an option to go and hide different operators one by one, following API guide for JboCompOper. You could follow this approach, but there is one smarter way - to hide all operators at once. See below - how.
    Download - ADFQueryNoOperatorsApp.zip

Friday, March 28, 2014

JDev/ADF sample - ADF 11g PS6 Table Pagination and Displaying Selected Row Issue - Solution

  • ADF 11g PS6 Table Pagination and Displaying Selected Row Issue - Solution. While ago, I had a blog post about new feature in ADF 11g PS6 (11.1.1.7) - table pagination support. There is an issue, when we want to open specific row and display it automatically in the table - required table page for the selected row is not opened correctly. However, blog reader suggested a fix, received from Oracle Support. Blog reader was kind enough, to post a comment with suggested fix, you can read it here - JDev/ADF sample - ADF 11g PS6 Table Pagination and Displaying Selected Row Issue. I decided to test this fix myself and provide updated sample application. The fix is to use range start from the iterator and set to it for the first property of the table with pagination. Actually, this fix does the job, but not completely perfect. Current row is displayed, only if Range Size for the iterator is set to 25, probably there is some hard coding somewhere. Ok, but at least it works.
    Download - TablePaginationApp_v5.zip

Wednesday, March 26, 2014

JDev/ADF sample - Alert for ADF Security - JSF 2.0 Vulnerability in ADF 11g R2

  • ADF Alert - Facelets Vulnerability in ADF 11g R2 and 12c. If you are running your application in ADF 11g R2 or 12c environment and using facelets - you should double check, if a source code for the facelet pages is not accessible through the URL. There is another security vulnerability in ADF 11g R2, documented here - Alert for ADF Security - JSF 2.0 Vulnerability in ADF 11g R2. Apparently this is a patch from Oracle for JSF 2.0 vulnerability and also there is a manual fix. However neither patch or manual fix are not applied by default, potentially your source code could be exposed for public access.  This is why I post it on the blog - for all ADF users to be aware.
    Download - VulnerabilityTestCase_v2.zip

Sunday, March 23, 2014

JDev/ADF sample - Alert for ADF Security - JSF 2.0 Vulnerability in ADF 11g R2

  • Alert for ADF Security - JSF 2.0 Vulnerability in ADF 11g R2. You must be concerned about your system security, if you are running ADF runtime based on ADF 11.1.2.1.0 - 11.1.2.4.0 versions. These versions are using JSF 2.0 with known security vulnerability - Two Path Traversal Defects in Oracle's JSF2 Implementation. This vulnerability allows to download full content of WEB-INF through any browser URL. There is a fix, but this fix is not applied by JDeveloper IDE automatically, when creating new ADF application. To prevent WEB-INF content download, you must set javax.faces.RESOURCE_EXCLUDES parameter in web.xml - make sure to provide all file extensions, you want to prevent to be accessible through URL.
    Download - VulnerabilityTestCase.zip

Thursday, March 20, 2014

JDev/ADF sample - Shortcut to Call Custom View Row Method from JSF Expression

  • Shortcut to Call Custom View Row Method from JSF Expression. There is a custom method in Generic View Row Implementation class and you need to invoke it from UI. What would you do? Most likely you would generate Java View Row Implementation class for the specific VO, publish custom method through the interface and later consume it through ADF bindings. This works, but there is a shortcut - especially well working for generic solutions.
    Download - RowIndexAppADF.zip

Thursday, March 13, 2014

JDev/ADF sample - How To Setup MDS Repository for Embedded WLS Instance

  • How To Setup MDS Repository for Embedded WLS Instance. Recently I was enabling external MDS repository for ADF MDS Seeded Customizations, I was facing issues while testing such MDS repository with my local embedded WLS instance - running it directly from JDeveloper. I managed to find a solution at the end, so I would like to share it with you.
    Download - MainMDSApp.zip

Thursday, March 6, 2014

JDev/ADF sample - Why You Don't Want to Code Validation in Before Commit

  • Why You Don't Want to Code Validation in Before Commit. You should know by now - there are many things possible in ADF, but it doesn't mean every solution is right, even if it works. One example of such case - coding validation rules in beforeCommit method. This method is invoked after all changes are posted and ADF BC assumes data is valid, if we throw later validation error from beforeCommit - ADF BC state remains unchanged and changed data is not submitted again. There is a workaround to set jbo.txn.handleafterpostexc=true and to force in memory passivation snapshot with subsequent activation on validation error - however, this is a big performance hit. Every time, where there will be validation error - rollback will be executed and entire AM with all VO instances will be re-activated (SQL re-executed and data re-fetched). Today post is about bad practice, to demonstrate why you should not code validation in beforeCommit method.
    Download - ADFHandleAfterPostApp.zip

Sunday, March 2, 2014

JDev/ADF sample - Improving ADF UI Table CRUD Functionality with Auto Focus

  • Improving ADF UI Table CRUD Functionality with Auto Focus. Improving and tuning ADF applications performance, doesn't mean only ADF framework technical parameters tuning. Performance tuning could be applied to application UI behaviour. I will use ADF Faces table example in this post, by default when new row is inserted - focus for the new row column is not set, user needs to do one extra click to set focus and start entering data. There is a way to eliminate this extra click and set focus automatically for a column in ADF table row. I will describe generic method to achieve such functionality.
    Download - ADFTableFocusApp.zip

Thursday, February 20, 2014

JDev/ADF sample - ADF BC Performance - View Object Instance Lazy Activation

  • ADF BC Performance - View Object Instance Lazy Activation. ADF BC is a great framework to manage data, but one thing it does really smart - ADF BC View Object instance lazy activation. You must know by now - passivation/activation events in ADF BC are relatively expensive in terms of performance. Especially expensive is activation event, as during this event View Object instance is re-constructed and data is re-fetched. However, it is not as bad as it sounds - it doesn't activate all View Object instances from Application Module together. Only View Object instances referenced from current Page Definition are activated. This means, if user was working with 10 screens, before passivation event happened - during activation event, only View Object instances from current screen will be activated. View Object instances from other screens will be activated, when actual screen will be accessed. Good news - you don't need to tune anything for this, this is how it works by default.
    Download - AMStatisticsApp_v2.zip

Monday, February 17, 2014

JDev/ADF sample - Simple JQuery Notification Message for ADF UI

  • Simple JQuery Notification Message for ADF UI. If you would like to use JQuery in ADF and looking for some simple example, this post if for you. I'm sharing use case of JQuery notification message, displayed after successful commit operation is completed in ADF. Once commit is completed, notification message is displayed for 2 seconds and later it disappears.
    Download - ADFNotification.zip