Class TextFilteredPropertyColumn<T,F,S>
- java.lang.Object
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn<T,S>
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn<T,S>
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilteredPropertyColumn<T,S>
-
- org.apache.wicket.extensions.markup.html.repeater.data.table.filter.TextFilteredPropertyColumn<T,F,S>
-
- Type Parameters:
T
- The column's model object typeF
- Filter's model object typeS
- the type of the sort property
- All Implemented Interfaces:
Serializable
,ICellPopulator<T>
,IExportableColumn<T,S>
,IFilteredColumn<T,S>
,IColumn<T,S>
,IStyledColumn<T,S>
,IDetachable
,IClusterable
public class TextFilteredPropertyColumn<T,F,S> extends FilteredPropertyColumn<T,S>
A filtered property column that creates a textfield filter component. The default model of the created textfield is a property model with the same property expression as the one used to display data. This works well when the filter state object is of the same type as the objects in the data table.- Author:
- Igor Vaynberg (ivaynberg)
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description TextFilteredPropertyColumn(IModel<String> displayModel, String propertyExpression)
TextFilteredPropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Component
getFilter(String componentId, FilterForm<?> form)
Returns the component used by user to filter the column.protected IModel<F>
getFilterModel(FilterForm<?> form)
Returns the model that will be passed on to the text filter.-
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.PropertyColumn
getDataModel, getPropertyExpression, populateItem
-
Methods inherited from class org.apache.wicket.extensions.markup.html.repeater.data.table.AbstractColumn
detach, getCssClass, getDisplayModel, getHeader, getSortProperty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.grid.ICellPopulator
populateItem
-
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn
getHeader, getHeaderColspan, getHeaderRowspan, getSortProperty, isSortable
-
Methods inherited from interface org.apache.wicket.model.IDetachable
detach
-
Methods inherited from interface org.apache.wicket.extensions.markup.html.repeater.data.table.export.IExportableColumn
getDisplayModel
-
-
-
-
Constructor Detail
-
TextFilteredPropertyColumn
public TextFilteredPropertyColumn(IModel<String> displayModel, S sortProperty, String propertyExpression)
- Parameters:
displayModel
-sortProperty
-propertyExpression
-
-
TextFilteredPropertyColumn
public TextFilteredPropertyColumn(IModel<String> displayModel, String propertyExpression)
- Parameters:
displayModel
-propertyExpression
-
-
-
Method Detail
-
getFilter
public Component getFilter(String componentId, FilterForm<?> form)
Description copied from interface:IFilteredColumn
Returns the component used by user to filter the column. If null is returned, no filter will be added.- Parameters:
componentId
- component id for returned filter componentform
- FilterForm object for the toolbar. components can use this form's model to access properties of the state object (PropertyModel(form.getModel(), "property"
) or retrieve theIFilterStateLocator
object by usingFilterForm.getStateLocator()
- Returns:
- component that will be used to represent a filter for this column, or null if no such component is desired
- See Also:
IFilteredColumn.getFilter(java.lang.String, org.apache.wicket.extensions.markup.html.repeater.data.table.filter.FilterForm)
-
getFilterModel
protected IModel<F> getFilterModel(FilterForm<?> form)
Returns the model that will be passed on to the text filter. Users can override this method to change the model.- Parameters:
form
- filter form- Returns:
- model passed on to the text filter
-
-