T - the type of items in the grid.F - the type of the filterpublic class FilterBinder<T,F>
Maintains a set of fields - monitors bound fields for values and provides FilterBinder.getFilter of type F.
Fires FilterBinder.getOnFilterChangeListeners on every filter change.
| Constructor and Description |
|---|
FilterBinder(FilterFieldFactory<T,F> filterFieldFactory,
eu.vaadinonkotlin.FilterFactory<F> filterFactory)
Maintains a set of fields - monitors bound fields for values and provides
FilterBinder.getFilter of type F.
Fires FilterBinder.getOnFilterChangeListeners on every filter change. |
| Modifier and Type | Method and Description |
|---|---|
<V> void |
bind(com.vaadin.data.HasValue<V> field,
com.vaadin.data.PropertyDefinition<T,V> property)
Binds given filtering field to a container - starts filtering based on the contents of the field, and starts watching for field value changes.
Does not add the component to the headerRow.
|
F |
getFilter()
The current filter as generated by filterFieldFactory from the most current states of all bound filter fields.
Updated on every filter field change.
|
eu.vaadinonkotlin.FilterFactory<F> |
getFilterFactory() |
FilterFieldFactory<T,F> |
getFilterFieldFactory()
used to create filters from filter components by invoking
|
eu.vaadinonkotlin.Listeners<com.vaadin.server.SerializableConsumer> |
getOnFilterChangeListeners()
Invoked when the filter changes.
|
void |
unbind(com.vaadin.data.HasValue<?> field) |
void |
unbindAll() |
public FilterBinder(FilterFieldFactory<T,F> filterFieldFactory, eu.vaadinonkotlin.FilterFactory<F> filterFactory)
Maintains a set of fields - monitors bound fields for values and provides FilterBinder.getFilter of type F.
Fires FilterBinder.getOnFilterChangeListeners on every filter change.
filterFieldFactory - used to create filters from filter components by invoking FilterFieldFactory.createFilterfilterFieldFactory - used to create filters from filter components by invoking FilterFieldFactory.createFilterFilterBinder.getFilter,
FilterBinder.getOnFilterChangeListenerspublic F getFilter()
The current filter as generated by filterFieldFactory from the most current states of all bound filter fields. Updated on every filter field change.
public eu.vaadinonkotlin.Listeners<com.vaadin.server.SerializableConsumer> getOnFilterChangeListeners()
Invoked when the filter changes.
public <V> void bind(com.vaadin.data.HasValue<V> field,
com.vaadin.data.PropertyDefinition<T,V> property)
Binds given filtering field to a container - starts filtering based on the contents of the field, and starts watching for field value changes. Does not add the component to the headerRow.
field - The field which provides the filtering values, not null. FilterFieldFactory.createFilter is used to convert
the field's value to a filter.property - The bean property on which the filtering will be performed, not null.public void unbind(com.vaadin.data.HasValue<?> field)
public void unbindAll()
public FilterFieldFactory<T,F> getFilterFieldFactory()
used to create filters from filter components by invoking
FilterFieldFactory.createFilterpublic eu.vaadinonkotlin.FilterFactory<F> getFilterFactory()