Wednesday, March 19, 2014

ADF Tips and Tricks: Stretch the panelCollection and table component

When using the ADF panelCollection and table component, it's very common to wish a panelCollection component and its nested table component to stretch across the width to occupy all available space of the containing component.

To do this:

  1. Set the styleClass attribute of the panelCollection component to AFStretchWidth. This style will stretch the component to what appears to be 100% width of the parent container.
  2. Set the columnStretching attribute of the table component to an appropriate value other than the default value none, such as last.

You can find more information about the AFStretchWidth style class from the section "9.2.4 Tips for Using Geometry-Managed Components" in the documentation Developing Web User Interfaces with Oracle ADF Faces at:

http://docs.oracle.com/middleware/1212/adf/ADFUI/af_orgpage.htm#ADFUI10044

In the same documentation, you can find more information about the columnStretching attribute from the section "12.3.4 How to Display a Table on a Page" at:

http://docs.oracle.com/middleware/1212/adf/ADFUI/af_table.htm#ADFUI10511

No comments:

Post a Comment