Friday, December 21, 2012

Continuous Scrolling in ADF Tables

One of the more promising patterns in Web UI development is Continuous Scrolling. Popular sites such as Twitter and Facebook use it. With Continuous Scrolling, new data is automatically retrieved as the user has scrolled to the bottom of the page.

I recently discovered that this is already a (not so well-known) feature for the af:table component in ADF 11g! And it is so very easy to implement! Simply set RowCountThreshold="-1" on your iterator in your bindings. Done!

Coincidentally it also helps performance, because now the table doesn’t need to know the exact number of rows that are available, it will discover new rows when the user scrolls to the bottom of the page. This means that getEstimatedRowCount() will not be called anymore. This might save you another query to the database. You should try it sometime.

(this post originally appeared on the AMIS Technology blog)

Monday, May 28, 2012

Google-like Search and LOVs using Oracle Text and ViewCriteria

Do you know the Google Advanced Search page? Very few people have ever seen the page, let alone used it. Now, why is that? It is simply because the "normal" single-field quick-search (that what we normally just call Google) is so incredibly effective.

OK, that's nice, but how can we create a Google-like search experience in ADF? I created a simple sample application that contains Google-like quick-search and LOVs (using Oracle Text). You will find the application below, including a step-by-step guide how to reproduce it.

Wednesday, March 7, 2012

Extending the Groovy support in ADF BC

If you have worked with ADF Business Components in ADF 11g, chances are you have used the very powerful Groovy support. Perhaps you used it to create an entity validation rule, as a default value for a (transient) attribute or to calculate the value of a bind variable, etc. As part of this Groovy Support you get a number of aggregate functions that are not available in "normal Java-code". See this whitepaper or the chapter on Groovy support in the ADF developers guide. This post describes how to expose (comparable, but slightly more powerful) aggregate functions to Java code.