001/* 002 * Licensed to the Apache Software Foundation (ASF) under one or more 003 * contributor license agreements. See the NOTICE file distributed with 004 * this work for additional information regarding copyright ownership. 005 * The ASF licenses this file to You under the Apache License, Version 2.0 006 * (the "License"); you may not use this file except in compliance with 007 * the License. You may obtain a copy of the License at 008 * 009 * http://www.apache.org/licenses/LICENSE-2.0 010 * 011 * Unless required by applicable law or agreed to in writing, software 012 * distributed under the License is distributed on an "AS IS" BASIS, 013 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 014 * See the License for the specific language governing permissions and 015 * limitations under the License. 016 */ 017package org.apache.wicket.extensions.markup.html.repeater.data.table.filter; 018 019import org.apache.wicket.Component; 020import org.apache.wicket.extensions.markup.html.repeater.data.table.IColumn; 021 022 023/** 024 * Represents a data table column that can be filtered. The filter is represented by a component 025 * returned from the getFilter() method. 026 * 027 * @see IColumn 028 * 029 * @author Igor Vaynberg (ivaynberg) 030 * @param <T> 031 * @param <S> 032 * the type of the sorting parameter 033 * 034 */ 035public interface IFilteredColumn<T, S> extends IColumn<T, S> 036{ 037 /** 038 * Returns the component used by user to filter the column. If null is returned, no filter will 039 * be added. 040 * 041 * @param componentId 042 * component id for returned filter component 043 * @param form 044 * FilterForm object for the toolbar. components can use this form's model to access 045 * properties of the state object ( 046 * <code>PropertyModel(form.getModel(), "property"</code>) or retrieve the 047 * {@link IFilterStateLocator} object by using {@link FilterForm#getStateLocator()} 048 * @return component that will be used to represent a filter for this column, or null if no such 049 * component is desired 050 */ 051 Component getFilter(String componentId, FilterForm<?> form); 052 053}