#1950 closed enhancement (fixed)
Add support for any-to-any link filters in table lists views
Reported by: | Nicklas Nordborg | Owned by: | everyone |
---|---|---|---|
Priority: | major | Milestone: | BASE 3.6 |
Component: | core | Version: | |
Keywords: | Cc: |
Description
This is similar to #1906 but to begin with it is only about support in the core for filtering on any-to-any links in table list views. There will be no generic way to add such columns to a list using the web interface. This feature is intended to be used by extensions that can inject their own columns based on any-to-any links.
Change History (10)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
Extensions should be able to extend the AbstractListColumnBean
class and set properties as in the following example (linking a FILE item as 'image'):
bean.setId("linked-item"); bean.setTitle("Linked image"); bean.setProperty("|image|FILE"); bean.setValueType(Type.BOOLEAN); bean.setFilterable(true); bean.setExportable(true); bean.setExportFormatter(new ToStringFormatter());
The export formatter is needed since otherwise the export plug-in expects a boolean return value.
The extension must also implement the getValue()
method that does the actual fetching of the linked item and return value (eg. name of the file). The AnyToAnyDataLoader
contains more or less all functionality that is needed.
comment:3 by , 9 years ago
(In [6932]) References #1950: Add support for any-to-any link filters in table lists views
Exporting did not work when column was defined by an extension since the formatter was overwritten in some cases resulting in a ClassCastException
.
The AnyToAnyDataLoader
can now return the linked item which allows list pages to use the regular <base:propertyvalue> taglib to link to the target item.
comment:4 by , 9 years ago
(In [6933]) References #1950: Add support for any-to-any link filters in table lists views
Filtering on properties on the target item is now supported using a subquery. A remaining issue is that the sharing options selected from the 'view/preset' list is applied also to the linked items. They should only be applied to the main query to make the behaviour consistent with how other filters work.
comment:5 by , 9 years ago
Repeating the example above with a filter on the file name:
bean.setId("linked-item"); bean.setTitle("Linked image"); bean.setProperty("|image|FILE|name"); bean.setValueType(Type.STRING); bean.setFilterable(true); bean.setExportable(true); bean.setExportFormatter(new ToStringFormatter());
comment:6 by , 9 years ago
comment:7 by , 9 years ago
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [6931]) References #1950: Add support for any-to-any link filters in table lists views
Basic level of support for any-to-any filters. The column definition should set the filter property to
|link|target|property
where:At the moment filtering is only possible for 'exists/missing' and the value type for the column must be set to 'boolean'.
Exporting has full support for all properties. If no property is set the default is to export the name if the target item is nameable, otherwise the id.