Friday, April 4, 2014

ADF Tips and Tricks: Stretch an af:inputText component

To quote the documentation for <af:inputText> from Oracle Fusion Middleware Tag Reference for Oracle ADF Faces 12c (12.1.2) at:
This component can be stretched by a parent layout component that stretches its children, e.g. panelStretchLayout or panelSplitter, if the dimensionsFrom attribute is set to "auto" or "parent" and the simple attribute is true.
But, it's not true. To stretch an <af:inputText> component, you need:

  1. Put the component inside a parent component that stretches its children.
  2. Set the simple attribute to true.
  3. Set the dimensionsFrom attribute to "parent"; "auto" will not work.
  4. Remove the columns attribute.
  5. For a text area, set rows attribute to a value greater than 1.