ResultSetLayout
A ResultSetLayout
displays the renderable nodes of the
current page in the ResultSet
arranging them in
a <table>
; each column contains a node.
By default each <table>
row displays a single column; the maximum number of column in a row can be set with the columnCount
option.
If the ResultSet extension provides more than one result set,
this tool creates a tab for each result set <table>
. The label of each tab provides the term identified by the "semantic engine" used to generate the correspondent result set.
In order to be rendered, the UINode class must be registered by adding its reference
to the uiNodes
array. For details and examples about registration and rendering of the nodes,
see this section.
If the optional options.mapWidget
, options.pagWidget
and options.tfWidget
instances are provided, their update
method
is called during the layout updating.
As well as the documented properties, all the additional options
property are passed as argument to each
renderable node constructor.
For CSS personalization, see the resultset-layout-table
class of the API CSS file
Constructor
ResultSetLayout
-
id
-
[options]
Parameters:
-
id
Stringid of an existent HTML container (typically
<div>
element) in which the layout is inserted -
[options]
Object optionalas well as the following properties, all the additional properties of this object are passed as argument to each renderable node constructor. For example, this allows a
UINode
to render itself in a compact way in case the column count is greater than one.-
[uiNodes]
UINode[] optionalarray of registered
UINode
classes to instantiate during the search for a renderable node -
[commonUINode=Common_UINode]
UINode optionalthe UI node subclass to instantiate when the search for renderable nodes fails. By the default a
Common_UINode
instance is rendered -
[mapWidget]
ResultsMapWidget optionalan instance of
ResultsMapWidget
toupdate
-
[pagWidget]
PaginatorWidget optionalan instance of
PaginatorWidget
toupdate
-
[tfWidget]
TermFrequencyWidget optionalan instance of
TermFrequencyWidget
toupdate
-
[columnCount=1]
Integer optionalmaximum number of columns of each
<table>
row; this determines the maximum number of nodes to display in a single row -
[maxHeight=0]
Integer optional -
[onUpdateReady]
Function optionalcallback function called when the layout updating is ready
-
[renderedNodes]
UINode[] optionalarray with the rendered nodes
-
-
[browseCollection]
Boolean optionalif set, enables the browsing of collections
-
[onDiscoverResponse]
Function optionalrequired if
browseCollection
is set. It is called by the refiner methods -
[onBrowsingReady]
Function optionalcallback function called when the browsing of collection/s is ready
-
[preserve]
Boolean optional -
[sortingFunction]
Function optional
-
Item Index
Methods
Methods
update
-
response
Updates the layout according to the provided discover response
Parameters:
-
response
Object