Skip to content

Commit

Permalink
fix for type definition of report variable from search of preview table
Browse files Browse the repository at this point in the history
  • Loading branch information
skublik committed Feb 1, 2022
1 parent eaed679 commit 1f26d99
Showing 1 changed file with 7 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -507,8 +507,13 @@ public VariablesMap getFilterVariables(VariablesMap defaultVariables, PageBase p
for (FilterSearchItem item : getFilterItems()) {
SearchFilterParameterType functionParameter = item.getPredefinedFilter().getParameter();
if (functionParameter != null && functionParameter.getType() != null) {
Class<?> inputClass = pageBase.getPrismContext().getSchemaRegistry().determineClassForType(functionParameter.getType());
TypedValue value = new TypedValue(item.getInput() != null ? item.getInput().getValue() : null, inputClass);
TypedValue value;
if (item.getInput() == null || item.getInput().getValue() == null) {
Class<?> inputClass = pageBase.getPrismContext().getSchemaRegistry().determineClassForType(functionParameter.getType());
value = new TypedValue(null, inputClass);
} else {
value = new TypedValue(item.getInput().getValue(), item.getInput().getValue().getClass());
}
variables.put(functionParameter.getName(), value);
}
}
Expand Down

0 comments on commit 1f26d99

Please sign in to comment.