Thursday, April 7, 2011

Cascading LOV Using Bounded TaskFlows

This is part 2 of my initial post regarding Bounded TaskFlows used as an LOV.

ADFDeveloper - Applied - #69 Code Corner - LOV Using Bounded TaskFlows

Just as an add-on to my post, I decided to make it one step tricker by introducing a cascading effect in my List-of-Values where data comes from a WebService.

What I'm using is a DropDown of Locations and only Locations which as Departments (since we don't want empty results now hehehe). Of course, we don't want to get lazy now so I also made this DropDown to also use a WebService, and to improve performance, I keep the initial fetch in a ViewScope bean.

Default View

Location DropDown

I also modified the LOV to show the Location registered for the Department, for clarity hehe.

List of Values

The add-on was pretty straightforward, just include it as parameter in the setPropertyListener upon launch of LOV.


One extra thing that needed to be handled though was the validation. This time around we're not just validating to whether the departmentId is valid, but rather the departmentId needs to be valid based on the set locationId as well.

This part can be implemented in a number of ways, but I chose to add the attribute as part of the validating component.

And there you have it! 2 layers of LOV that relies on a WebService datasource.


  1. Can you share the code?
    What I am looking for is an example that is using an EJB to supply the list of values in the popup.

  2. Hi Max,

    What part of the code are you looking for? In my example, I am using a WebService.

    If you notice in my class call at initialize list in DepartmentLovPb which can be viewed in, I am calling a retrieve which is basically just a wrapper call for a webservice to retrieve data which can be any generic collection.

    Basically, the idea is not how to get data, but how to use data since from my retrieve method call, I can use BC4j or any datasource as long as i convert it into a Map as my generic object holder.

    I hope this helps.