Archive for the ‘ADF’ Category


As you probably know, the “Table” component allows you to use an out of the box filtering.
A while ago, I’ve been asked to execute a table filtering programmatically – that is, use a java code to automatically populate the filter.
In my current example I’m using a button to perform a filtering action. Of curse you can use the code in many other ways,

Well, here are the steps:

First, add a binding to the table with getter & setter:


binding code


Read Full Post »


You might face a problem in your ADF application, when based on a HumanTask component (BPM), using the out of the box Comments & Attachemnts.

Well…suddenly it’s not working anymore…you press the add attachmen/comment button, and nothing happen.

So, obviously you first need to verify that the user has the right permission for that action. Once it is clear, check that the following declaration exists in your .jspx page:


Bug or not…it can sometimes disappear and might driving you crazy.

Good Luck

Read Full Post »

I’m getting many questions regarding to how can we control components base on other components.

One of the standards ways is to use the object’s properties and EL expression.
So, this is something very basic in ADF and I think it’s important to understand and know.

Many of the ADF faces component have 2 important properties: AutoSubmit and PartialTriggers.
Basically what they are saying:

  1. AutoSubmit: when it is set to true, you are partially submitting an action. For example, changing the value of an inputText.
    When the value is being changed, there is no need to wait for a refresh or a global update.
    That way you can control a specific objects in your page.
  2. PartialTriggers: in this property you are referring to the previous input text.
    If you want the current object to fire an action, based on another object (like inputText changing value), you need to set the partialTriggers value to the id of that component.

Here is a simple example: You have 2 inputtext, A & B. B is disable, until a value will be enter in A. For that we will use only EL expression:




Good Luck


Read Full Post »

In this post I will explain, how in a simple way you can use managed bean to perform a binding operation.
In case of using ADF for managing Human Task flows (BPM process), you sometimes want to perform post/pre actions to the native operation.
For example: you want the user to press the approve action, and in the background you want to call a Web service for some validations.
Here is how you do it:

  1. Create a bean method by double click the action button, or manually create a class with the required method:beanto copy:
    public String approveAction() {
    BindingContainer bindings = BindingContext.getCurrent().getCurrentBindingsEntry();
    OperationBinding validateNameOP = bindings.getOperationBinding("validateName");
    Object resultCommit = validateNameOP.execute();
    if (!validateNameOP.getErrors().isEmpty()) {
    return null;
    AttributeBinding status =(AttributeBinding)bindings.get("status");
    if (status.getInputValue().toString().equalsIgnoreCase("Y")){
    OperationBinding operationBinding = bindings.getOperationBinding("APPROVE");
    Object result = operationBinding.execute();
    if (!operationBinding.getErrors().isEmpty()) {
    System.out.println("inside error");
    return null;
    return null;
    return "refreshTaskFlow";
  2. Declare the bean in the action listener property of the command button:approve-button

That’s it.

Just be sure, that both APPROVE & validateName operations are declared in the binding. Or else you will get nullPointerException.

Good Luck

Read Full Post »

Let’s say you want to call a a taskFlow activity, for example, a “back” activity, but declarative within your java code:


Use the below code in a bean in order to call a task flow navigation within your ADF application:

import javax.faces.application.NavigationHandler;
import javax.faces.context.FacesContext;


NavigationHandler backHnd =
backHnd.handleNavigation(FacesContext.getCurrentInstance(), null,"back");

Good Luck!

Read Full Post »

A very simple but frequently asked question is: how use more then 1 human task, of the same type, in one ADF application?

Go to your ViewController project and open the file hwtaskflow.xml

Copy the hwTaskFlow element, and its content, and change the values for: WorkflowName & TaskDefinitionNamespace elements (those are the name & targetNamespace from the Human Task).


Good Luck!

Read Full Post »

Here is a small example of a way to enable or disable a command button using a standard functionality of an ADF.
Take for example the next scenario: You want to reject a form, and you must enter a reject reason.

For that we will use a commandButton (for the reject action) and an inputText (for the reject reason).
Change both objects’ attributes as follows:


  • Set the AutoSubmit property to ‘true’:AutoSubmit


  • Set the PartialTriggers property to the Reject InputTextId Id:PartialTriggers
  • Set the Disabled property to have a condition base on the InputText value:
    In my example: #{empty bindings.RejectReason.inputValue}Reject Reason

Run the page and test it.

Good Luck!

Read Full Post »

When you create a new ADF Business component that uses a DB connection (like Business component From Table, Entity Object etc..), you can see that automatically the wizard connects you to a predefined DB connection.
Usually, if you have only one DB connection defined it’s not a problem. But when you have more than one connection, you want to control the required connection.

To change or control the default connection, follow the next steps –

Right click on your project and choose Project Properties:

Project Properties


Read Full Post »

In this post I will explain a simple way to use JS (JavaScript) in an ADF page.
To implement javaScript function you will need few things:

  1. Define a JavaScript code
  2. Link the Component that will refer to that JS code (InputText, Command Button etc..)
  3. Obviously, understand the purpose of using JS in your ADF application

So let’s define first the JS code.
Go to the page definition source and drag the resource object under the document tag. Choose Javascript as the resource type:



Read Full Post »

In this post I will explain what is the correct and standard way to deploy an ADF application (project) from JDeveloper.
Usually, when we want to deploy, let’s say – a SOA or a BPM project, we have to right click on the project, and deploy it to the required managed server. It can work the same way for an ADF project, but it is not the recommended way.

So, the next steps will guide through the right procedure:


Read Full Post »