Element: <oj-option>

Oracle® JavaScript Extension Toolkit (JET)
10.0.0

F32683-01

Since:
  • 4.0.0
Module:
  • ojoption

QuickNav

Attributes


JET Option

The oj-option element is used to declare values for JET elements that display list of values. It's supported by the following elements:

  • oj-buttonset-one
  • oj-buttonset-many
  • oj-checkboxset
  • oj-combobox-one
  • oj-combobox-many
  • oj-menu
  • oj-radioset
  • oj-select-one
  • oj-select-many
  • oj-menu-select-many
  • oj-swipe-actions

For example:


<oj-select-one>
  <oj-option value="option 1">option 1</oj-option>
  <oj-option value="option 2">option 2</oj-option>
  <oj-option value="option 3">option 3</oj-option>
  <oj-option value="option 4">option 4</oj-option>
</oj-select-one>


Usage

Signature:

interface OptionElement

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

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

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

Child content for oj-option. This is normally the text node that displays for oj-option.

endIcon

Named slot for the oj-option's end icon.

startIcon

Named slot for the oj-option's start icon.

Attributes

disabled :boolean

Disables the oj-option if set to true.

Default Value:
  • false
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

value :any

Specifies the oj-option's value. The value is associated with the oj-option element whose display value may be different.

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.
Returns:
Type
any

refresh : {void}

Refreshes the visual state of the component.
Returns:
Type
void

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.
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.
Returns:
Type
void