Displays the records of an Entity or a Structure in a tabular layout.
|Name||Identifies an element in the scope where it is defined, like a screen, action, or module.||Yes|
|Source Record List||Current list of records displayed by the widget.||Yes||The expression used in this property (if present) is evaluated when a widget runtime property is first used (e.g. an expression using the list Length runtime property) or when the widget is rendered.|
|Empty Message||Text displayed in the first row of the widget when there are no records to show.||"No items to show..."|
|Line Count||Maximum number of rows to display in this widget.||Yes||50|
|Start Index||Index of the first List item to iterate. Can be an expression.||Yes||0||The expression used in this property (if present) is evaluated before the web screen preparation.|
|Cell Height||Height of cells in the table in pixels. Other accepted units are points(pt) or percentage(%). Overrides the style sheet definition.|
|Cell Spacing||Space between cells in pixels. Overrides the style sheet definition.|
|Show Header||Set as Yes to display the header row of the table.||Yes||Yes|
|Style Classes||Specifies one or more style classes to apply to the widget. Separate multiple values with spaces.||"TableRecords"|
|Header Style||Specifies one or more style classes to apply to the header of the widget. Separate multiple values with spaces.||"TableRecords_Header"|
|Odd Line Style||Specifies one or more style classes to apply to the odd lines of the widget (excluding the header). Separate multiple values with spaces.||"TableRecords_OddLine"|
|Even Line Style||Specifies one or more style classes to apply to the even lines of the widget (excluding the header). Separate multiple values with spaces.||"TableRecords_EvenLine"|
|Property||Name of an attribute to add to the HTML translation for this element.||You can pick a property from the drop-down list or type a free text. The name of the property will not be validated by the platform.
Duplicated properties are not allowed. Spaces, " or ' are also not allowed.
|Value||Value of the attribute.||You can type the value directly or write expressions using the Expression Editor.
If the Value is empty, the corresponding HTML tag is created as property="property". For example, the nowrap property does not require a value, therefore nowrap="nowrap" is added.
|List||Collection of records returned by the performed query.||Record List|
|LineCount||Maximum number of rows displayed in the widget as defined in the Line Count property.||Yes||Integer|
|StartIndex||Index of the first record displayed in the widget as defined in the Start Index property.||Yes||Integer|
Layout of the widget
The layout of this widget follows these rules:
Each record of the entity or structure corresponds to one row in this widget.
Each attribute corresponds to one column.
For each attribute, there is one column with n+1 rows with the following semantics:
First row: The name of the attribute that corresponds to the "Label" property, if any, or the name of the attribute. You can apply styles to this row, by setting the "Header style" property.
Other rows: The value of the attribute for each record is displayed as a Expression widget and, therefore, you can use the Expression editor to modify it (they can optionally be presented using one of the input widgets to allow editing). You can have different styles in odd and even lines, by setting the "Odd Line style" and "Even Line style" properties.
Iterating the widget
The entity and/or structure records that you want to display are defined in the "Source Record List" property of this widget, which must be of the List type. Each record of this list is displayed on a different line. The first record that is displayed on the widget corresponds to the "Start Index" position on the list and the number of records displayed depends on the "Line Count" property.
To iterate over the Source Record List, you have to update the "Start Index" property for each iteration by using the "Line Count" and "Start Index" runtime properties of the Table Records widget.
- The widget "Id" runtime property is only available in the screen scope if the widget property "Name" is not empty.
- LineCount and StartIndex are very useful to implement the Previous and Next behaviors of a Table Records widget.