Unnecessary SQL Statements Issued When Changing Row Selection of a Tree

(Doc ID 972325.1)

Last updated on AUGUST 04, 2016

Applies to:

Oracle JDeveloper - Version: and later   [Release: and later ]
Information in this document applies to any platform.


Unneeded queries are executed when changing the row selection in a Tree

This can be reproduced with an Application Module Data Model including View Object instances as:

   |---< Managers
      |---< Employees

Build an ADF Faces including a Tree based on that Data Model.
Override the method executeQueryForCollection() in each View Object to output some information in the
Log, as the following:

protected void executeQueryForCollection(Object qc, Object[] params, int noUserParams) {
   System.out.println("*** Execute Query for <VO Name> - " + this.getQuery() );
   super.executeQueryForCollection(qc, params, noUserParams);

When you run the page, and click on different Departments, without expanding any, you'll see that a query
is already performed for the Managers (even though no Department was expanded, and hence no
Manager displayed):

*** Execute Query for Departments
** Execute Query for Managers


Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms