Element: <oj-progress>

Oracle® JavaScript Extension Toolkit (JET)
7.1.0

F18183-01

Signature:

class ojProgress

QuickNav

Attributes

JET Custom Elements

JET components are implemented as custom HTML elements. In addition to the component attributes documented in this page, JET components also support standard HTML global attributes like id and aria-label.

The JET data binding syntax can be used to define both component and global attributes through the use of dynamically evaluated expressions. All attributes (component and global) support attribute-level binding by prefixing the attribute name with ":" (e.g. :id="[...]"). When using attribute-level binding, all expression values are treated as strings. Additionally, component attributes support property-level binding by using the attribute name directly with no ":" prefix. When using property-level binding, the expressions should evaluate to the types documented by the corresponding attributes. Property-level binding is strongly recommended over attribute-level binding for component attributes.

A detailed description of working with custom HTML elements can be found in: JET Custom Element Usage.



PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.

Version:
  • 7.1.0
Since:
  • 1.0.0
Module:
  • ojprogress

Module usage

See JET Module Loading for an overview of module usage within JET.

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

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

JET In Typescript

A detailed description of working with JET elements and classes in your typescript project can be found at: JET Typescript Usage.


JET Progress

The JET Progress element allows a user to display progress of an operation in a rectangular horizontal or circular meter. If a developer does not wish to display the exact value, a value of '-1' can be passed in to display an indeterminate value.
<oj-progress value='{{progressValue}}'></oj-progress>

Touch End User Information

This element has no touch interaction.

Keyboard End User Information

This element has no keyboard interaction.

Styling

The following CSS classes can be applied by the page author as needed.

Class Description Example
oj-progress-bar-embedded Optional class that can be set on a oj-progress bar element to style an embedded progress bar within a web application or dialog.
<div class='oj-web-applayout-page'>
 <header class='oj-web-applayout-header'></header>
 <oj-progress class='oj-progress-bar-embedded' value='{{loadingValue}}'>
 </oj-progress>
</div>
oj-progress-bar-start-label Optional class that can be set on a div after the oj-progress element. This div contains the start text to display underneath the oj-progress bar.
<div id='progress-container'>
 <oj-progress value='{{loadingValue}}'></oj-progress>
 <div class='oj-progress-bar-start-label'>0%</div>
 <div class='oj-progress-bar-end-label'>100%</div>
</div>
oj-progress-bar-end-label Optional class that can be set on a div after the oj-progress element. This div contains the end text to display underneath the oj-progress bar.
<div id='progress-container'>
 <oj-progress value='{{loadingValue}}'></oj-progress>
 <div class='oj-progress-bar-start-label'>0%</div>
 <div class='oj-progress-bar-end-label'>100%</div>
</div>

Accessibility

If this element is being used to describe the loading process of a particular region of a page, then the aria-describedby attribute must point to the id of the oj-progress and aria-busy = "true" must be added to the region until the loading is complete.

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-menu within 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

max :number

The maximum allowed value. The element's max attribute is used if it is provided, otherwise the default value of 100 is used.
Default Value:
  • 100
Names
Item Name
Property max
Property change event maxChanged
Property change listener attribute (must be of type function) on-max-changed

translations :object|null

A collection of translated resources from the translation bundle, or null if 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 translations
Property change event translationsChanged
Property change listener attribute (must be of type function) on-translations-changed

translations.aria-indeterminate-progress-text :string

Accessible text read by a screen reader while an indeterminate oj-progress is in progress.

See the translations attribute for usage examples.

Default Value:
  • "In Progress"
Since:
  • 4.0.0
Names
Item Name
Property translations.ariaIndeterminateProgressText

type :"bar"|"circle"

The shape of the Progress.
Supported Values:
Value Description
"bar" displays progress in a rectangular horizontal meter
"circle" displays progress in a circular meter
Default Value:
  • "bar"
Since:
  • 3.0
Names
Item Name
Property type
Property change event typeChanged
Property change listener attribute (must be of type function) on-type-changed

value :number

The value of the Progress. The element's value attribute is used if it is provided, otherwise the default value of 0 is used. For indeterminate Progress, set value to -1.
Default Value:
  • 0
Supports writeback:
  • true
Names
Item Name
Property value
Property change event valueChanged
Property change listener attribute (must be of type function) on-value-changed

Methods

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
property string 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');

refresh() → {void}

Refreshes the component.
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
properties Object 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
property string The property name to set. Supports dot notation for subproperty access.
value any 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");