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. This is documented under the "Default" heading below.
-
Default
-
The <oj-film-strip> element lays out its children in a single row or column across logical pages and allows navigating through them.
Example
Initialize the film strip with child content specified:
<oj-film-strip> <div class='my-filmstrip-item'>Alpha</div> <div class='my-filmstrip-item'>Beta</div> <div class='my-filmstrip-item'>Gamma</div> <div class='my-filmstrip-item'>Delta</div> <div class='my-filmstrip-item'>Epsilon</div> <div class='my-filmstrip-item'>Zeta</div> </oj-film-strip> -
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
-
arrow-placement :string
-
Specify the placement of the navigation arrows.
- Default Value:
"adjacent"
Supported Values:
Name Type Description "adjacent"string Arrows are outside, adjacent to the filmStrip content. The arrows are still inside the bounds of the filmStrip element itself. "overlay"string Arrows are inside, overlaying the filmStrip content. Names
Item Name Property arrowPlacementProperty change event arrowPlacementChangedProperty change listener attribute (must be of type function) on-arrow-placement-changedExamples
Initialize the FilmStrip with the
arrow-placementattribute specified:<oj-film-strip arrow-placement='overlay'> </oj-film-strip>Get or set the
arrowPlacementproperty after initialization:// getter var arrowPlacement = myFilmStrip.arrowPlacement; // setter myFilmStrip.arrowPlacement = 'overlay'; -
arrow-visibility :string
-
Specify the visibility of the navigation arrows.
- Default Value:
"auto"
Supported Values:
Name Type Description "auto"string Behaves as if the value were visiblewhen thearrow-placementattribute is set toadjacent, andhoverwhen thearrow-placementattribute is set tooverlay."hidden"string Arrows are hidden. "hover"string Arrows are visible when the mouse is over the filmStrip, and hidden otherwise. "visible"string Arrows are visible. Names
Item Name Property arrowVisibilityProperty change event arrowVisibilityChangedProperty change listener attribute (must be of type function) on-arrow-visibility-changedExamples
Initialize the FilmStrip with the
arrow-visibilityattribute specified:<oj-film-strip arrow-visibility='visible'> </oj-film-strip>Get or set the
arrowVisibilityproperty after initialization:// getter var arrowVisibility = myFilmStrip.arrowVisibility; // setter myFilmStrip.arrowVisibility = 'visible'; -
current-item :{id?: string, index?: number}
-
Specify the child item whose logical page should be displayed. The position of the item on the logical page is not guaranteed.
This attribute can be set to an object containing either string id of the item or numeric 0-based index of the item or both. If the object contains both string id and numeric index, string id takes precedence.
FilmStrip will automatically update the value of this attribute when the logical page is changed to be the first item on the new logical page. When the value is updated automatically, it will be an object containing numeric index and string id, if available.
When the element is resized, FilmStrip will preserve the value of this attribute to show the new logical page on which the item is located.
- Default Value:
{"index" : 0}
- Supports writeback:
true
Properties:
Name Type Argument Description idstring <optional>
string id of the item indexnumber <optional>
numeric 0-based index of the item Names
Item Name Property currentItemProperty change event currentItemChangedProperty change listener attribute (must be of type function) on-current-item-changedExamples
Initialize the FilmStrip with the
current-itemattribute specified:<!-- Using dot notation --> <oj-film-strip current-item.index='3' current-item.id='thirdItemId'> </oj-film-strip> <!-- Using JSON notation --> <oj-film-strip current-item='{"index" : 3, "id" : "thirdItemId"}'> </oj-film-strip>Get or set the
currentItemproperty after initialization:// Get one var index = myFilmStrip.currentItem.index; // Set one, leaving the others intact. Use the setProperty API for // subproperties so that a property change event is fired. myFilmStrip.setProperty('currentItem.index', 1); // Get all var currentItem = myFilmStrip.currentItem; // Set all myFilmStrip.currentItem = {'index' : 3, 'id' : 'thirdItemId'}; -
looping :string
PREVIEW: This is a preview API. Preview APIs are production quality, but can be changed on a major version without a deprecation path.
-
Specify the navigation looping behavior.
- Default Value:
"off"
Supported Values:
Name Type Description "off"string Navigation is bounded between first and last page and can't go any further in the direction of navigation. "page"string Navigation is not bounded between first and last page and can go further in the direction of navigation. This lets user to loop around from first page to last page or from last page to first page. Names
Item Name Property loopingProperty change event loopingChangedProperty change listener attribute (must be of type function) on-looping-changedExamples
Initialize the FilmStrip with the
loopingattribute specified:<oj-film-strip looping='page'> </oj-film-strip>Get or set the
loopingproperty after initialization:// getter var looping = myFilmStrip.looping; // setter myFilmStrip.looping = 'page'; -
max-items-per-page :number
-
Specify the maximum number of child items to show in a logical page. A value of 0 (the default) means that FilmStrip will show as many items per logical page as will fit based on the element and item sizes.
FilmStrip may show fewer than the specified number of items when
max-items-per-pageis set to a value other than 0 if the element size is smaller than what would be required to show that many items.- Default Value:
0
- See:
Names
Item Name Property maxItemsPerPageProperty change event maxItemsPerPageChangedProperty change listener attribute (must be of type function) on-max-items-per-page-changedExamples
Initialize the FilmStrip with the
max-items-per-pageattribute specified:<oj-film-strip max-items-per-page='3'> </oj-film-strip>Get or set the
maxItemsPerPageproperty after initialization:// getter var maxItemsPerPage = myFilmStrip.maxItemsPerPage; // setter myFilmStrip.maxItemsPerPage = 3; -
orientation :string
-
Specify the orientation of the FilmStrip.
- Default Value:
"horizontal"
Supported Values:
Name Type Description "horizontal"string Orient the FilmStrip horizontally. "vertical"string Orient the FilmStrip vertically. Names
Item Name Property orientationProperty change event orientationChangedProperty change listener attribute (must be of type function) on-orientation-changedExamples
Initialize the FilmStrip with the
orientationattribute specified:<oj-film-strip orientation='vertical'> </oj-film-strip>Get or set the
orientationproperty after initialization:// getter var orientation = myFilmStrip.orientation; // setter myFilmStrip.orientation = 'vertical'; -
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' }; -
(nullable) translations.label-acc-arrow-next-page :string
-
Accessible label for the next page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Select Next to display next page"
- Since:
- 1.1.0
Names
Item Name Property translations.labelAccArrowNextPage -
(nullable) translations.label-acc-arrow-previous-page :string
-
Accessible label for the previous page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Select Previous to display previous page"
- Since:
- 1.1.0
Names
Item Name Property translations.labelAccArrowPreviousPage -
(nullable) translations.label-acc-film-strip :string
-
Accessible page information label for the filmstrip element.
See the translations attribute for usage examples.
- Default Value:
"Displaying page {pageIndex} of {pageCount}"
- Since:
- 5.1.0
Names
Item Name Property translations.labelAccFilmStrip -
(nullable) translations.tip-arrow-next-page :string
-
Tooltip for the next page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Next"
- Since:
- 1.1.0
Names
Item Name Property translations.tipArrowNextPage -
(nullable) translations.tip-arrow-previous-page :string
-
Tooltip for the previous page navigation arrow.
See the translations attribute for usage examples.
- Default Value:
"Previous"
- Since:
- 1.1.0
Names
Item Name Property translations.tipArrowPreviousPage
Methods
-
getItemsPerPage() → {number}
-
Get the actual number of items shown per logical page.
The value returned by this method may be different from the value of the
maxItemsPerPageproperty.- See:
Returns:
The actual number of items shown per logical page.- Type
- number
Example
Invoke the
getItemsPerPagemethod:var itemsPerPage = myFilmStrip.getItemsPerPage(); -
getPagingModel() → {Object}
-
Get the PagingModel created and used by the FilmStrip. The PagingModel provides information about the FilmStrip's logical pages and a way to programmatically change pages.
Returns:
The instance of the PagingModel created and used by the FilmStrip.- Type
- Object
Example
Invoke the
getPagingModelmethod:var pagingModel = myFilmStrip.getPagingModel(); -
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'); -
refresh() → {void}
-
Refreshes the visual state of the FilmStrip. JET elements require a
refresh()after the DOM is programmatically changed underneath the element.This method does not accept any arguments.
Returns:
- Type
- void
Example
Invoke the
refreshmethod:myFilmStrip.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");