Class PropertyPathActionFactory<I,V>
java.lang.Object
net.sf.basedb.clients.web.extensions.AbstractJspFactory
net.sf.basedb.clients.web.extensions.AbstractJspActionFactory<ListColumnAction<I,V>>
net.sf.basedb.clients.web.extensions.list.PropertyPathActionFactory<I,V>
- All Implemented Interfaces:
DynamicActionAttributes
,ActionFactory<ListColumnAction<I,
V>>
A factory implementation that generates list columns based on a property path
as used by the
Metadata
class. Most properties of the
ListColumnAction
can be configured by calling setter method for this
factory. The ListColumnAction.getProperty()
is used as the property
path in Metadata.getPropertyPath(String, boolean)
. By default, the
sample property is used for sorting, filtering and exporting, which are
enabled by default.
A formatter class can be specified by setFormatterClass(String)
if the given
class has a public, no-argument constructor. Otherwise a suitable formatter is
selected by calling FormatterFactory.getTypeFormatter(SessionControl, Type)
with the type taken from ListColumnAction.getValueType()
.
More advanced usage or formatting requirements need a custom factory implementation.
- Since:
- 3.2
- Author:
- Nicklas
-
Nested Class Summary
Modifier and TypeClassDescription(package private) static class
A concrete implementation of the ListColumnAction interface. -
Field Summary
Modifier and TypeFieldDescriptionprivate String
private String
private String
private boolean
private boolean
private String
private String
private boolean
private String
private String
private String
private String
private boolean
private String
private String
private String
private String
private String
private Type
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionListColumnAction<I,
V>[] getActions
(InvokationContext<? super ListColumnAction<I, V>> context) This method may be called one or several times for each request.getFormatter
(InvokationContext context, String className) Create a formatter instance that should be used for the online table.void
setCellClass
(String cellClass) void
setCellStyle
(String cellStyle) void
void
setDisableOverflowCheck
(boolean disableOverflowCheck) void
setExportable
(String exportable) void
setExportFormatterClass
(String formatterClass) void
setExportProperty
(String exportProperty) void
setFilterable
(String filterable) void
setFilterProperty
(String filterProperty) void
setFormatterClass
(String formatterClass) void
void
setProperty
(String property) void
setSortable
(String sortable) void
setSortProperty
(String sortProperty) void
void
setSubtitle
(String subtitle) void
void
setTooltip
(String tooltip) void
setValueType
(String valueType) Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspActionFactory
prepareContext
Methods inherited from class net.sf.basedb.clients.web.extensions.AbstractJspFactory
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
-
Field Details
-
id
-
clazz
-
style
-
title
-
subtitle
-
cellClass
-
cellStyle
-
disableOverflowCheck
private boolean disableOverflowCheck -
tooltip
-
property
-
valueType
-
sortable
private boolean sortable -
sortProperty
-
filterable
private boolean filterable -
filterProperty
-
exportable
private boolean exportable -
exportProperty
-
formatterClass
-
exportFormatterClass
-
-
Constructor Details
-
PropertyPathActionFactory
public PropertyPathActionFactory()
-
-
Method Details
-
getActions
Description copied from interface:ActionFactory
This method may be called one or several times for each request. This is decided by the extension point. If, for example, the extension point is a pure single-item extension point then this method is probably only called once. If the extension point is a per-item extension point in a list context, then this method may be called once for every item in the list. The context parameter contains all information about the context of the extension point, including the current item, if any.- Parameters:
context
- The current invokation context- Returns:
- An array of actions that should be added to the extension point. Returns null or an empty array if there are no actions in the current context.
-
setId
-
setClazz
-
setStyle
-
setTitle
-
setSubtitle
- Since:
- 3.18
-
setCellClass
- Since:
- 3.18
-
setCellStyle
- Since:
- 3.18
-
setDisableOverflowCheck
public void setDisableOverflowCheck(boolean disableOverflowCheck) - Since:
- 3.18
-
setTooltip
-
setProperty
-
setValueType
-
setSortable
-
setSortProperty
-
setFilterable
-
setFilterProperty
-
setExportable
-
setExportProperty
-
setFormatterClass
-
setExportFormatterClass
-
getFormatter
Create a formatter instance that should be used for the online table. If a className is specified try to load an instance of that class, otherwise useFormatterFactory.getTypeFormatter(SessionControl, Type)
with the value type fromsetValueType(String)
.
-