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 elements can have up to two types of child content:
- Any child element with a
slotattribute will be moved into that named slot, e.g.<span slot='startIcon'>...</span>. All supported named slots are documented below. Child elements with unsupported named slots will be removed from the DOM. - Any child element lacking a
slotattribute will be moved to the default slot, also known as a regular child.
-
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 and demos 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.
Example
Initialize the component with a context menu:
<oj-some-element> <-- use the contextMenu slot to designate this as the context menu for this component --> <oj-menu slot="contextMenu" style="display:none" aria-label="Some element's context menu"> ... </oj-menu> </oj-some-element>
Attributes
-
data :oj.PagingModel
-
The data to bind to the PagingControl.
Must implement the oj.PagingModel interface oj.PagingModel
- Default Value:
null
Names
Item Name Property dataProperty change event dataChangedProperty change listener attribute (must be of type function) on-data-changedExamples
Initialize the PagingControl with the
dataattribute specified:<oj-paging-control data='{{pagingDataSource}}'></oj-paging-control>Get or set the
dataproperty after initialization:// getter var pagingDataSource = myPagingControl.data; // setter myPagingControl.data = pagingDataSource; -
load-more-options :Object
-
Options for loadMore mode.
Names
Item Name Property loadMoreOptionsProperty change event loadMoreOptionsChangedProperty change listener attribute (must be of type function) on-load-more-options-changedExamples
Initialize the PagingControl, overriding load-more-options value:
<!-- Using dot notation --> <oj-paging-control load-more-options.max-count='300'></oj-paging-control> <!-- Using JSON notation --> <oj-paging-control load-more-options='{"maxCount":300}'></oj-paging-control>Get or set the
loadMoreOptionsproperty after initialization:// Get one var value = myPagingControl.loadMoreOptions.maxCount; // Set one. Always use the setProperty API for // subproperties rather than setting a subproperty directly. myPagingControl.setProperty('loadMoreOptions.maxCount', 300); // Get all var values = myPagingControl.loadMoreOptions; // Set all. Must list every loadMoreOptions key, as those not listed are lost. myPagingControl.loadMoreOptions = { maxCount: 300 }; -
load-more-options.max-count :number
-
The maximum number items to display.
See the load-more-options attribute for usage examples.
- Default Value:
500
Names
Item Name Property loadMoreOptions.maxCount -
mode :string
-
Paging mode.
- Default Value:
"page"
Supported Values:
Name Type Description "loadMore"string Display paging control in high watermark mode. "page"string Display paging control in pagination mode. Names
Item Name Property modeProperty change event modeChangedProperty change listener attribute (must be of type function) on-mode-changedExamples
Initialize the PagingControl with the
modeattribute specified:<oj-paging-control mode='loadMore'></oj-paging-control>Get or set the
modeproperty after initialization:// getter var modeValue = myPagingControl.mode; // setter myPagingControl.mode = 'loadMore'; -
overflow :string
-
Options for when the PagingControl width is too narrow to accommodate the controls in the paging control
- Default Value:
"fit"
Supported Values:
Name Type Description "fit"string Display as many controls as can fit in the PagingControl width. "none"string Display all controls. Controls which cannot fit will be truncated. Names
Item Name Property overflowProperty change event overflowChangedProperty change listener attribute (must be of type function) on-overflow-changedExamples
Initialize the PagingControl with the
overflowattribute specified:<oj-paging-control overflow='none'></oj-paging-control>Get or set the
overflowproperty after initialization:// getter var overflowValue = myPagingControl.overflow; // setter myPagingControl.overflow = 'none'; -
page-options :Object
-
Options for page mode.
Names
Item Name Property pageOptionsProperty change event pageOptionsChangedProperty change listener attribute (must be of type function) on-page-options-changedExamples
Initialize the PagingControl, overriding some page-options values and leaving the others intact:
<!-- Using dot notation --> <oj-paging-control page-options.some-key='some value' page-options.some-other-key='some other value'></oj-paging-control> <!-- Using JSON notation --> <oj-paging-control page-options='{"someKey":"some value", "someOtherKey":"some other value"}'></oj-paging-control>Get or set the
pageOptionsproperty after initialization:// Get one var value = myPagingControl.pageOptions.someKey; // Set one, leaving the others intact. Always use the setProperty API for // subproperties rather than setting a subproperty directly. myPagingControl.setProperty('pageOptions.someKey', 'some value'); // Get all var values = myPagingControl.pageOptions; // Set all. Must list every pageOptions key, as those not listed are lost. myPagingControl.pageOptions = { someKey: 'some value', someOtherKey: 'some other value' }; -
page-options.layout :Array
-
Array of paging navigation controls to be displayed (only applicable for numbers type).
This is an array of one or more supported values.
See the page-options attribute for usage examples.
- Default Value:
['auto']
Supported Values:
Name Type Description 'all'string Display all controls 'auto'string The PagingControl decides which controls to display 'input'string Display the page input control 'nav'string Display the navigation arrows 'pages'string Display the page links 'rangeText'string Display the page range text control Names
Item Name Property pageOptions.layout -
page-options.max-page-links :number
-
The maximum number of page links to display (only applicable for numbers type). An ellipsis '...' will be displayed for pages which exceed the maximum. maxPageLinks must be greater than 4.
See the page-options attribute for usage examples.
- Default Value:
6
Names
Item Name Property pageOptions.maxPageLinks -
page-options.orientation :string
-
The orientation of the page links.
See the page-options attribute for usage examples.
- Default Value:
"horizontal"
Supported Values:
Name Type 'horizontal'string 'vertical'string Names
Item Name Property pageOptions.orientation -
page-options.type :string
-
The type of page links.
See the page-options attribute for usage examples.
- Default Value:
"numbers"
Supported Values:
Name Type Description 'dots'string Render dots 'numbers'string Render numeric page links Names
Item Name Property pageOptions.type -
page-size :number
-
Page size.
- Default Value:
25
Names
Item Name Property pageSizeProperty change event pageSizeChangedProperty change listener attribute (must be of type function) on-page-size-changedExamples
Initialize the PagingControl with the
page-sizeattribute specified:<oj-paging-control page-size='50'></oj-paging-control>Get or set the
pageSizeproperty after initialization:// getter var pageSizeValue = myPagingControl.pageSize; // setter myPagingControl.pageSize = 50; -
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) on-translations-changedExamples
Initialize the component, overriding some translated resources and leaving the others intact:
<!-- Using dot notation --> <oj-some-element translations.some-key='some value' translations.some-other-key='some other value'></oj-some-element> <!-- Using JSON notation --> <oj-some-element translations='{"someKey":"some value", "someOtherKey":"some other value"}'></oj-some-element>Get or set the
translationsproperty after initialization:// Get one var value = myComponent.translations.someKey; // Set one, leaving the others intact. Always use the setProperty API for // subproperties rather than setting a subproperty directly. myComponent.setProperty('translations.someKey', 'some value'); // Get all var values = myComponent.translations; // Set all. Must list every resource key, as those not listed are lost. myComponent.translations = { someKey: 'some value', someOtherKey: 'some other value' }; -
translations.label-acc-nav-first-page :string
-
First page label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"First Page"
Names
Item Name Property translations.labelAccNavFirstPage -
translations.label-acc-nav-last-page :string
-
Last page label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"Last Page"
Names
Item Name Property translations.labelAccNavLastPage -
translations.label-acc-nav-next-page :string
-
Next page label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"Next Page"
Names
Item Name Property translations.labelAccNavNextPage -
translations.label-acc-nav-page :string
-
Current page label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"Page"
Names
Item Name Property translations.labelAccNavPage -
translations.label-acc-nav-previous-page :string
-
Previous page label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"Previous Page"
Names
Item Name Property translations.labelAccNavPreviousPage -
translations.label-acc-paging :string
-
Paging control label for screen readers.
See the translations attribute for usage examples.
- Default Value:
"Pagination"
Names
Item Name Property translations.labelAccPaging -
translations.label-load-more :string
-
Load more link text.
See the translations attribute for usage examples.
- Default Value:
"Show More..."
Names
Item Name Property translations.labelLoadMore -
translations.label-load-more-max-rows :string
-
Label for when load more has reached the maximum limit of rows to fetch.
See the translations attribute for usage examples.
- Default Value:
"Reached Maximum Limit of {maxRows} rows"
Names
Item Name Property translations.labelLoadMoreMaxRows -
translations.label-nav-input-page :string
-
Current page label.
See the translations attribute for usage examples.
- Default Value:
"Page"
Names
Item Name Property translations.labelNavInputPage -
translations.label-nav-input-page-max :string
-
Maximum page label.
See the translations attribute for usage examples.
- Default Value:
"of {pageMax}"
Names
Item Name Property translations.labelNavInputPageMax -
translations.max-page-links-invalid :string
-
Invalid max page links value error.
See the translations attribute for usage examples.
- Default Value:
"Value for maxPageLinks is invalid."
Names
Item Name Property translations.maxPageLinksInvalid -
translations.msg-item-range-current :string
-
Item range text for known row count.
See the translations attribute for usage examples.
- Default Value:
"{pageFrom}-{pageTo}"
Names
Item Name Property translations.msgItemRangeCurrent -
translations.msg-item-range-current-single :string
-
Item range text for single page range.
See the translations attribute for usage examples.
- Default Value:
"{pageFrom}"
Names
Item Name Property translations.msgItemRangeCurrentSingle -
translations.msg-item-range-items :string
-
Item range items text.
See the translations attribute for usage examples.
- Default Value:
"items"
Names
Item Name Property translations.msgItemRangeItems -
translations.msg-item-range-of :string
-
Item range "of" text.
See the translations attribute for usage examples.
- Default Value:
"of"
Names
Item Name Property translations.msgItemRangeOf -
translations.msg-item-range-of-approx :string
-
Item range "of approx" text.
See the translations attribute for usage examples.
- Default Value:
"approx."
Names
Item Name Property translations.msgItemRangeOfApprox -
translations.msg-item-range-of-at-least :string
-
Item range "of at least" text.
See the translations attribute for usage examples.
- Default Value:
"at least"
Names
Item Name Property translations.msgItemRangeOfAtLeast -
translations.page-invalid :string
-
Invalid page error.
See the translations attribute for usage examples.
- Default Value:
"The page value entered is invalid."
Names
Item Name Property translations.pageInvalid -
translations.tip-nav-first-page :string
-
First page button tip.
See the translations attribute for usage examples.
- Default Value:
"First"
Names
Item Name Property translations.tipNavFirstPage -
translations.tip-nav-input-page :string
-
Current page tip.
See the translations attribute for usage examples.
- Default Value:
"Go To Page"
Names
Item Name Property translations.tipNavInputPage -
translations.tip-nav-last-page :string
-
Last page button tip.
See the translations attribute for usage examples.
- Default Value:
"Last"
Names
Item Name Property translations.tipNavLastPage -
translations.tip-nav-next-page :string
-
Next page button tip.
See the translations attribute for usage examples.
- Default Value:
"Next"
Names
Item Name Property translations.tipNavNextPage -
translations.tip-nav-page-link :string
-
Current page link tip.
See the translations attribute for usage examples.
- Default Value:
"Go To Page {pageNum}"
Names
Item Name Property translations.tipNavPageLink -
translations.tip-nav-previous-page :string
-
Previous page button tip.
See the translations attribute for usage examples.
- Default Value:
"Previous"
Names
Item Name Property translations.tipNavPreviousPage
Methods
-
firstPage() → {Promise.<null>}
-
Load the first page of data
Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
firstPagemethod:myPagingControl.firstPage(); -
getProperty(property) → {any}
-
Retrieves a value for a property or a single subproperty for complex properties.
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:
var subpropValue = myComponent.getProperty('complexProperty.subProperty1.subProperty2'); -
lastPage() → {Promise.<null>}
-
Load the last page of data
Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
lastPagemethod:myPagingControl.lastPage(); -
loadNext() → {Promise.<null>}
-
Load the next set of data
Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
loadNextmethod:myPagingControl.loadNext(); -
nextPage() → {Promise.<null>}
-
Load the next page of data
Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
nextPagemethod:myPagingControl.nextPage(); -
page(page) → {Promise.<null>}
-
Load the specified page of data
Parameters:
Name Type Description pagenumber Page number. Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
pagemethod:myPagingControl.page(5); -
previousPage() → {Promise.<null>}
-
Load the previous page of data
Throws:
- Type
- Error
Returns:
promise object triggering done when complete.- Type
- Promise.<null>
Example
Invoke the
previousPagemethod:myPagingControl.previousPage(); -
refresh() → {void}
-
Refresh the paging control.
Returns:
- Type
- void
Example
Invoke the
refreshmethod:myPagingControl.refresh(); -
setProperties(properties) → {void}
-
Performs a batch set of properties.
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 single subproperty for complex properties and notifies the component of the change, triggering a [property]Changed event.
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");