Container API

In addition to a list of property match descriptors for selected results, the view plugin receives a container API object via the view function whenever a user:

  • Clicks the toolbar button for a view plugin
  • Revisits a stateless view through a refresh, bookmark, or the browser history

Container API objects expose app functionality to the views. For more information on creating custom views for your application, see the Plugin Views section of the Client Settings reference topic.

Members

The Container API contains the members described in the following sections.

element

The element member contains the raw DOM element the view plugin will populate.

events

The events member should be used by both stateless and stateful views to send notifications of state change to the application.

Methods Description
stateChange(
descriptors:PropertyMatchDescriptors,
limit:number
orderBy:OrderBy)
Send notification of state change. This will update the URL.

search

The search member can be used to invoke entities and link (transaction) searches.

Methods Description
entities(
descriptors:PropertyMatchDescriptors,
callback:function
limit:number
orderBy:OrderBy)
Returns a set of Entity search results (not exceeding limit) through the callback function based on matching properties. Results are ordered based on orderBy.
links(
descriptors:PropertyMatchDescriptors,
callback:function
limit:number
orderBy:OrderBy)
Returns a set of Link (transaction) search results (not exceeding limit) through the callback function based on matching properties. Results are ordered based on orderBy.