Tuesday, November 2, 2010

ADF UI - Tips to stretch different ADF components to occupy the entire page width

Here are the simple techniques to stretch different ADF components to occupy the entire page width.

1. Stretching af:table inside af:panelCollection:
Just specify styleClass="AFStretchWidth" for af:panelCollection. You don't need to specify either 'width', 'style' or 'styleClass' for the af:table which is inside af:panelCollection.

Table before Stretching:

Table after Stretching:

2. Stretching af:panelTabbed and af:panelSplitter:
Just surround the component with af:panelStretchLayout and place the component in it's 'center' facet and specify styleClass="AFStretchWidth" for the af:panelStretchLayout. That's it. You don't need to set either 'style' or 'styleClass' properties for af:panelTabbed or af:panelSplitter.

af:panelTabbed before Stretching:


af:panelTabbed after Stretching:

To stretch any other component, specifying the property styleClass="AFStretchWidth" should stretch the width of the component to occupy entire page. But, incase if it doesn't work try surrounding the component with af:panelStretchLayout and place the component in it's 'center' facet. Even if it doesn't work, try specifying styleClass="AFStretchWidth" for af:panelStretchLayout. One of these should definitely work :)

PS: This will just stretch the width, if you want to increase the height for the component you need specify for height for the component in the 'Style' section by specifying 'inlineStyle' property if it doesn't have 'height' property already.

5 comments:

  1. Hello.

    I have found a bug for this class confirmed by Oracle stuff. The bug is in a table with this class in Internet Explorer 7.

    Take a loot at it in my article:

    http://www.notjustjava.com/2012/01/bug-in-the-class-afstretchwidth-with-the-component-inside-a-fragment-jsff/

    ReplyDelete
  2. Thanks for the informative share. Worthy tips for sure.

    ReplyDelete
  3. A person essentially help to make seriously posts I might state. This is the very first time I frequented your website page and to this point? I surprised with the analysis you made to create this particular put up incredible. Fantastic task! Check professional phone answering for best Phone Answering.

    ReplyDelete
  4. Wow What a great stuff here. I have find this information from google and i also want to share this info with my some fellows on social networking sites. Thanks for the sharing.Visit Best Dedicated Servers for the best dedicated hosting

    ReplyDelete

Related Posts with Thumbnails