Posts

Showing posts from March, 2014

Does ADF allow you to change Primary Key attributes from UI?

I talked about some use case which calls for Primary Key update from UI and their solutions long back in one of my old post  http://www.jobinesh.com/2009/06/target-unreachable-identifier-row.html .  This post is in continuation of the same discussion. Good news is that the 11.1.2.0.0 release of ADF started supporting a specific use case that involves PK change. To make it clear, ADF out of the box supports/handles the scenario in which your entity object's primary key attribute is populated by database trigger when you post the newly created row(or any PK changes during postChanges operation,  while committing a transaction). To leverage this support, you may want to keep Refresh on Update or Refresh on Insert flags (as appropaite) to " true" for the Primary Key attributes (which get updated during posting changes to DB) in the entity object . Note that ADF (ADF Faces when used along with ADF binding and Business Components) officially does not support(not...

Programmatically triggering navigation in ADF Mobile

In your ADF mobile application, sometimes you may want to programmatically trigger navigation from some listener code that you may have in your manged bean. You can use the following piece of code for such use cases. //Some action listener for a button public void goToNextViewProgrammatically(ActionEvent actionEvent){ //The client side business logic go here... //Now you can trigger navigation AdfmfContainerUtilities.invokeContainerJavaScriptFunction( AdfmfJavaUtilities.getFeatureName(), "adf.mf.api.amx.doNavigation",  new Object[] { "gotoView2" });  //In the above case 'gotoView'2 is the from-outcome  //defined in the underlying //task flow which causes  navigation to next view }

Globally configuring ErrorHandlerClass for an ADF application

I talked about customizing the DCErrorHandlerImpl in one of my old blog post  http://www.jobinesh.com/2011/03/customizing-business-components-error.html . This custom ErrorHandlerClass is usually configured in DataBindings.cpx file. What if you have many projects and you want to configure it centrally in one place at application level. From release version 11.1.2.1.0 onward ADF supports configuration of ErrorHandlerClass  in adf-config.xml (Thanks to Steve Muench who shared this tip). A sample adf-config.xml with custom error handler class is here: <?xml version="1.0" encoding="windows-1252" ?> <adf-config xmlns= "http://xmlns.oracle.com/adf/config" xmlns:config= "http://xmlns.oracle.com/bc4j/configuration" xmlns:adf= "http://xmlns.oracle.com/adf/config/properties" xmlns:sec= "http://xmlns.oracle.com/adf/security/config" > <adf-adfm-config xmlns= "http://xmlns.oracle.com...

Oracle ADF Mobile Patch 6 Release

Echoing - https://blogs.oracle.com/mobile/entry/oracle_adf_mobile_patch_6

JBO-25014 (RowInconsistentException) error with formatted BigDecimal type

ADF allows you to specify formatting (format type and value) for a BigDecimal typed attribute on an entity object or on view object. What is the big deal in it? Well nothing great here :) My intention is different, want to discuss a row inconsistency error that you may see in this context. When you modify the above mentioned attribute value twice in a transaction from the ADF Faces UI, you may notice RowInconsistentException exception(i.e modify the formatted BigDecimal value from UI,  commit the transaction and then modify same value again and try committing it). This error says the row that you are currently updating is having stale value - in other words another user has modified the row while you were making some changes. However the actual reason for this error  is due to the fact  that BigDecimal::equals() method compares both value and scale, so 5.00 is not same as 5.  This result in the RowInconsistentException when framework tries to to compare or...