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:


13 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

Andrej Baranovskij 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)

Andrej Baranovskij 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.

Andrej Baranovskij 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?

Unknown said...

Hi,
I'm using jdeveloper 12.2.1.0.0. I have used a tree table in which there is a field in which we are asked to select one choice. NR is default. Other options are BW,<,>,<= etc.. When I select BW, I'm asked to enter the min and max values. I had to navigate through these field by pressing tab button.
I have set the changeEventPolicy from ppr to none in order to avoid partial refresh and out of focus issue for min and max columns. And then I have added partial triggers to min and max columns. Now the tab works fine, but the height of the row automatically increases. When the NR option is selected, the height gets reverted back.

Can anyone fix this issue?

Chetan said...

Hi Andrejus,
I'm using jdeveloper 12.2.1. AutoHeightRows property of my adf table is equal to 10 and content delivery is also immediate. Now whenever number of rows in a table is more than 10 then horizontal and vertical scroll bar is coming.
Is it possible to keep only vertical scrollbar and hide horizontal bar ? If yes, then provide your inputs.

Thanks in advance.