PrimeFaces 3.5迁7.0后DataTable过滤警告消失问题咨询
Great question — this boils down to PrimeFaces updating its internal filtering behavior between versions 3.5 and 7.0, rendering that old warning obsolete. Here's the breakdown:
The deprecated viewstate fallback was removed
Back in PrimeFaces 3.5, when you enabled filtering on aDataTablebut didn’t define afilteredValuemodel reference, the framework had to fall back to storing filtered results in the view state. This was a clunky, deprecated approach, hence the warning pushing you to use a properfilteredValueproperty. But between 3.5 and 7.0, PrimeFaces completely rewrote this logic: now, if you don’t explicitly setfilteredValue, the framework automatically manages the filtered dataset internally using a more efficient, non-viewstate-based method. Since that old deprecated fallback is no longer in use, the warning was removed entirely.The warning was tied specifically to the outdated workaround
That warning wasn’t a permanent mandate to addfilteredValue— it was a heads-up that you were relying on a feature marked for removal. Once PrimeFaces replaced that workaround with a supported default behavior, there was no reason to keep alerting developers. Even without adding afilteredValuereference, your app is now using a supported filtering mechanism, so the warning no longer applies.Migration guides often skip small behavioral tweaks
The official migration guide focuses on breaking changes, new features, and critical fixes you need to address to upgrade. Smaller changes like removing a warning (because the underlying issue was resolved) often don’t get explicit coverage, especially when the change happened incrementally across multiple versions between 3.5 and 7.0. For context, this filtering logic overhaul happened around PrimeFaces 5.x, which is when the viewstate fallback was replaced with the current default handling.
内容的提问来源于stack exchange,提问作者BugsForBreakfast

