}
protected void setDecodedCriterion(ExpressionFilter filter, ExpressionFilterCriterion newCriterion) {
if (!filter.changeCriterion(newCriterion))
return;
FilterableComponent filteredComponent = filter.getFilteredComponent();
if (filteredComponent == null) {
FacesContext facesContext = FacesContext.getCurrentInstance();
String filterId = filter.getClientId(facesContext);
throw new FacesException("A filter is not associated with a component (DataTable or TreeTable): " +
filterId + ". It should either be placed into some table facet, or its \"for\" attribute should " +
"be used to explicitly attach this filter to a filtered component.");
}
TableUtil.markFilteringToggledInThisRequest(FacesContext.getCurrentInstance());
filteredComponent.filterChanged(filter);
}