Stretching an ADF Faces 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:

<af:foo inlineStyle="98%" />

and instead do this:

<af:foo styleClass="AFStretchWidth" />

You can learn more about ADF Faces layout management here.
Comments:

Post a Comment:
  • HTML Syntax: NOT allowed
About

An exploration in the lighter side of ADF development.

Search

Archives
« April 2014
SunMonTueWedThuFriSat
  
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
   
       
Today