primefaces: DataTable: clearFilters doesnt work for complex input widgets like p:selectOneMenu
Describe the defect
When using p:selectOneMenu
in DataTable
as custom filter, a call to DataTable#clearFilters()
resets the filter of the DataTable
but not the displayed value of the p:selectOneMenu
. It works as expected when using h:selectOneMenu
instead.
Reproducer See primefaces-test.zip.
Environment:
- PF Version: 11.0.0-RC2
- JSF + version: Mojarra 2.3.14.payara-p2
- Affected browsers: ALL
To Reproduce Steps to reproduce the behavior:
- Start the reproducer.
- Select ‘true’ in column c1
- Select ‘true’ in column c2
- Click the filter reset button.
- Filter for
DataTable
is reset, value of c1 filter is reset, but value of c2 filter is still ‘true’.
Expected behavior
Value of custom filter with p:selectOneMenu
should be reset too when calling DataTable#clearFilters()
.
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 27 (27 by maintainers)
Commits related to this issue
- #8071 — committed to primefaces/primefaces by tandraschko 3 years ago
- Fix #8071: SelectCheckBoxMenu resetValue — committed to melloware/primefaces by melloware 3 years ago
- #8071 for SelectManyCheckbox — committed to primefaces/primefaces by tandraschko 3 years ago
- #8071 better backward compatibility — committed to primefaces/primefaces by tandraschko 3 years ago
- Fix #8071: SelectCheckBoxMenu resetValue — committed to melloware/primefaces by melloware 3 years ago
- Fix #8071: SelectCheckBoxMenu resetValue — committed to melloware/primefaces by melloware 3 years ago
- Fix #8071: SelectCheckBoxMenu resetValue (#8108) — committed to primefaces/primefaces by melloware 3 years ago
we could also do something like:
and each input widget can add:
so even a user can use it to reset + trigger events
i would do it like:
Oh slick! Then we could check InstanceOf widget SelectOne and call its seletcValue or selectManyCheckbox like uncheckAll() wdget method etc!
in theory we can look for
.ui-widget
and checkPF.getWidgetById