Live Data JavaScript API

Last modified by Eleni Cojocariu on 2026/09/11 15:51

Reference

Live Data provides a JavaScript API on the container of each instance, reached through the liveData jQuery data-property (as in jQuery("#wikis").data("liveData")) and in Live Data events.

Methods

MemberReturnsWhat it does
getLayoutIds()An array of layout idsLists the layouts the reader may switch to
getPropertyDescriptors()An array of property descriptorsLists the properties the instance knows, with their type, their displayer and their filter
updateEntries()NothingReloads the entries, with the filters and the sort currently applied
jQuery("#myld").data("liveData").getLayoutIds();
jQuery("#myld").data("liveData").getPropertyDescriptors();
jQuery("#myld").data("liveData").updateEntries();

HTML Attributes

These attributes select Live Data elements without depending on a layout, which is what makes a stylesheet or a test survive the reader switching layout.

AttributeSet onHolds
data-livedata-property-idEvery property displayerThe id of the property being displayed
data-livedata-entry-indexThe root element of an entryThe index of that entry in the page of results currently displayed
data-livedata-entry-idThe root element of an entryThe value identifying that entry

FAQ

How do I reach the API of a Live Data whose id I know?

Through the liveData jQuery data-property of its container, as in jQuery("#myld").data("liveData").

How do I refresh a Live Data after changing its data elsewhere?

By calling updateEntries, which reloads the entries with the filters and the sort currently applied.

Why select elements through these attributes rather than through CSS classes?

Because they are the same in every layout, so a selector built on them survives the reader switching layout.

Related

Get Connected