Class AnyLinkColumn
java.lang.Object
net.sf.basedb.clients.web.extensions.list.AbstractListColumnBean<BasicItem,Object>
net.sf.basedb.clients.web.extensions.list.AnyLinkColumn
- All Implemented Interfaces:
ListColumnAction<BasicItem,Object>
,Action
public class AnyLinkColumn extends AbstractListColumnBean<BasicItem,Object>
A column action implementation that finds an item linked with
a any-to-any link.
- Since:
- 3.17
- Author:
- nicklas
-
Field Summary
Fields Modifier and Type Field Description private FileViewerUtil
fileViewer
private int
index
private String
linkName
private Metadata.PropertyPath<BasicItem,?>
property
private Item
targetType
-
Constructor Summary
Constructors Constructor Description AnyLinkColumn(int index, String id, String linkName, Item targetType, Metadata.PropertyPath<BasicItem,?> property, FileViewerUtil fileViewer)
-
Method Summary
Modifier and Type Method Description static AnyLinkColumn
create(DbControl dc, int index, Item sourceType, String expr, FileViewerUtil fileViewer)
For now, we assume that 'expr' is |linkName|ITEMTYPE|property ITEMTYPE and property are optional.Object
getValue(DbControl dc, BasicItem item)
Get the value that should be displayed in the column.Methods inherited from class net.sf.basedb.clients.web.extensions.list.AbstractListColumnBean
getCellClass, getCellStyle, getClazz, getCollectionFormatter, getDisableOverflowCheck, getEnumeration, getExportFormatter, getExportProperty, getExportValue, getFilterProperty, getFormatter, getId, getProperty, getSortProperty, getStyle, getSubtitle, getTitle, getTooltip, getValueType, isExportable, isFilterable, isSortable, setCellClass, setCellStyle, setClazz, setCollectionFormatter, setDisableOverflowCheck, setEnumeration, setExportable, setExportFormatter, setExportProperty, setFilterable, setFilterProperty, setFormatter, setId, setProperty, setSortable, setSortProperty, setStyle, setSubtitle, setTitle, setTooltip, setValueType
-
Field Details
-
index
private final int index -
linkName
-
targetType
-
property
-
fileViewer
-
-
Constructor Details
-
AnyLinkColumn
AnyLinkColumn(int index, String id, String linkName, Item targetType, Metadata.PropertyPath<BasicItem,?> property, FileViewerUtil fileViewer)
-
-
Method Details
-
create
public static AnyLinkColumn create(DbControl dc, int index, Item sourceType, String expr, FileViewerUtil fileViewer)For now, we assume that 'expr' is |linkName|ITEMTYPE|property ITEMTYPE and property are optional. -
getValue
Description copied from interface:ListColumnAction
Get the value that should be displayed in the column. This method is called once for every item that is listed in the table. The returned value is then passed to the formatter (if any) that is retrieved fromListColumnAction.getFormatter()
.- Parameters:
dc
- An open DbControl than can be used to query the databaseitem
- The current item- Returns:
- The value that should be displayed
-