Pagination support in composition

Hi Cuba Team
In platform V7x, is pagination supported in composition table/grid?

Do you mean a table displaying the collection attribute of an edited entity?
If so, paging is not supported for such case, because the nested collection is fully loaded anyway together with the edited entity instance.

Hi Konstantin
Ok, understood.
Can we use filter for the contents of the table displaying collection attribute?

No, by the same reason: built-in filtering and paging works on the database level. But you can implement custom filtering, see an example from the docs:

@Inject
private CollectionPropertyContainer<OrderLine> orderLinesDc;

private void filterByProduct(String product) {
    orderLinesDc.getDisconnectedItems().removeIf(
            orderLine -> !orderLine.getProduct().equals(product));
}

private void resetFilter() {
    orderLinesDc.setDisconnectedItems(getEditedEntity().getOrderLines());
}
1 Like

Thank you so much. This is working just like what I wanted :slight_smile: