Class ChoiceFilteredPropertyColumn<T,​Y,​S>

  • Type Parameters:
    T - The model object type
    Y - The column model object type
    S - the type of the sort property
    All Implemented Interfaces:
    Serializable, ICellPopulator<T>, IExportableColumn<T,​S>, IFilteredColumn<T,​S>, IColumn<T,​S>, IStyledColumn<T,​S>, org.apache.wicket.model.IDetachable, org.apache.wicket.util.io.IClusterable

    public class ChoiceFilteredPropertyColumn<T,​Y,​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 Detail

      • ChoiceFilteredPropertyColumn

        public ChoiceFilteredPropertyColumn​(org.apache.wicket.model.IModel<String> displayModel,
                                            S sortProperty,
                                            String propertyExpression,
                                            org.apache.wicket.model.IModel<? extends List<? extends Y>> filterChoices)
        Parameters:
        displayModel -
        sortProperty -
        propertyExpression -
        filterChoices - collection choices used in the choice filter
      • ChoiceFilteredPropertyColumn

        public ChoiceFilteredPropertyColumn​(org.apache.wicket.model.IModel<String> displayModel,
                                            String propertyExpression,
                                            org.apache.wicket.model.IModel<? extends List<? extends Y>> filterChoices)
        Parameters:
        displayModel -
        propertyExpression -
        filterChoices - collection of choices used in the choice filter
    • Method Detail

      • detach

        public void detach()
        Specified by:
        detach in interface org.apache.wicket.model.IDetachable
        Overrides:
        detach in class AbstractColumn<T,​S>
        See Also:
        IDetachable.detach()
      • getFilterModel

        protected org.apache.wicket.model.IModel<YgetFilterModel​(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
      • enableAutoSubmit

        protected boolean enableAutoSubmit()
        Returns true if the constructed choice filter should autosubmit the form when its value is changed.
        Returns:
        true to make choice filter autosubmit, false otherwise
      • getChoiceRenderer

        protected org.apache.wicket.markup.html.form.IChoiceRenderer<YgetChoiceRenderer()
        Returns choice renderer that will be used to create the choice filter
        Returns:
        choice renderer that will be used to create the choice filter
      • getFilterChoices

        protected final org.apache.wicket.model.IModel<? extends List<? extends Y>> getFilterChoices()
        Returns:
        filter choices model