Let us assume a usecase where we have some text fields with auto
suggest feature enabled, and their suggested items could be
dependent on one other. For ex : Country, State and City.

This could be modeled by having an EO and VO created based on
Person table and read-only look-up VOs created based on Country,
State and City tables.

Implementing the dependency between LOVs is pretty straight
forward. However, implementing the dependency between the auto
suggest items is not. In order to achieve the dependency, first we
would need couple of methods returning current row's CountryId and
StateId. We could add them up in the AMImpl class.

As we need to filter out the States based on the Country and the
City based on the Country & State, we would need to modify the
query of these two VOs to include a bind variable in the where
clause.

For having the auto suggest, we need to have a view criteria
defined for all the three look-up VOs (CountryView, StateView and
CityView).

Generate VOImpl classes for Country, State and City VOs (with
Include bind variable accessors option checked), and then expose
setBindCountryName (in Country VO), setBindStateName (in State VO)
and setBindCityName (in City VO) methods as client interfaces.

And the last part on the model is to pass the current row's
CountryId and StateId to the Bind Variables defined in the State
and City VOs. Also, we need to get the VCs created above to be
executed by default (By editing the VO instance in the AM's data
model), so that the auto suggest list would be filtered as and when
the users type.

Here, we specify groovy expression for the CountryId and StateId
as adf.object.applicationModule.<methodName>. For more
information about using groovy expressions, check out this :
http://www.oracle.com/technetwork/developer-tools/jdev/introduction-to-groovy-128837.pdf
.

With this, we are done with setting up the model layer for the
auto suggest dependency.

In the View layer, we would create an ADF Form based on the
Person VO, with all the navigation buttons.

In order to construct the onSuggest items, we would create Tree
Bindings for Country VO, State VO and City VO, along with method
action bindings for the setBindCountryName, setBindStateName and
setBindCityName methods.

Now, we could add af:autoSuggestBehavior for CountryId, StateId
and CityId fields. Then, add onSuggest methods in backing bean for
populating the on suggest items for each fields.