Thursday, March 8, 2012

ADF: Stretching a component to (near) 100%

In the past, many users would want their component to stretch to fill 100% of a horizontal area. However, to account for scrollbars that may or may not have been there, they would set the percentage to 98%, etc.

A much better way to do this is to use the new "AFStretchWidth" style class, which will do this automatically for you.

For instance, avoid this:

and instead do this:

You can learn more about ADF Faces layout management here.

No comments :

Post a Comment