Class PropertyPathActionFactory.PropertyPathAction<I,V>
- java.lang.Object
-
- net.sf.basedb.clients.web.extensions.list.AbstractListColumnBean<I,V>
-
- net.sf.basedb.clients.web.extensions.list.PropertyPathActionFactory.PropertyPathAction<I,V>
-
- All Implemented Interfaces:
ListColumnAction<I,V>
,Action
- Enclosing class:
- PropertyPathActionFactory<I,V>
static class PropertyPathActionFactory.PropertyPathAction<I,V> extends AbstractListColumnBean<I,V>
A concrete implementation of the ListColumnAction interface. We subclass theAbstractListColumnBean
and then use theMetadata.PropertyPath
in thegetValue(DbControl, Object)
andgetExportValue(DbControl, Object)
methods.
-
-
Field Summary
Fields Modifier and Type Field Description private Metadata.PropertyPath<I,?>
exportPath
private Metadata.PropertyPath<I,V>
path
-
Constructor Summary
Constructors Constructor Description PropertyPathAction(Metadata.PropertyPath<I,V> path, Metadata.PropertyPath<I,?> exportPath)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
getExportValue(DbControl dc, I item)
This implementation simply forward toListColumnAction.getValue(DbControl, Object)
.V
getValue(DbControl dc, I item)
Get the value that should be displayed in the column.-
Methods inherited from class net.sf.basedb.clients.web.extensions.list.AbstractListColumnBean
getClazz, getEnumeration, getExportFormatter, getExportProperty, getFilterProperty, getFormatter, getId, getProperty, getSortProperty, getStyle, getTitle, getTooltip, getValueType, isExportable, isFilterable, isSortable, setClazz, setEnumeration, setExportable, setExportFormatter, setExportProperty, setFilterable, setFilterProperty, setFormatter, setId, setProperty, setSortable, setSortProperty, setStyle, setTitle, setTooltip, setValueType
-
-
-
-
Field Detail
-
path
private final Metadata.PropertyPath<I,V> path
-
exportPath
private final Metadata.PropertyPath<I,?> exportPath
-
-
Constructor Detail
-
PropertyPathAction
PropertyPathAction(Metadata.PropertyPath<I,V> path, Metadata.PropertyPath<I,?> exportPath)
-
-
Method Detail
-
getValue
public V getValue(DbControl dc, I item)
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
-
getExportValue
public Object getExportValue(DbControl dc, I item)
Description copied from class:AbstractListColumnBean
This implementation simply forward toListColumnAction.getValue(DbControl, Object)
. If the exported value should be different from the regular value the subclass must override this method as well.- Specified by:
getExportValue
in interfaceListColumnAction<I,V>
- Overrides:
getExportValue
in classAbstractListColumnBean<I,V>
- Parameters:
dc
- An open DbControl than can be used to query the databaseitem
- The current item- Returns:
- The value that should be exported
-
-