Element: <oj-menu-select-many>

Oracle® JavaScript Extension Toolkit (JET)
16.0.0

F83701-01

Since:
  • 6.0.0
Module:
  • ojmenuselectmany

Note: This component is in maintenance mode. Suggested alternative: <oj-c-menu-button>. For help updating an existing application, see the migration section.

QuickNav

Attributes


JET Menu Select Many

Description: JET Menu Select Many provides support for multiple selection of checkable menu items. The only supported component child element of oj-menu-select-many is oj-option. oj-menu-select-many cannot contain submenus but can be a child of a top-level oj-menu or submenu.

A JET Menu Select Many can be created with the following markup.


<!-- Including oj-option children -->
<oj-menu-select-many value="{{selectedColors}}">
  <oj-option value="blue">Blue</oj-option>
  <oj-option value="green">Green</oj-option>
  <oj-option value="red">Red</oj-option>
</oj-menu-select-many>

<!-- Collection bound simple syntax, no need to specify oj-option children -->
<oj-menu-select-many value="{{selectedColors}}" options="[[colorOptions]]">
</oj-menu-select-many>

Touch End User Information

Target Gesture Action
Menu Item Tap Invoke the menu item's action and toggle checked state.

Disabled items do not allow any touch interaction.

Keyboard End User Information

Target Key Action
Menu Item Enter or Space Invoke the focused menu item's action and toggles the checked state.
UpArrow Move focus to the previous menu item, wrapping around at the top.
DownArrow Move focus to the next menu item, wrapping around at the bottom.
Home Move focus to the first menu item.
End Move focus to the last menu item.
Menu Item in Top-level Menu Esc Close the menu and move focus to the launcher.

Disabled items can receive keyboard focus, but do not allow any other interaction.


Usage

Signature:

interface MenuSelectManyElement

Typescript Import Format
//To typecheck the element APIs, import as below.
import { MenuSelectManyElement } from "ojs/ojmenuselectmany";

//For the transpiled javascript to load the element's module, import as below
import "ojs/ojmenuselectmany";

For additional information visit:

Note: Application logic should not interact with the component's properties or invoke its methods until the BusyContext indicates that the component is ready for interaction.


Slots

JET components that allow child content support slots. Please see the slots section of the JET component overview doc for more information on allowed slot content and slot types.

Default

The <oj-menu-select-many> element accepts oj-option elements as children. See the oj-option documentation for details about accepted children and slots.

Attributes

disabled :boolean

Disables all the checkable menu items if set to true.
Default Value:
  • false
Since:
  • 6.0.0
Names
Item Name
Property disabled
Property change event disabledChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-disabled-changed

options :(Array.<oj.ojMenuSelectMany.Option>|DataProvider.<any, any>|null)

Default Value:
  • null
Since:
  • 6.0.0
Names
Item Name
Property options
Property change event optionsChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-options-changed

value :Array.<any>

The value of the element. The value is an array with any type of items.
Default Value:
  • []
Supports writeback:
  • true
Since:
  • 6.0.0
Names
Item Name
Property value
Property change event valueChanged
Property change listener attribute (must be of type function, see Events and Listeners for additional information.) on-value-changed

Methods

getProperty(property) : {any}

Retrieves a value for a property or a single subproperty for complex properties.
Parameters:
Name Type Description
property string The property name to get. Supports dot notation for subproperty access.
Since:
  • 6.0.0
Returns:
Type
any

setProperties(properties) : {void}

Performs a batch set of properties.
Parameters:
Name Type Description
properties Object An object containing the property and value pairs to set.
Since:
  • 6.0.0
Returns:
Type
void

setProperty(property, value) : {void}

Sets a property or a single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
Parameters:
Name Type Description
property string The property name to set. Supports dot notation for subproperty access.
value any The new value to set the property to.
Since:
  • 6.0.0
Returns:
Type
void

Type Definitions

Option

Properties:
Name Type Argument Description
disabled boolean <optional>
menu item is disabled.
id string <optional>
menu item id.
label string menu item label.
value any menu item value.