testcontent
This topic contains the following sections:
A developer needs to be able to develop a Rich Client Interface and avoid basic layout issues that tend to be pervasive across screens and applications. There are a number of low-level layout issues within ADFv that:
In most cases, there’s a simple approach and best practice that will assist developers in avoiding these pitfalls.
This document discusses basics of page layout and provides guidance to avoid common browser pitfalls, a recommended process for creating layouts, and illustrates layout examples.
This Layout Best Practices document is not necessarily a pattern but instead, a laundry list of known layout issues that are encountered when developing a Rich Client Interface and, how to avoid these pitfalls during application development.
Various ADF Components are described and demonstrated throughout this document including document, showDetailItem, decorativeBox, panelSplitter, panelStretchLayout, panelBorderLayout and so on. Not one component by itself but many are combined to achieve the desired layout for a page and / or an application.
To save a great deal of development grief and enjoy reduced maintenance costs:
document
has its maximized attribute. Try the maximized attribute NOT SET on the document component.
showDetailItem
has its stretchChildren attribute.
decorativeBox
,
panelSplitter
, and
panelStretchLayout
components inside of your
document
component to create the stretchable outer frame.
pageTemplates
, declarative components, and
regions
for reuse and centralized maintenance.
panelGroupLayout
with
layout="scroll" since it supports being stretched but will not stretch its children.
panelGroupLayout
because it would be much better for usability if you placed them in a
panelFormLayout
so the labels and fields align.
panelBorderLayout
panelFormLayout
panelGroupLayout
with
layout="default" or
layout="horizontal"
panelHeader
with
type="flow" - see the Stretched Header example for an situation where content below a header is stretched
panelLabelAndMessage
panelList
tableLayout
panelGrid
| Component | Situations to Avoid |
|---|---|
| * | An
inlineStyle with a
"height" value with
"%" units
|
| * | An
inlineStyle with a
"width" value between
"90%" and
"100%" (use
styleClass="AFStretchWidth" or
styleClass="AFAuxiliaryStretchWidth" instead)
|
| * | An
inlineStyle with
"height",
"top", and
"bottom" values
|
| * | An
inlineStyle with
"width",
"left", and
"right" values
|
| * | An
inlineStyle with a
"position" value
|
| Child being stretched by a parent component | An
inlineStyle with
"width" or
"height" values
|
*Note: Avoid when possible throughout.
panelGroupLayout
with
layout="scroll". If the contents of this
panelGroupLayout
cannot fit in the space allocated, the browser will determine whether scrollbars are needed and will add them automatically.
panelGroupLayout
components because this will make the user see multiple scrollbars. Also, this should only be used at transitions from stretching to flowing areas and since you should not have stretching areas inside of flowing areas, you would generally never end up with nested scrollbars. It is best to minimize the number of areas that a user must scroll in order to see what he or she is looking to find. Take time to consider what scrolling the user will need. In cases where undesired scrollbars exist, you may want to simply change the layout attribute of that
panelGroupLayout
to
"vertical".
"AFStretchWidth" is built into the skin to specify that a component with this styleClass will get a reduced width in Internet Explorer 7 or full width in other browsers. If you need a smaller size for an thin auxiliary column, you can alternatively use
"AFAuxiliaryStretchWidth" or you may create a similar skin definition in your own skin like this:
@agent ie and (version: 7.0) {
.AFIEOverflowWorkaround75 {
width: 75%;
}
}
Demonstrations based on JDeveloper 11 Release 1 are available and illustrate much of the discussion above.
Tag Documentation Related to the Artifacts
decorativeBox
document
pageTemplate
panelBorderLayout
panelBox
panelFormLayout
panelGroupLayout
panelHeader
panelLabelAndMessage
panelList
panelSplitter
panelStretchLayout
region
showDetailItem