public class PropertyPathActionFactory<I,V> extends AbstractJspActionFactory<ListColumnAction<I,V>>
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.
Modifier and Type | Class and Description |
---|---|
(package private) static class |
PropertyPathActionFactory.PropertyPathAction<I,V>
A concrete implementation of the ListColumnAction
interface.
|
Modifier and Type | Field and Description |
---|---|
private String |
clazz |
private boolean |
exportable |
private String |
exportFormatterClass |
private String |
exportProperty |
private boolean |
filterable |
private String |
filterProperty |
private String |
formatterClass |
private String |
id |
private String |
property |
private boolean |
sortable |
private String |
sortProperty |
private String |
style |
private String |
title |
private String |
tooltip |
private Type |
valueType |
Constructor and Description |
---|
PropertyPathActionFactory() |
Modifier and Type | Method and Description |
---|---|
ListColumnAction<I,V>[] |
getActions(InvokationContext<? super ListColumnAction<I,V>> context)
This method may be called one or several times for each request.
|
protected Formatter<V> |
getFormatter(InvokationContext context,
String className)
Create a formatter instance that should be used for the online table.
|
void |
setClazz(String clazz) |
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 |
setId(String id) |
void |
setProperty(String property) |
void |
setSortable(String sortable) |
void |
setSortProperty(String sortProperty) |
void |
setStyle(String style) |
void |
setTitle(String title) |
void |
setTooltip(String tooltip) |
void |
setValueType(String valueType) |
prepareContext
getDynamicActionAttributes, getParameter, getScripts, getStylesheets, prepareContext, setParameter, setScript, setStylesheet
private String id
private String clazz
private String style
private String title
private String tooltip
private String property
private Type valueType
private boolean sortable
private String sortProperty
private boolean filterable
private String filterProperty
private boolean exportable
private String exportProperty
private String formatterClass
private String exportFormatterClass
public ListColumnAction<I,V>[] getActions(InvokationContext<? super ListColumnAction<I,V>> context)
ActionFactory
context
- The current invokation contextpublic void setId(String id)
public void setClazz(String clazz)
public void setStyle(String style)
public void setTitle(String title)
public void setTooltip(String tooltip)
public void setProperty(String property)
public void setValueType(String valueType)
public void setSortable(String sortable)
public void setSortProperty(String sortProperty)
public void setFilterable(String filterable)
public void setFilterProperty(String filterProperty)
public void setExportable(String exportable)
public void setExportProperty(String exportProperty)
public void setFormatterClass(String formatterClass)
public void setExportFormatterClass(String formatterClass)
protected Formatter<V> getFormatter(InvokationContext context, String className)
FormatterFactory.getTypeFormatter(SessionControl, Type)
with the value type from setValueType(String)
.