Custom Error Message for Business Component

In my previous post, I had explained how to Display Custom error message to user to extend DCErrorHandlerImpl and register to Databinding.cpx file. Well, there’s another way to do the same. Follow these steps… Rigth Click on Model Project and select project properties Then select “Option” under Business Component To add custom message bundle class for your project, click New and ... Read More »

Defining validation in the ADF View Layer

ADF framework provides ADF Faces validation to add validation rules to an ADF Faces component. A “validator” attribute is used to create business specific validation rule. Validator uses el expression to bind method in a managed bean. In this Example, I will explain how to build your own custom validation logic. This example is based on HR schema Employees table ... Read More »

ORA-02292: Integrity Constraint

    Sometimes user need to change foreign key attribute value in ADF table’s master detail relationship. If you try to change master table’s foreign key value, you’ll  get the following integrity constraint error message. ORA-02292: integrity constraint (JAGRANDB.SYS_C00162401) violated – child record found   Download Sample Code   To resolve this issue, if user want to change a foreign ... Read More »

Automatically delete all child rows when User Delete Parent Record in Master-Detail relationship : ADF

In Master Detail relationship sometimes user needs to delete master row, if you try to delete master row before deleting child rows, runtime will not allow deletion of parent row if any child row exist. You will need to delete all child rows before deleting parent record. For this ADF business components provides very useful option. When you describe Association ... Read More »

How to Set current row of ADF table (View Object)

Sometimes user need to set current row in ADF table through programming. There is an Operation available on all View Object Instance inside Data Control.     So I am describing steps how to achieve this. First Create Action Binding for “setCurrentRowWithKeyValue” operation. After that create a method on ManagedBean to set Current Row. BindingContext bindingctx = BindingContext.getCurrent(); BindingContainer binding ... Read More »

ADF: Undo Current Row Changes in table.

Today, I am going to share a very interesting tutorial. Sometimes user need to undo all changes performed in only selected table row and display the older values which exists in database. So how to perform this task. If you are using “RollBack” operation, it reverts all changes performed in table. But if you want to keep all changes but ... Read More »

Consuming Web Service using ADF Web Service Data Control

Web Service is a client server application that communicate over WWW (World Wide Web) Http. Basically web service allows enterprises to expose business functionality irrespective of platform, language of application because business functionality exposed in such a way  composed of standard XML constructs that can be recognized and used by other applications. ADF have functionality to consume External Web Service ... Read More »

How to check whether ADF table row is modified or not.

Sometimes we need to know whether any row of ADF table is modified or not using managed bean. Here’s a quick solution to find whether ADF table rows are modified or not. There is a method in oracle.jbo.Transaction class called isDirty()  used to find row is modified or not. BindingContainer binding=bindingctx.getCurrentBindingsEntry(); DCBindingContainer bindingsImpl = (DCBindingContainer) binding; DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(“iterName”); ViewObject ... Read More »

ADF Tricks

Some solution are too small to write blog or article, today I will explain some common code which are required while creating application using ADF technology. 1. Get View Object Instance in Managed Bean. BindingContext bindingctx=BindingContext.getCurrent(); BindingContainer binding=bindingctx.getCurrentBindingsEntry(); DCBindingContainer bindingsImpl = (DCBindingContainer) binding; DCIteratorBinding dciter = bindingsImpl.findIteratorBinding(IteratorName); ViewObject vo=dciter.getViewObject(); 2. Redirect Page. FacesContext.getCurrentInstance().getExternalContext().redirect(“url”); 3. Gets Session Object value using Groovy ... Read More »

Disable future Date on ADF “inputDate” Component

Sometimes we need to disable future date on ADF inputDate Component so that, a user is unable to select date after the current date. For this purpose we can use ADF inputDate component MaxValue property. Here’s a small step by step tutorial to achieve this requirement. Step1:- drag-drop ADF inputDate component on jspx page from component palette. Step2:- create following ... Read More »