Skip to content

Commit

Permalink
hopefully fixing MID-8142 and not breaking anything else :)
Browse files Browse the repository at this point in the history
  • Loading branch information
katkav committed Oct 12, 2022
1 parent f8708de commit a654e55
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,10 @@ public ObjectFilter createFilter(Class type, PageBase pageBase, VariablesMap var
}
Boolean value = selectedValue.getValue();
if (BooleanUtils.isTrue(value)) {
return null; // let the default behavior to take their chance
return PrismContext.get().queryFor(ShadowType.class)
.item(ShadowType.F_DEAD)
.eq(true)
.buildFilter();
}

return PrismContext.get().queryFor(ShadowType.class)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,17 @@ private static <C extends Containerable> PropertySearchItemWrapper createPropert
itemWrapper.setName(WebComponentUtil.getItemDefinitionDisplayNameOrName(itemDef, null));
return itemWrapper;
}
if (path != null) {
if (ShadowType.F_OBJECT_CLASS.equivalent(path)) {
return new ObjectClassSearchItemWrapper();
} else if (ShadowType.F_DEAD.equivalent(path)) {
DeadShadowSearchItemWrapper deadWrapper = new DeadShadowSearchItemWrapper(Arrays.asList(new SearchValue<>(true), new SearchValue<>(false)));
deadWrapper.setValue(new SearchValue(false));
return deadWrapper;
} else {
return new TextSearchItemWrapper(path, itemDef);
}
}
if (valueTypeName != null) {
if (DOMUtil.XSD_BOOLEAN.equals(valueTypeName)) {
List<DisplayableValue<Boolean>> list = new ArrayList<>();
Expand All @@ -604,15 +615,7 @@ private static <C extends Containerable> PropertySearchItemWrapper createPropert
itemDef.getValueEnumerationRef().getOid(),
itemDef.getValueEnumerationRef().getTargetType());
}
if (path != null) {
if (ShadowType.F_OBJECT_CLASS.equivalent(path)) {
return new ObjectClassSearchItemWrapper();
} else if (ShadowType.F_DEAD.equivalent(path)) {
return new DeadShadowSearchItemWrapper(Arrays.asList(new SearchValue<>(true), new SearchValue<>(false)));
} else {
return new TextSearchItemWrapper(path, itemDef);
}
}

return new TextSearchItemWrapper();
}

Expand Down

0 comments on commit a654e55

Please sign in to comment.