1

I'd really like some kind of filter I can use on my AjaxFallbackDefaultDataTable. It seems that I may be able to implement that with a ChoiceFilteredPropertyColumn, however I cannot seem to find any examples on how to use it, or just demos of what it does.

Can someone point me to, or show me how to implement a ChoiceFilteredPropertyColumn?

Kane
  • 53
  • 4

1 Answers1

1

What do you want to achieve. Using ChoicefilteredPropertyColumn is actuall as easy as :

columns.add( new ChoiceFilteredPropertyColumn<Publication, Boolean>( new ResourceModel( "active.f" ),
                            "active", "active", Model.ofList( Arrays.asList(    Boolean.TRUE,
                                                                                Boolean.FALSE ) ) )
lgawron
  • 522
  • 4
  • 8
  • Will I need to add markup, so the SelectOptions for filtering are shown or is this added automatically ? – chris polzer Oct 19 '11 at 14:17
  • There is no need for SelectOptions as the filter is being rendered as DropDownChoice (not Select). Please mind that if you would like a tri-state drop down (nothing, true, false) you need to subclass the ChoiceFilteredPropertyColumn class and perform setNullValid(true) on drop down component. – lgawron Oct 20 '11 at 19:28