You are viewing the documentation for Blueriq 16. Documentation for other versions is available in our documentation directory.
The instance list container, sometimes misspelled as instancelist container, shows instances of an entity, and of subtypes of that entity (see Containers for Lists). The container can contain an expression to filter the entities shown. The instances to show can also be filtered by accessing the container through a multi-valued relation (i.e., setting the context for the container).
What goes in an AQ_InstanceList?
You model this container by placing attributes and buttons inside the content section (in addition to filling out parameters, see below). You usually place attributes in the content which belong to the entity chosen at the entity
parameter. At runtime, each row of the container belongs to one instance of the chosen entity, and it shows the attribute values corresponding to that instance. While it is possible to have the attributes editable, it is best practice to have them read-only. When adding a button, it is repeated for each instance. When the end user clicks on such a button, the corresponding instance is activated, and you can model a page to edit or delete the corresponding instance (or some other actions that you want to do with the instance).
Headers
Each element in the content of this container corresponds to a column of the container. Each column is preceded by a header text, defined in the headercontainer
parameter, if one is set. It is best practice to have the same number of headers as columns. Elements in the header column are handled differently than normal container elements, as follows:
Element type | Header behavior |
---|---|
Attribute | Shows the attribute's question text |
Container | Shows the container's display text |
Text Item | Shows the text item's content |
Asset | Shows asset text. The use of Assets is not recommended. This feature will be deprecated in a future version. |
other | Not supported, shows empty header |
Grouping multiple elements in columns
It is possible to add (inline) containers to the content of the AQ_InstanceList. Each container is a single column in the list view at runtime. This allows for styling to be applied to a set of values or buttons. If this is not intended, then you should remove all containers so that all elements are at the highest level in this container.
Parameters
Name | Description | Type | Required |
---|---|---|---|
referrer-path | Attribute/relation path to determine which instances to show, starting from a particular entity. | String | No |
entity | Name of the entity of which the instances will be shown. | String | Yes |
noinstancecontainer | Container that will be shown when there are no instances to show. | String | No |
headercontainer | Container of the header. Please see "Headers" section above for information on the behavior of elements in this container. | String | No |
whereclause | Expression to determine which instances to show. Only to be used when the container is accessed through a relation. | String | No |
sortattribute | Attribute that is used to sort the instances. | String | No |
sortorder | The order in which the list will be sorted. | “ascending” or “descending” | No |
sortunknownsaslast | With this setting all unknown values are sorted as last, irrespective if the sorting is ascending or descending. | Boolean | No |
pagingsize | The number of entries that you want to display on a single page. | Integer | No |
Sorting and paging
At runtime this container will show a paginated list of instances, that can be sorted by the end user. When the list doesn't fit on one page, a search box appears. This box matches the search text with entries in all attribute columns. This means that an instance is shown if the string is present as substring in one of the attribute columns. No wildcards are possible. Searching and sorting does not work on other columns, such as text items and containers.
Search
The instance list container offers a search box. The end user can add search terms and the instance list will be filtered in such a way that only instances that match all search terms will be displayed.
The search box is displayed under certain conditions:
- In the Material and MVC themes, the search box is visible for an instance list that is not read only.
- Additionally, in the MVC theme, the search box is hidden when there is only one page of instances.
To display a search box for a read only instance list, you should set the read only flag of the instance list container to FALSE and set the read only flag of all individual attributes to TRUE.
1 Comment
Charley Gielkens
What is the maximum advised number of instances to use an instancelist for?