Skip navigation.

JOracle

Oracle's Java technologies: JDeveloper, OC4J, ADF

Showing a list of items based on the contents of another list in ADF BC

This is a query rather than a solution, although if someone works out how to do it, I'll update this post with the solution.

I have constructed a very simple example schema to illustrate my query. Here is a picture of the schema.


It has three entity tables: Employee, Department and Location, and two intersection tables: Employee_Location and Department_Location.

What I want to do is have a creation process for an employee where you first fill in the details (forname and surname), then assign them to department, then depending on that department assign them to one or more possible locations.

So each department is based in one or more locations and an employee can also be based in one or more locations, but only those where the department is based (imagine that the employee is a door-to-door salesman and the department has several areas of a town that it covers).

The first two steps are easy - the details step can be modelled using a form on the employee view object and the department assignment can be done with a list of values drop down on the department view object.

The third step is a little more complex because you can't just show a list of all locations, since some of these will not apply to the department. So my question is how do I model this using ADF Business Components?

Update: 21st March 2007
I have now been able to solve this problem thanks to a blog entry by Frank Nimphius: Working with the afselectManyListsbox (Part I). This describes how to use the ViewCriteria object to perform a search on a view using a list of values, which is exactly what I needed - thanks Frank.

Curbing the shown level of an ADF Faces menu treeUsing a request wrapper seems to submit two requests

Comments

Tiftif 12. March 2007, 16:54

Hi,
I don't know hot to use ADF BC, i'm just trying to work with ADF, but did you try to build a view object then based your list on it?

dominionspy 21. March 2007, 10:08

Hi Tiftif,
Yes, all the tables have view objects built on them.
I have actually solved this thanks to a blog by Frank Nimphius. In fact whenever I have a problem I should just check there, because he always seems to write something about what I'm doing a week or two before I do it - freaky.

Any way, the blog entry is at http://www.orablogs.com/fnimphius/archives/001903.html
This solution uses view criteria in a way that I didn't realise was possible.

How to use Quote function:

  1. Select some text
  2. Click on the Quote link

Write a comment

Comment
(BBcode and HTML is turned off for anonymous user comments.)

If you can't read the words, press the small reload icon.


Smilies

December 2009
S M T W T F S
November 2009January 2010
1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31