Summary

Tag Name:<af:region>
Java Class:oracle.adf.view.rich.component.rich.fragment.RichRegion
Component Type:oracle.adf.RichRegion
Naming Container:Yes. When referring to children of this component ("partialTriggers", findComponent(), etc.), you must prefix the child's ID with this component's ID and a colon (':').

The region tag allows dynamic content to be included in a master page. This tag is bound to a RegionModel. The model decides which viewId is to be included. The model has methods that allow pre and post processing of an include. See the javadoc for oracle.adf.view.rich.model.RegionModel. This component does not support any facets. Regions support nesting (one af:region component can contain another af:region component). Regions are not allowed to be placed inside of af:forEach, c:forEach, or other forEach-like tags because of limitations in how JSF handles component IDs and component state which would manifest in your application in obscure manners such as loss of component state. Regions are also not allowed to be placed inside of af:iterator because the region requires bindings to be established at the tag execution phase in order to perform its JSP include operations and the variables for iterators are not established until later in the life-cycle.

Regions in release 11g are reusable page flows. They have their own navigation rules, managed beans and ADFm page definitions. Each page within the region is a page fragment (jsff). Do not confuse the 11g af:region component with the 10.1.3 or Trinidad region. The 10.1.3 and Trinidad region components are single page fragments that do not have multiple pages, navigation rules nor managed beans. The 10.1.3 region is similar to the 11g page templates and declarative components.

Geometry Management

  • This component can be stretched by a parent layout component that stretches its children only if the region header is not present. If the header is present and you put the region in a location that will stretch it or if you define styles to attempt to stretch it, you will see unpredictable results across web browsers. Instead, you may need to wrap the region in a transition component such as <af:panelGroupLayout layout="scroll"> to prevent automatic stretching.
  • This component gets children dynamically depending on what view is included from its RegionModel. The <af:region> will not stretch all included children, but it will stretch an included child if all of the following are true:
    • The region itself does not have a header
    • The region itself is being stretched
    • There is only a single included child
    • The child must be capable of being stretched
    Examples of components that can be stretched inside of a <af:region> include:
    • <af:decorativeBox>
    • <af:panelAccordion>
    • <af:panelBox type="stretch">
    • <af:panelCollection>
    • <af:panelGroupLayout layout="scroll">
    • <af:panelGroupLayout layout="vertical">
    • <af:panelHeader type="stretch">
    • <af:panelSplitter>
    • <af:panelStretchLayout>
    • <af:panelTabbed>
    • <af:region>
    • <af:table>
    • <af:tree>
    • <af:treeTable>
    If the region itself is being stretched and the included child cannot be stretched, you will then need to wrap it in another layout component that does not stretch its children. For example, a common wrapper is the <af:panelGroupLayout layout="scroll">. By using a wrapper like this, you create a flowing layout area where nothing will be stretched inside of it. Examples of components that cannot be stretched inside of a <af:region> include:
    • <af:panelBorderLayout>
    • <af:panelBox type="flow">
    • <af:panelFormLayout>
    • <af:panelGroupLayout layout="default">
    • <af:panelGroupLayout layout="horizontal">
    • <af:panelHeader type="flow">
    • <af:panelLabelAndMessage>
    • <af:panelList>
    • <trh:tableLayout>

Code Example(s)

<af:region value="#{mybean.myRegionModel}"/>

Supported Client Events for Client Behaviors

  • click
  • contextMenu
  • dblClick
  • mouseDown
  • mouseMove
  • mouseOut
  • mouseOver
  • mouseUp
  • propertyChange (default)

Events

Type Phases Description
oracle.adf.view.rich.event.RegionNavigationEventInvoke ApplicationThis event is triggered when the fragment that a region is displaying changes.
org.apache.myfaces.trinidad.event.DisclosureEventApply Request Values,
Invoke Application
The disclosure event is delivered when a node is disclosed.
org.apache.myfaces.trinidad.event.AttributeChangeEventInvoke Application,
Apply Request Values
Event delivered to describe an attribute change. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change event might include the width of a column that supported client-side resizing.

Attributes

Name Type Supports EL? Description
attributeChangeListenerjavax.el.MethodExpressionOnly EL a method reference to an attribute change listener. Attribute change events are not delivered for any programmatic change to a property. They are only delivered when a renderer changes a property without the application's specific request. An example of an attribute change events might include the width of a column that supported client-side resizing.
bindingoracle.adf.view.rich.component.rich.fragment.RichRegionOnly EL an EL reference that will store the component instance on a bean. This can be used to give programmatic access to a component from a backing bean, or to move creation of the component to a backing bean.
clientComponentbooleanYes Default Value: false

whether a client-side component will be generated. A component may be generated whether or not this flag is set, but if client Javascript requires the component object, this must be set to true to guarantee the component's presence. Client component objects that are generated today by default may not be present in the future; setting this flag is the only way to guarantee a component's presence, and clients cannot rely on implicit behavior. However, there is a performance cost to setting this flag, so clients should avoid turning on client components unless absolutely necessary.
customizationIdStringYes This attribute is deprecated. This attribute will be removed in the next release. Use the 'id' attribute instead.

This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.
disclosedbooleanYes Default Value: true

whether or not to disclose the children
disclosureListenerjavax.el.MethodExpressionOnly EL a method reference to a disclosure listener
dontPersistString[]Yes a list of attributes whose changes are NOT to be persisted by FilteredPersistenceChangeManager via the "Persistent Change Manager" registered in adf-config.xml. The token 'ALL' can be used in the list here to indicate that all attribute changes that the component implicitly persists should be excluded. If there is a conflict of values, "dontPersist" always precedes "persist".
helpTopicIdStringYes the id used to look up a topic in a helpProvider. Note that for this component dynamic help information is shown on the header and will only be shown when the header is shown.
idStringNo the identifier for the component. Every component may be named by a component identifier that must conform to the following rules:
  • They must start with a letter (as defined by the Character.isLetter() method) or underscore ( _ ).
  • Subsequent characters must be letters (as defined by the Character.isLetter() method), digits as defined by the Character.isDigit() method, dashes ( - ), or underscores ( _ ). To minimize the size of responses generated by JavaServer Faces, it is recommended that component identifiers be as short as possible. If a component has been given an identifier, it must be unique in the namespace of the closest ancestor to that component that is a NamingContainer (if any).
immediatebooleanYes Default Value: false

whether data validation - client-side or server-side - should be skipped when events are generated by this component. When immediate is false (the default), the disclosure event will be delivered during the Invoke Application phase, which will trigger validation. When set to true, the disclosure event will be executed during the Apply Request Values phase.
inlineStyleStringYes the CSS styles to use for this component. This is intended for basic style changes. The inlineStyle is a set of CSS styles that are applied to the root DOM element of the component. Be aware that because of browser CSS precedence rules, CSS rendered on a DOM element takes precedence over external stylesheets like the skin file. Therefore skins will not be able to override what you set on this attribute. If the inlineStyle's CSS properties do not affect the DOM element you want affected, then you will have to create a skin and use the skinning keys which are meant to target particular DOM elements, like ::label or ::icon-style.
partialTriggersString[]Yes the IDs of the components that should trigger a partial update. This component will listen on the trigger components. If one of the trigger components receives an event that will cause it to update in some way, this component will request to be updated too. Identifiers are relative to the source component (this component), and must account for NamingContainers. If your component is already inside of a naming container, you can use a single colon to start the search from the root of the page, or multiple colons to move up through the NamingContainers - "::" will pop out of the component's naming container (or itself if the component is a naming container) and begin the search from there, ":::" will pop out of two naming containers (including itself if the component is a naming container) and begin the search from there, etc.
persistString[]Yes a list of attributes whose changes are to be persisted by FilteredPersistenceChangeManager via the "Persistent Change Manager" registered in adf-config.xml. The token 'ALL' can be used in the list here to indicate that all attribute changes that the component implicitly persists should be included.
regionNavigationListenerjavax.el.MethodExpressionOnly EL a method reference to a RegionNavigationListener method
renderedbooleanYes Default Value: true

whether the component is rendered. When set to false, no output will be delivered for this component (the component will not in any way be rendered, and cannot be made visible on the client). If you want to change a component's rendered attribute from false to true using PPR, set the partialTrigger attribute of its parent component so the parent refreshes and in turn will render this component.
shortDescStringYes the short description of the component. The shortDesc text may be used in two different ways, depending on the component.

For components with images, the shortDesc is often used to render an HTML alt attribute for the image. Please see the accessibility guidelines section for correct alt text usage of the shortDesc attribute.

shortDesc is also commonly used to render an HTML title attribute, which is used by user agents to display tooltip help text. In this case the behavior for the tooltip is controlled by the user agent, e.g. Firefox 2 truncates long tooltips. For form components, the shortDesc is displayed in a note window. For components that support the helpTopicId attribute and are not using the shortDesc as image alt text, it is recommended that helpTopicId is used instead of shortDesc as it is more flexible and provides more accessible descriptive text than the use of the title attribute.

showDisclosurebooleanYes Default Value: true

Whether or not to render the disclosure icon. If this is set to false all other attributes that deal with disclosure are ignored.
showHeaderStringYes Valid Values: never, ifNeeded, always
Default Value: never

the display strategy for the region's header. The accepted values are "never", "ifNeeded", or "always". No header will be shown if the value is "never". If the value is "always", the header will always be shown. This value is useful when the region has a drag source attached or when you want the user to have access to the disclosure control. If the value is "ifNeeded", the header will only be shown if the "text" property is set, or if the region has a drag source attached. The default is "never" for backwards compatibility.
styleClassStringYes a CSS style class to use for this component. The style class can be defined in your jspx page or in a skinning CSS file, for example, or you can use one of our public style classes, like 'AFInstructionText'.
textStringYes the header text of the Region.
uncommittedDataWarningStringYes Valid Values: on, off
Default Value: off

Specifies whether the framework should be tracking uncommitted data for this region. When this property is set to "on", and this region contains uncommitted data, users will be asked to confirm the action whenever the page is unloaded or checkRegionUncommittedDataBehavior is triggered
Not supported on the following renderkits: org.apache.myfaces.trinidad.core
unsecurejava.util.SetYes A whitespace separated list of attributes whose values ordinarily can be set only on the server, but need to be settable on the client. Currently, this is supported only for the "disabled" attribute. Note that when you are able to set a property on the client, you will be allowed to by using the the .setProperty('attribute', newValue) method, but not the .setXXXAttribute(newValue) method. For example, if you have unsecure="disabled", then on the client you can use the method .setProperty('disabled', false), while the method .setDisabled(false) will not work and will provide a javascript error that setDisabled is not a function.
valueoracle.adf.view.rich.model.RegionModelYes the model for this region.
visiblebooleanYes Default Value: true

the visibility of the component. If it is "false", the component will be hidden on the client. Unlike "rendered", this does not affect the lifecycle on the server - the component may have its bindings executed, etc. - and the visibility of the component can be toggled on and off on the client, or toggled with PPR. When "rendered" is false, the component will not in any way be rendered, and cannot be made visible on the client. In most cases, use the "rendered" property instead of the "visible" property.
Not supported on the following renderkits: org.apache.myfaces.trinidad.core