Summary

Tag Name:<af:panelBox>
Java Class:oracle.adf.view.rich.component.rich.layout.RichPanelBox
Component Type:oracle.adf.RichPanelBox
Unsupported Agent(s): pda

The panelBox is used to place ancillary information on a page, offset by a certain color.

There are four possible attributes to set for the content container. The width of the container can be set to either an exact pixel size or a percentage of the element the content container is within. This is done by using the inlineStyle or styleClass attributes.

Content containers can have header text, icons and a toolbar facet. Set the text and icon attributes to gain these items. If you do not set header text or icon or toolbar facet then the header portion will not render. The content container will only display its children. If an icon is set, the icon will appear to the left of the header, but the content will still be offset to the left of the header. In addition if you define a toolbar facet then this will always be right aligned to the end of the header. If an icon is set but no header text, the icon will still be displayed on the left but no header text will be visible. If a toolbar facet then this content will be right aligned to the end of the header. The toolbar facet does not support overflow, so the content should be simple. Most of the time you should be adding simple components like a link, command toolbar button, etc. It is highliy recommended that you use a toolbox with a single toolbar with your specific components inside the toolbar. Doing so allows you to take advantage of the geometry management inside the toolbar and toolbox. NOTE: Anytime the toolbar facet is defined the titleHalign attribute is ignored. This means setting this value will have no effect.

Content containers can have various color schemes, which can be specified by setting a combination of the ramp and background attributes. The values for the background attribute are default, light, medium, and dark. The default is default. There are two distinct color schemes controlled by the ramp attribute. The value for ramp can be core or highlight with core as the default Please note that changing the background attribute may also change the appearance of the title bar.

You can make changes to the style of the content region of this component by adding your custom styles to the contentStyle attribute.

Content containers will generally have only one child with the actual contents as its children. This child will describe how the content should be displayed. However, the content container can have multiple children, but please note that it does not layout these children in any way.

Geometry Management

  • This component will be stretched if:
    • type="default" and its parent layout component is stretching the panelBox (e.g. panelDashboard)
    • type="stretch"
  • This component will not be stretched if:
    • type="default" and its parent layout component is not stretching the panelBox (e.g. panelGroupLayout)
    • type="flow"
  • The panelBox component will only stretch its children if it is being stretched by its parent (or if type="stretch"). If the children are being stretched but you don't want them to be stretched, simply wrap the children in a panelGroupLayout layout="scroll".

Screenshot(s)

panelBox screenshot
A panelBox component.

Code Example(s)

<af:panelBox text="Header"
             background="light"
             contentStyle="background:blue;"
             icon="/images/info.png"
             inlineStyle = "width: 25%;"
             id="pb1">
  <af:panelGroupLayout layout="vertical" id="pgl1">
    <af:link text="point 1" destination="http://www.oracle.com" id="gl1"/>
    <af:link text="point 2" destination="http://www.oracle.com" id="gl2"/>
    <af:link text="point 3" destination="http://www.oracle.com" id="gl3"/>
    <af:link text="point 4" destination="http://www.oracle.com" id="gl4"/>
    <af:link text="point 5" destination="http://www.oracle.com" id="gl5"/>
  </af:panelGroupLayout>
</af:panelBox>

Accessibility Guideline(s)

  • helpTopicId attribute: Help information should be provided using the helpTopicId.
    • It is preferred to use helpTopicId instead of shortDesc to provide help information.
  • icon attribute: The icon is decorative. Because the icon is decorative, it should not communicate any meaning beyond what is already expressed in the text (or shortDesc) attribute.

Supported Client Events for Client Behaviors

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

Events

Type Phases Description
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.

Supported Facets

Name Description
toolbarHeader location for toolbar content. As with JSP pages, when using Facelets, multiple components are not allowed in this facet.

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.
backgroundStringYes Valid Values: light, medium, dark, default
Default Value: default

the appearance type of the content container. It should be one of "light", "medium", "dark", or "default"
bindingoracle.adf.view.rich.component.rich.layout.RichPanelBoxOnly 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.
contentStyleStringYes the inline style of the content region.
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".
handleDisclosureStringYes Valid Values: client, server
Default Value: server

How the disclosure is handled. If client side, the disclosure state of the client component is not propagated to the server until another event triggers a round trip to the server.
Not supported on the following renderkits: org.apache.myfaces.trinidad.core
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.
iconStringYes the URI of an image to be displayed in the panelBox header. This attribute supports these various types of URIs:
  • absolute - an absolute path to the image, like "http://oracleimg.com/admin/images/ocom/hp/oralogo_small.gif"
  • relative - a path located relatively to the source page, like "bullet.jpg"
  • context relative - a path relatively based on the web application's context root, like "/images/error.png"
  • server relative - a path relatively based on the web server by application name, like "//adf-richclient-demo-context-root/images/error.png"
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.
rampStringYes Valid Values: core, highlight
Default Value: core

the appearance type of the content container. It should be either "core" or "highlight"
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: ifNeeded

the display strategy for the panelBox's header. It should be either "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 panelBox 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 "icon" or "text" properties are set, if the "toolbar" facet is populated, or if the panelBox has a drag source attached. The default is "ifNeeded" 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 panelBox.
titleHalignStringYes Valid Values: start, end, center, left, right
Default Value: start

the alignment of the text and icon within the title bar. Supported values are:
  • "start": left side of the bar in left-to-right mode, right of the bar in right-to-left mode (this is the default)
  • "end": right side of the bar in left-to-right mode, left side of the bar in right-to-left mode
  • "center": in the center
  • "left": left side of the bar
  • "right": right side of the bar
This value is ignored if the toolbar facet is defined.
typeStringYes Valid Values: default, flow, stretch
Default Value: default

how the panelBox will handle geometry management. Options are:
  • default - either flow or stretch, depending on the container the panelBox is inside
  • flow - does not support being stretched and will not attempt to stretch the children; the height of the panelBox will be determined by the browser based on the children
  • stretch - supports being stretched and will attempt to stretch the sole child or will wrap the children without stretching them; the height of the panelBox is in no way determined by the children. If helpTopicId is also specified, no instruction text will be displayed when stretched because there would be no space allocated for it.
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.
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