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.
-
contextMenu
-
The contextMenu slot is set on the
oj-menuwithin this element. This is used to designate the JET Menu that this component should launch as a context menu on right-click, Shift-F10, Press & Hold, or component-specific gesture. If specified, the browser's native context menu will be replaced by the JET Menu specified in this slot.The application can register a listener for the Menu's ojBeforeOpen event. The listener can cancel the launch via event.preventDefault(), or it can customize the menu contents by editing the menu DOM directly, and then calling refresh() on the Menu.
To help determine whether it's appropriate to cancel the launch or customize the menu, the ojBeforeOpen listener can use component API's to determine which table cell, chart item, etc., is the target of the context menu. See the JSDoc of the individual components for details.
Keep in mind that any such logic must work whether the context menu was launched via right-click, Shift-F10, Press & Hold, or component-specific touch gesture.
Attributes
-
auto-dismiss :"none"|"focusLoss"
-
Defines conditions that will cause an open popup to auto close dismiss. A value of
focusLossdefines the dismissal condition where focus has left the content of the popup or from the associated launcher or if what the popup is aligned to is not fully visible within an overflow area.- Default Value:
'focusLoss'
Supported Values:
Value Description "focusLoss"defines auto dismissal behavior when focus leaves the content of the popup or associated launcher. In addition, if what the popup is positioned to is not visible within an overflow area, the popup will auto close dismiss. "none"disables auto dismissal behaviors. Names
Item Name Property autoDismissProperty change event autoDismissChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-auto-dismiss-changed -
chrome :"default"|"none"
-
Defines the presence of border, shadow and background color of the root popup dom. Value of
noneapplies theoj-popup-no-chromeselector defined by the active theme to the root dom of the popup to remove the default chrome.- Default Value:
'default'
Supported Values:
Value Description "default"describes the popups border, shadow, and background color defined by the active theme. "none"turns off the outer chrome defined by the active theme. Names
Item Name Property chromeProperty change event chromeChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-chrome-changed -
initial-focus :"auto"|"none"|"firstFocusable"|"popup"
-
Determines if the popup should steal focus to its content when initially open. A value of
noneprevents the popup from grabbing focus when open.- Default Value:
'auto'
Supported Values:
Value Description "auto"is derived from the values of the modality and autoDismiss properties "firstFocusable"defines that a popup should grab focus to the first focusable element within the popup's content. "none"prevents the popup from stealing focus when open. "popup"focus to the root popup container (good choice for touch platforms). Names
Item Name Property initialFocusProperty change event initialFocusChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-initial-focus-changed -
modality :"modeless"|"modal"
-
Determines if the popup should block user input of the page behind with a blocking overlay pane.
The default modality varies by theme. Each theme can set its default by setting
$popupModalityOptionDefault.- Default Value:
'modeless'
Supported Values:
Value Description "modal"The popup is modal. Interactions with other page elements are disabled. Modal popups overlay other page elements. "modeless"defines a modeless popup. Names
Item Name Property modalityProperty change event modalityChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-modality-changed -
position :oj.ojPopup.Position
-
Position property is used to establish the location the popup will appear relative to another element. oj.ojPopup.Position defines "my" alignment "at" the alignment "of" some other thing which can be "offset" by so many pixels.
The "my" and "at" properties defines alignment points relative to the popup and other element. The "my" property represents the popups alignment where the "at" property represents the other element that can be identified by "of" or defauts to the launcher when the popup opens. The values of these properties describe horizontal and vertical alignments.
Deprecated v3.0.0 jQuery UI position syntax; Use of a percent unit with "my" or "at" is not supported.Names
Item Name Property positionProperty change event positionChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-position-changed -
position.at :Object
-
Defines which position on the target element ("of") to align the positioned element against.
Names
Item Name Property position.at -
position.at.horizontal :"start"|"end"|"left"|"center"|"right"
-
Defines the horizontal alignment of what the popup is aligned to.
- Default Value:
'start'
Supported Values:
Value Description "center""end"evaluates to "right" in LTR mode and "left" in RTL mode. "left""right""start"evaluates to "left" in LTR mode and "right" in RTL mode. Names
Item Name Property position.at.horizontal -
position.at.vertical :"top"|"center"|"bottom"
-
Defines the vertical alignment of what the popup is aligned to.
- Default Value:
'bottom'
Supported Values:
Value "bottom""center""top"Names
Item Name Property position.at.vertical -
position.collision :"flip"|"fit"|"flipfit"|"flipcenter"|"none"
-
Rule for alternate alignment.
- Default Value:
'flip'
Supported Values:
Value Description "fit"shift the element away from the edge of the window. "flip"the element to the opposite side of the target and the collision detection is run again to see if it will fit. Whichever side allows more of the element to be visible will be used. "flipcenter"first applies the flip rule and follow with center alignment. "flipfit"first applies the flip logic, placing the element on whichever side allows more of the element to be visible. Then the fit logic is applied to ensure as much of the element is visible as possible. "none"no collision detection. Names
Item Name Property position.collision -
position.my :Object
-
Defines which edge on the popup to align with the target ("of") element.
Names
Item Name Property position.my -
position.my.horizontal :"start"|"end"|"left"|"center"|"right"
-
Defines the horizontal alignment of the popup.
- Default Value:
'start'
Supported Values:
Value Description "center""end"evaluates to "right" in LTR mode and "left" in RTL mode. "left""right""start"evaluates to "left" in LTR mode and "right" in RTL mode. Names
Item Name Property position.my.horizontal -
position.my.vertical :"top"|"center"|"bottom"
-
Defines the vertical alignment of the popup.
- Default Value:
'top'
Supported Values:
Value "bottom""center""top"Names
Item Name Property position.my.vertical -
position.of :string|Object
-
Which element to position the popup against. The default is the
launcherargument passed to theopenmethod. If the value is a string, it should be a selector or the literal string value ofwindow. Otherwise, a point of x,y. When a point is used, the values are relative to the whole document. Page horizontal and vertical scroll offsets need to be factored into this point - see UIEvent pageX, pageY.Names
Item Name Property position.of -
position.offset :Object
-
Defines a point offset in pixels from the ("my") alignment.
Names
Item Name Property position.offset -
position.offset.x :number
-
Horizontal alignment offset.
- Default Value:
0
Names
Item Name Property position.offset.x -
position.offset.y :number
-
Vertical alignment offset.
- Default Value:
0
Names
Item Name Property position.offset.y -
tail :"none"|"simple"
-
Determines if a decoration will be displayed from the popup that points to the element the popup is aligned to. The
simplevalue enables the tail defined by the current theme. In addtion, theoj-popup-tail-simpleselector will be applied to the root dom element. This is to allow the box-shadow, z-index and other chrome styling to vary per tail decoration.- Default Value:
'none'
Supported Values:
Value Description "none"no decoration will be displayed from the popup pointing to the launcher. "simple"enables showing the tail defined by the current theme. Names
Item Name Property tailProperty change event tailChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-tail-changed -
translations :object|null
-
A collection of translated resources from the translation bundle, or
nullif this component has no resources. Resources may be accessed and overridden individually or collectively, as seen in the examples.If the component does not contain any translatable resource, the default value of this attribute will be
null. If not, an object containing all resources relevant to the component.If this component has translations, their documentation immediately follows this doc entry.
Names
Item Name Property translationsProperty change event translationsChangedProperty change listener attribute (must be of type function, see Events and Listeners for additional information.) on-translations-changed -
(nullable) translations.aria-close-skip-link :string
-
Label assigned to a hidden anchor tag used for accessibility navigation on platforms supporting VoiceOver. The link is injected as a sibling to the context area of an open popup and used for oj.ojPopup#close activation.
- Default Value:
"Double tap to close the open pop-up."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaCloseSkipLink -
(nullable) translations.aria-focus-skip-link :string
-
Label assigned to a hidden anchor tag used for accessibility navigation on platforms supporting VoiceOver. The link is injected as a sibling to the launcher of an open popup. The launcher is passed as the first argument to oj.ojPopup#open. Activation of the link will move focus to the content of the associated popup.
- Default Value:
"Double tap to navigate to the open pop-up."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaFocusSkipLink -
(nullable) translations.aria-live-region-initial-focus-first-focusable :string
-
Message announced to a WAI-ARIA live region on desktop platforms when a popup opens and steals initial focus.
- Default Value:
"Entering pop-up. Press F6 to navigate between the pop-up and associated control."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaLiveRegionInitialFocusFirstFocusable -
(nullable) translations.aria-live-region-initial-focus-first-focusable-touch :string
-
Message announced to a WAI-ARIA live region on platforms supporting VoiceOver when a popup opens and steals initial focus.
- Default Value:
"Entering pop-up. Pop-up can be closed by navigating to the last link within the pop-up."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaLiveRegionInitialFocusFirstFocusableTouch -
(nullable) translations.aria-live-region-initial-focus-none :string
-
Message announced to a WAI-ARIA live region on desktop platforms when a popup opens but doesn't change focus.
- Default Value:
"Pop-up opened. Press F6 to navigate between the pop-up and associated control."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaLiveRegionInitialFocusNone -
(nullable) translations.aria-live-region-initial-focus-none-touch :string
-
Message announced to a WAI-ARIA live region on platforms supporting VoiceOver when a popup opens but doesn't change focus.
- Default Value:
"Pop-up opened. Navigate to the next link to establish focus within the pop-up."
- Since:
- 6.0.0
- See:
Names
Item Name Property translations.ariaLiveRegionInitialFocusNoneTouch
Events
-
ojAnimateEnd
-
Triggered when a default animation has ended, such as when the component is being opened/closed or a child item is being added/removed. This event is not triggered if the application has called preventDefault on the animateStart event.
- "open" - when a popup component is opened
- "close" - when a popup component is closed
Properties:
All of the event payloads listed below can be found under
event.detail. See Events and Listeners for additional information.Name Type Argument Description elementElement <not nullable>
target of animation action"open" | "close" The action that is ending the animation. The number of actions can vary from component to component. Suggested values are: -
ojAnimateStart
-
Triggered when a default animation is about to start, such as when the component is being opened/closed or a child item is being added/removed. The default animation can be cancelled by calling
event.preventDefault.- "open" - when a popup component is opened
- "close" - when a popup component is closed
Properties:
All of the event payloads listed below can be found under
event.detail. See Events and Listeners for additional information.Name Type Argument Description action"open" | "close" The action that is starting the animation. The number of actions can vary from component to component. Suggested values are: elementElement <not nullable>
target of animation endCallbackfunction():void <not nullable>
If the event listener calls event.preventDefault to cancel the default animation, It must call the endCallback function when it finishes its own animation handling and any custom animation has ended. -
ojBeforeClose
-
Triggered before the popup is dismissed via the
close()method. The close can be cancelled by callingevent.preventDefault().See Events and Listeners for additional information.
-
ojBeforeOpen
-
Triggered before the popup is launched via the
open()method. The open can be cancelled by callingevent.preventDefault().See Events and Listeners for additional information.
-
ojClose
-
Triggered after the popup is dismissed via the
close()method.See Events and Listeners for additional information.
-
ojFocus
-
Triggered after focus has been transferred to the popup. This will occur after the
open()method is called, depending on the value of theinitialFocusproperty. It's also triggered when using the F6 key to toggle focus from the associated launcher element to the content of the popup.See Events and Listeners for additional information.
-
ojOpen
-
Triggered after the popup is launched via the
open()method.See Events and Listeners for additional information.
Methods
-
close() : {void}
-
Closes the popup. This method does not accept any arguments.
Fires:
- oj.ojPopup#event:ojBeforeClose
- oj.ojPopup#event:ojAnimationStart
- oj.ojPopup#event:ojAnimationEnd
- oj.ojPopup#event:ojClose
Returns:
- Type
- void
-
getProperty(property) : {any}
-
Retrieves the value of a property or a subproperty. The return type will be the same as the type of the property as specified in this API document. If the method is invoked with an incorrect property/subproperty name, it returns undefined.
Parameters:
Name Type Description propertystring The property name to get. Supports dot notation for subproperty access. - Since:
- 4.0.0
Returns:
- Type
- any
Example
Get a single subproperty of a complex property:
let subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2'); -
isOpen() : {boolean}
-
Returns the state of whether the popup is currently open. This method does not accept any arguments.
The "open" state reflects the period of time the popup is visible, including open and close animations.Returns:
trueif the popup is open.- Type
- boolean
-
open(launcher, position) : {void}
-
Opens the popup. This method accepts two arguments. The first argument "launcher" is required but the second "position" is optional.
Parameters:
Name Type Argument Description launcherstring | Element <not nullable>
selector or dom element that is associated with the popup. Defines the context of how the popup is used. The argument is required. positionoj.ojPopup.Position <optional>
oj.ojPopup.Position an element relative to another Fires:
- oj.ojPopup#event:ojBeforeOpen
- oj.ojPopup#event:ojAnimationStart
- oj.ojPopup#event:ojAnimationEnd
- oj.ojPopup#event:ojOpen
Returns:
- Type
- void
-
refresh() : {void}
-
Causes the popup to reevaluate its position. Call this function after the content of the popup has dynamically changed while the popup is open.
This method does not accept any arguments.
Returns:
- Type
- void
-
setProperties(properties) : {void}
-
Performs a batch set of properties. The type of value for each property being set must match the type of the property as specified in this API document.
Parameters:
Name Type Description propertiesObject An object containing the property and value pairs to set. - Since:
- 4.0.0
Returns:
- Type
- void
Example
Set a batch of properties:
myComponent.setProperties({"prop1": "value1", "prop2.subprop": "value2", "prop3": "value3"}); -
setProperty(property, value) : {void}
-
Sets a property or a subproperty (of a complex property) and notifies the component of the change, triggering a [property]Changed event. The value should be of the same type as the type of the attribute mentioned in this API document.
Parameters:
Name Type Description propertystring The property name to set. Supports dot notation for subproperty access. valueany The new value to set the property to. - Since:
- 4.0.0
Returns:
- Type
- void
Example
Set a single subproperty of a complex property:
myComponent.setProperty('complexProperty.subProperty1.subProperty2', "someValue");
Type Definitions
-
Position
-
- "flip" the element to the opposite side of the target and the collision detection is run again to see if it will fit. Whichever side allows more of the element to be visible will be used.
- "fit" shift the element away from the edge of the window.
- "flipfit" first applies the flip logic, placing the element on whichever side allows more of the element to be visible. Then the fit logic is applied to ensure as much of the element is visible as possible.
- flipcenter first applies the flip rule and follows with center alignment.
- "none" no collision detection.
Properties:
Name Type Argument Description myoj.ojPopup.PositionAlign <optional>
Defines which edge on the popup to align with the target ("of") element. atoj.ojPopup.PositionAlign <optional>
Defines which position on the target element ("of") to align the positioned element against. offsetoj.ojPopup.PositionPoint <optional>
Defines a point offset in pixels from the ("my") alignment. ofstring | oj.ojPopup.PositionPoint <optional>
Which element to position the popup against. The default is the launcherargument passed to theopenmethod.If the value is a string, it should be a selector or the literal string value of
window. Otherwise, a point of x,y. When a point is used, the values are relative to the whole document. Page horizontal and vertical scroll offsets need to be factored into this point - see UIEvent pageX, pageY.collision"flip" | "fit" | "flipfit" | "flipcenter" | "none" <optional>
Rule for alternate alignment. -
PositionAlign
-
- "start" evaluates to "left" in LTR mode and "right" in RTL mode.
- "end" evaluates to "right" in LTR mode and "left" in RTL mode.
Properties:
Name Type Argument Description vertical"top" | "bottom" | "center" <optional>
Vertical alignment. horizontal"start" | "end" | "left" | "center" | "bottom" <optional>
Horizontal alignment. -
PositionPoint
-
Properties:
Name Type Argument Description xnumber <optional>
Horizontal alignment offset. ynumber <optional>
Vertical alignment offset.