sorry for my previous post.. what i've previously done is:

- add a filtertoolbar to your datatable
- make some of your columns IFilteredColumn, for example I've used TextFilteredPropertyColumn but there are also others
- make your dataprovider implement IFilterStateLocator
- implement the filtering logic by checking the current state of the filter in your iterator method
- no need to change html

I'm not sure if that's the best way to do it, but it may help you get started..



Serkan Camurcuoglu wrote:
you can try FilterToolbar


Julien Graglia wrote:
Hi,

I try to filter rows of a datatable : I already have sort the rows very
easily (using a SortableDataProvider) but now I need to filter some
columns.. which seems to me a rather "classic" task.

 I have found classes in
org.apache.wicket.extensions.markup.html.repeater.data.table.filter like
ChoiceFilter and IFilterStateLocator but I did not find any examples. It
seems to me that is what I need but I dont figure out how to use it

I only found a post with a very short code like : final DefaultDataTable table = new DefaultDataTable("datatable",
        columns, provider, 30);
        final FilterForm form = new FilterForm("filter-form", provider);
        table.addTopToolbar(new FilterToolbar(table, form, provider));
        form.add(table);
        form.add(new GoAndClearFilter("filter-buttons", form));
        add(form);

but I dont know what html comes with that and how to implements the
filter.

I have google that the "phonebook" application is using filter but I
can't get it.
I have to say that I dont know how to start with only the javadoc (how
to write html? simple example?)

I you have a piece of code of how to use filter and
IFilterStateLocator...

thx,



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]




---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to