|Oracle Fusion Middleware Tag Reference for Oracle ADF Faces
11g Release 1 (184.108.40.206.0)
UIComponent class: oracle.adf.view.rich.component.rich.RichMenuBar
Component type: oracle.adf.RichMenuBar
Unsupported agents: pda
A menuBar is designed to be used inside of an
<af:toolbox>. It usually contains menus, menu items (commandMenuItem and goMenuItem), or groups of these components. You may use a menuBar outside of a toolbox though doing so will cause the menuBar to lose some of the geometry management functionality that the toolbox and menuBar provide. For example, the flex attribute will have no feasible meaning if the menuBar is not inside a toolbox. MenuBars are not rendered on printable pages.
Typically you would put a menu or group component in a menuBar. Menu items, such as commandMenuItem and goMenuItem, are also supported in side a menuBar. You may alternatively put a facetRef, iterator, or switcher in a menuBar if these wrappers provide components that would normally belong in the menuBar.
If you group the children of a menuBar, separators will be drawn between the children of a group.
If you have an
<af:toolbox> with multiple toolbars or menuBars displayed on a single row, you can specify how they are stretched in relationship to each other by specifying their
flex attributes. You can control stretching within a menuBar by using its
stretchId property. If you want a menuBar to align certain items to the left, and other items to the right, you can put an
<af:spacer> in between them. You would then specify the menuBar's stretchId to that spacer. A menuBar that specifies a stretchId should also have a flex value assigned, to indicate to the toolbox that it requires special handling.
<af:toolbox> <af:menuBar flex="1" stretchid="stretch1"> <af:menu text="Edit"> <af:commandMenuItem text="menu item"/> </af:menu> <af:spacer id="stretch1" clientComponent="true"/> <af:menu text="Help"> <af:commandMenuItem text="menu item"/> </af:menu> </af:menuBar> </af:toolbox>
Note that if a menuBar child component is going to be updated through partial page rendering, you need to update the menuBar as well. You do this by adding the child components id to the menuBar's partialTriggers attribute. This way the menuBar can appropriately manage its children in respect to sizing and placement in overflow.
<af:menuBar> <af:menu> <af:commandMenuItem text="Item1"/> <af:commandMenuItem text="Item2"/> <af:commandMenuItem text="Item3"/> </af:menu> </af:menuBar>
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 events might include the width of a column that supported client-side resizing.|
|attributeChangeListener||javax.el.MethodExpression||Only 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.|
|binding||oracle.adf.view.rich.component.rich.RichMenuBar||Only 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.|
|clientComponent||boolean||Yes||Default Value: false
|customizationId||String||Yes||This attribute is deprecated. The 'id' attribute should be used when applying persistent customizations. This attribute will be removed in the next release.|
|disabled||boolean||Yes||Default Value: false
whether the menu bar should be disabled.
|flex||int||Yes||Default Value: 0
a non-negative integer that indicates the flexibility of this component in its container. If the container supports it (the toolbox component), flex is used to determine how space is distributed among its children. Components with larger flex values will be made larger than components with lower flex values. This is done so at the ratio determined by the flex of each of the two components. The actual value is only relevant if there are other flexible components (components with flex values larger than zero) within the same container. Components that specify a stretchId should specify a flex value as well.
|id||String||No||the identifier for the component. The identifier must follow a subset of the syntax allowed in HTML:
|inlineStyle||String||Yes||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. 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.|
|partialTriggers||String||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.|
|rendered||boolean||Yes||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.
|shortDesc||String||Yes||the short description of the component. This text is commonly used by user agents to display tooltip help text, in which 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 it is recommended that helpTopicId is used as it is more flexible and is more accessibility-compliant.|
|stretchId||String||Yes||the id of a child component that will be given all of the available space left in the menuBar if the contents of the menuBar do not use all of the space that the menuBar has available. A menuBar that specifies a stretchId should specify a flex value as well.|
|styleClass||String||Yes||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'.|
|unsecure||java.util.Set||Yes||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.|
|visible||boolean||Yes||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