Friday, July 9, 2010

ADF Table AutoHeightRows Property

While going through Oracle WebCenter 11g documentation, I have noticed good advice for effective page geometry management - Guidelines for Creating Task Flows to Be Used in Oracle Composer-Enabled Pages. Quite often customers are asking how to control table height dynamic resizing effectively. We can use AutoHeightRows property for ADF Table component, this will allow to shrink rendered table height, if number of records will be less comparing to defined by AutoHeightRows.

Download sample application - ADFTableAutoHeight.zip. I have set AutoHeightRows property to 25, make sure ContentDelivery is set to immediate (otherwise dynamic height resizing will not work):


When number of result records is less then 25, table height shrinks and page geometry is better optimized:


When result contains more then 25 records, table is rendered with maximum possible height:


11 comments:

Anonymous said...

Hi Andrejus,

I use Jdeveloper 11.1.1.2.0. I followed your example but the last row in the table wasn't displayed.
How can I make it work without passing to Jdeveloper 11.1.1.3.0?

Thank you,
Ana

Anonymous said...

Such effect (last row is not visible) happens if "columnStretching" table attribute is set.
Do you have any idea on how to have both columnStretching and autoHeightRows working properly?

Anonymous said...

Hi I am using Jdev 11.1.1.3 and just wanted to know this will show you all rows .. but in my case i know that i will be having 2 rows so i want to decrease the height of table.
which property needs to set the row size to 2 and height also decreased.

Jun said...

Hi Andrejus,

I using JDeveloper 11.1.1.4.0 and currently working on a page with table component. One of the requirement is to remove the scrollbars of the table and let the table audjust automatically. Is this possible?

Thanks,
Jun

Andrejus Baranovskis said...

Hi,

Theoretically yes, if you specify AutoHeightRows property large enough.

But then you will get page scrollbars - which is also not nice.

Andrejus

Jun said...

Hi Andrejus, Thanks, I manage to remove the scrollbars by adjusting the autoHeightRows.. Thanks again.

raji said...

Hi,

AutoHeightRows cant be greater than Vo fetchsize right?
Then how will it be possible if we want to show more than 25 rows at a time in ui without a scroll bar.
(if my VO fetchsize is 25)

Andrejus Baranovskis said...

Yes, in this case only one way - increase iterator range size in page def.

Andrejus

raji said...

Again, to increase the range size of iterator in pageDef, we need to increase the fetch size on the AM:VO Usage right?

Bcoz, iterator range size in page def cannot be greater than VO fetch size. It is not a good practice i guess.

Andrejus Baranovskis said...

Not exactly. VO Fetch Size = 1 by default, in VO tuning options. Ideally, it should be same as Fetch Size in Page Def iterator. You can still leave it to be 1 on VO by default, no much difference.

Important is, if you are using same VO on other pages - make sure Fetch Size is set to same value in other Page Defs. Otherwise VO can be re-executed each time, if Fetch Size is different.

Andrejus

Anonymous said...

How can i show all the rows in adf table?