A database that returns nav: based elements such as nav:keyword can be specified using the navSearchContext element
Example
Here is an example of navSearchContext configuration:
<I4Config
xmlns:ssc="http://www.teradp.com/schemas/GN4/1/StandardSearchControls.xsd"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
. . .
<searchContexts>
<navSearchContext name="Keywords"
allowEmptySearches="true"
xquery="nav:keywords/nav:keyword">
<menu>
<menuItem name="Confirm" iconName="fa-edit" command="confirmKeyword" />
<menuItem name="Unconfirm" iconName="fa-edit" command="confirmKeyword">
<params>
<add key="confirm" value="false"/>
</params>
</menuItem>
<menuItem name="Rename" iconName="fa-edit" command="renameKeyword" />
<menuItem name="Delete" iconName="fa-edit" command="deleteKeyword" />
</menu>
<searchForm>
<ssc:and>
<ssc:dropDownObjects path="gn4:keywordSet/nav:refObject/@idref"
label="Keyword Set" xquery="gn4:keywordSet order by @name" />
<ssc:textBox path="@keyword"
label="Keyword" operators="StartsWith Contains Equal EndsWith"/>
<ssc:booleanCheckBox path="@confirmed" label="Confirmed"/>
<ssc:calendarTime path="@creationDate" label="CreationDate"
operators="Before After LastDays LastHours"/>
</ssc:and>
</searchForm>
<columns>
<column name="CreationDate"/>
<column name="Keyword"/>
<column name="Confirmed"/>
<column name="KeywordSetName"/>
</columns>
</navSearchContext>
. . .
Properties
navSearchContext/@name
Name of the search context, as it is referenced by I4Config/sideBars/sideBar/searchContextRef/@name. It identifies the search context: it is mandatory and must be unique. Inside the navigation bar and in the header of the associated result widget, it is translated using StringScope.Default.
navSearchContext/@iconName
Name of the icon associated to the search context. That icon is displayed in both the navigation bar and in the header of the associated result widget.
navSearchContext/@xquery
The base xquery used in conjunction with the search form to generate the complete query passed to the database. This is limited to a few special nav: based cases:
•nav:keywords/nav:keyword
•nav:taskLogs/nav:taskLog
The results generated displayed in a table using columns specified by the columns element.
navSearchContext/searchForm
Configuration of the search form that popups when clicking the search icon on the header bar of the result widget in order to filter the results list. It is optional and, when configured, must contain one and only one search control element (any available element in the http://www.teradp.com/schemas/GN4/1/StandardSearchControls.xsd namespace, i.e. dropDownObjects, textBox, etc…).
See Search controls chapter for details concerning the configuration of search controls.
navSearchContext/columns
The results generated by the nav base search are displayed in a simple table using the column elements specified in this section. If this section is not specified then a default set is used instead.
Each column element has the following properties
•name: the name of the attribute to display
•title: the optional title of the column to display
The title attribute is optional and if not specified, the name value will be used. In either case, the value is translated using the ObjAttrCaption string scope.