Hi,
Just adding more details to my question. I realize that the pagination is not numbered and the navigation is not triggering the loader. I am also having this error below
> Pagination component receives loader’s first result (0) that is out of last page range. Component may work incorrectly
Let me share the controller code behind if it will help:
> @Install(to = "businessPartnersDl", target = Target.DATA_LOADER)
> private List<BusinessPartner> itemsDlLoadDelegate(LoadContext<BusinessPartner> loadContext) {
> //int firstResult = loadContext.getQuery().getFirstResult();
> //int maxResult = loadContext.getQuery().getMaxResults();
> return dataManager.loadList(loadContext);
> }
>
> @Install(to = "pagination", subject = "totalCountDelegate")
> private Integer paginationTotalCountDelegate() {
> //return dataManager.load(BusinessPartner.class).all().list().size();
> var s = businessPartnersDl.createLoadContext();
> return (int)dataManager.getCount(s);
> }
The custom datastore manages the DataManager which in turn calls my restful services
> @Override
> public List<Object> loadList(LoadContext<?> context) {
> return new ArrayList<>(businessPartnerService.loadCustomers(context));
> }
>
> @Override
> public long getCount(LoadContext<?> context) {
> return context.getQuery().getMaxResults()-context.getQuery().getFirstResult();
> }
Hope this helps to paint the picture clearer.
Thanks in advance