Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NPE at AdvancedPaginationPlugin #944

Closed
schube opened this issue Jun 19, 2024 · 0 comments
Closed

NPE at AdvancedPaginationPlugin #944

schube opened this issue Jun 19, 2024 · 0 comments
Assignees
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Milestone

Comments

@schube
Copy link
Contributor

schube commented Jun 19, 2024

Describe the bug
Using AdvancedPaginationPlugin the method updatePages throws a NPE.

My code goes like this:

				getController().getTeilnehmer(requestParams,
						modelResponse -> {
							setItems(modelResponse.getModels());

							// This throws a NPE
							getPagination().updatePages(20);

							// This is what I would use, it also throws a NPE
							getPagination().updatePagesByTotalCount(
									modelResponse.getFoundCount(),
									selAnzahlTeilnehmerProSeite.getValue()); //Number of items per page
							table.show();
						});

So it fetches the models from the server, then it updates the Pagination. It works with other plugins like ScrollingPaginationPlugin
It works on the first call, but on the next call it throws an NPE. I have to update the total number of pages, since it depends on the number of models the server sends back according to some search terms.

Error in Chrome:

TypeError: Cannot read properties of null (reading 'intValue_1_g$')
    at aEgb_g$.kEgb_g$ [as lambda$12_8_g$] (AdvancedPagination.java:136:1)
    at YEgb_g$.ZEgb_g$ [as onValueChanged_0_g$] (AdvancedPagination.java:136:1)
    at Jhi_g$ (AbstractSelect.java:637:1)
    at Tli_g$.Uli_g$ [as accept_1_g$] (AbstractSelect.java:637:1)
    at C$d_g$ (Iterable.java:39:1)
    at Eze_g$.REb_g$ [as forEach_0_g$] (Iterable.java:36:1)
    at Wpi_g$.Oii_g$ [as triggerChangeListeners_2_g$] (AbstractSelect.java:636:1)
    at Wpi_g$.vgi_g$ [as clearValue_0_g$] (AbstractSelect.java:279:1)
    at Wpi_g$.ugi_g$ [as clear_11_g$] (AbstractSelect.java:613:1)
    at Wpi_g$.sgi_g$ [as clear_10_g$] (AbstractSelect.java:602:1)
    at Wpi_g$.kii_g$ [as lambda$61_0_g$] (AbstractSelect.java:1214:1)
    at Xoi_g$.Yoi_g$ [as accept_1_g$] (AbstractSelect.java:1210:1)
    at YCe_g$.dDe_g$ [as ifPresent_0_g$] (Optional.java:67:1)
    at Wpi_g$.tii_g$ [as removeOption_0_g$] (AbstractSelect.java:1208:1)
    at Wpi_g$.lii_g$ [as lambda$64_0_g$] (AbstractSelect.java:1264:1)
    at api_g$.bpi_g$ [as accept_1_g$] (AbstractSelect.java:1263:1)
    at yje_g$.Hje_g$ [as forEach_0_g$] (ArrayList.java:175:1)
    at Wpi_g$.sii_g$ [as removeAllOptions_0_g$] (AbstractSelect.java:1261:1)
    at aEgb_g$.BEgb_g$ [as updatePages_8_g$] (AdvancedPagination.java:178:1)
    at aEgb_g$.DEgb_g$ [as updatePages_9_g$] (AdvancedPagination.java:160:1)
    at aEgb_g$.EEgb_g$ [as updatePages_5_g$] (AdvancedPagination.java:159:1)
    at aEgb_g$.o0l_g$ [as updatePages_0_g$] (BasePagination.java:191:1)
    at aEgb_g$.p0l_g$ [as updatePages_1_g$] (BasePagination.java:190:1)
    at htc_g$.itc_g$ [as lambda$0_4_g$] (StarterlisteView.java:328:1)

Additional context
DominoUI 2 HEAD-SNAPSHOT as of today

@vegegoku vegegoku self-assigned this Jun 25, 2024
@vegegoku vegegoku added bug Something isn't working version 2.x.x Version 2.x.x issues labels Jun 25, 2024
@vegegoku vegegoku added this to the 2.0.2 milestone Jun 25, 2024
vegegoku added a commit that referenced this issue Jul 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working version 2.x.x Version 2.x.x issues
Projects
Status: Done
Development

No branches or pull requests

2 participants