Skip to content

Commit

Permalink
Fix #39
Browse files Browse the repository at this point in the history
  • Loading branch information
BalusC committed Sep 5, 2024
1 parent 3cc9f3c commit 0611c02
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ protected LinkedHashMap<String, Object> processFilters(FacesContext context, Dat

for (UIColumn column : processableColumns) {
var field = column.getField();
Object value = getFilterValue(filterBy, field);
var value = getFilterValue(filterBy, field);

if (isEmpty(value)) {
value = getTrimmedQueryParameters(context, getFilterParameterName(context, table, field));
Expand All @@ -313,7 +313,7 @@ protected List<E> processSelectionIfNecessary(FacesContext context, List<E> curr
}

protected String processGlobalFilter(FacesContext context, DataTable table, Map<String, FilterMeta> filterBy) {
var globalFilter = getFilterValue(filterBy, GLOBAL_FILTER);
var globalFilter = (String) getFilterValue(filterBy, GLOBAL_FILTER);

if (globalFilter != null) {
globalFilter = globalFilter.trim();
Expand All @@ -326,9 +326,9 @@ protected String processGlobalFilter(FacesContext context, DataTable table, Map<
return isEmpty(globalFilter) ? null : globalFilter;
}

private static String getFilterValue(Map<String, FilterMeta> filterBy, String field) {
private static Object getFilterValue(Map<String, FilterMeta> filterBy, String field) {
var filterMeta = filterBy.get(field);
return filterMeta == null ? null : (String) filterMeta.getFilterValue();
return filterMeta == null ? null : filterMeta.getFilterValue();
}

private String getFilterParameterName(FacesContext context, DataTable table, String field) {
Expand Down

0 comments on commit 0611c02

Please sign in to comment.