Hi Camil,
I’m not sure why you are talking about “customer data loader customerDl”, but from the rest of your problem description I assume that you need to filter data in a CollectionPropertyContainer with OrderDetails that are loaded together with the Order.
In this case, you cannot filter by query indeed, because there is no filter for Details, they are loaded all for the particular Order.
You have to filter the collection in memory and set it to the container using its setDisconnectedItems()
method, as shown in the example in the end of the Property Containers section:
@Autowired
private CollectionPropertyContainer<Employee> employeesDc;
private void filterByPosition(Position position) {
List<Employee> filtered = getEditedEntity().getEmployee().stream()
.filter(employee -> employee.getPosition().equals(position))
.collect(Collectors.toList());
employeesDc.setDisconnectedItems(filtered);
}
private void resetFilter() {
employeesDc.setDisconnectedItems(getEditedEntity().getEmployee());
}
Regards,
Konstantin