Pagination / SimplePagination does not work with additional data store

Hi there,

I hope you all doing great!

I couldn’t manage to have a working pagination with my additional data store (DynamoDB).

I’m populating the table;

@Autowired
CollectionContainer<Customer> customerDc;    

@Subscribe
public void onBeforeShow(BeforeShowEvent event) {

    Collection<Customer> customers = customerService.findAll();

    customerDc.setItems(customers);
}

And in the UI xml;

        <pagination>
             <containerProvider dataContainer="customerDc"/>
       </pagination>

It loads all records from the table. Pagination can do the correct dividing of the total result count but the table always show all 1K+ records, even when the next-prev buttons are clicked.

I’m also sharing complete *-browse.xml .
customer-browse.xml (2.1 KB)

Could you please help me about this?

Many thanks in advance!

Have a great weekend!
Emre Nuri

Hello!

Could you clarify how do you populate the data container?

1 Like

Hi Roman @pinyazhin,

When you ask that I realized that I need to use PageChangeEvent and populated the container with the LoadContext.

Thank you and have a great weekend!

1 Like