major
minor
major
minor
Until now, the Generic feature has always added a technical column named _self to tables, which displays a link to the object itself along with a type icon and the object’s label—a label generated by the label provider for the object and typically derived from the name attribute. This results in duplication of the “name” and “_self” columns, which appears inconsistent to the user. In the display, “_self” must be shown so that a link and icon appear; for editing, “name” must be displayed, since the object label cannot be edited. This leads to a number of inconsistencies.
Improvement
The generically introduced technical column _self is removed from tables.
It is possible to annotate or configure an ID column for a specific table type. The ID column is the column in a table for which a symbol representing the row object’s type is added before its value and which is displayed as a link to its row object. If no ID column is specified, the “name” column is used by default, provided it exists.
Code Migration
In the files of the form
- *.jsp
- *.inc
- *.xml
- *.properties
- *.java
The technical column _self should be replaced with name.
If special comparators, tl:ResourceProvider, etc., that were applied to the row object itself, then these must be adjusted, or the (new) name column must be supplemented in the configuration—for simplicity’s sake—with, for example, the tl:IdentityAccessor, if possible.
ColumnInfoFactory#createReferenceColumn(TLTypePart, Set<? extends TLType>, ResKey, boolean, boolean) has been extended to include the tl:Accessor as follows: ColumnInfoFactory#createReferenceColumn(TLTypePart, Set<? extends TLType>, ResKey, Accessor<?>, boolean, boolean).
In `tl:ColumnsTemplateParameters`, the `idColumn ` property, which was responsible for sorting the rows, has been removed. Instead, the sort order can be configured for a table using a `tl:TableConfigurationProvider`:
{{{#!xml <configurationProviders>
<configurationProvider
class="com.top_logic.layout.table.model.SortOrderTableConfigurationProvider"
sortOrder="foobar:descending"
/>
</configurationProviders> }}} The corresponding layout and script recorder files must be updated.
Test
- In all tables—unless otherwise annotated in the displayed type or configured within the table itself—the "name" column should be rendered as a link with an icon representing the row object type. Previously, for example, in the "Type Demo > Grid " view, the name was not rendered as a link.
- Configure a type without a `name` attribute (e.g., using `title` and `description`) and display it as a table or grid. In the type, select `title` as the ID column. Accordingly, the value of this column should be displayed in the tables as a link with the type icon.