I have a complicate JSF that contain dataTable with filter in each one of the columns. In order to make sure that the generate button will fetch all the data first I need to cle
To clear all the inputs of the filters you can do it by javascript:
vtWidget
is the widgetVar of the datatable.
Basically clearFilters()
will clear the fields for you and call filter()
, and the filter function would update your datatable, which in turns will empty the filtered list.
Note: This would work only if the filters were inputText
. If you have custom components then you should implement your own clear based on the components that you have.
Sometimes if you have custom components, you need to empty the filtered list manually, as you did in the comments!