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

Paginator: PageEvent add rowsPerPage property #11735

Open
jepsar opened this issue Apr 9, 2024 · 2 comments
Open

Paginator: PageEvent add rowsPerPage property #11735

jepsar opened this issue Apr 9, 2024 · 2 comments
Labels
documentation Documentation needs updating new feature workaround A workaround has been provided
Milestone

Comments

@jepsar
Copy link
Member

jepsar commented Apr 9, 2024

Description

You currently cannot capture rows per page changes (from the rowsPerPageTemplate attribute) through the PageEvent using the page event of a DataTable.

Describe the solution you would like

Add a rowsPerPage property so you can.

Additional context

As a workaround you can use the request parameter

  public void onPaginate() {
    final DataTable dataTable = (DataTable) Components.getCurrentComponent();
    final String rppParam = Faces.getRequestParameter(dataTable.getClientId() + "_rppDD");
    System.out.println("rppParam: " + rppParam);
  }

Also, in the current documentation is not clear you can use the page event to capture rows per page changes.

@jepsar jepsar added new feature workaround A workaround has been provided labels Apr 9, 2024
@jepsar jepsar added this to the 15.0.0 milestone Apr 9, 2024
@jepsar jepsar added the documentation Documentation needs updating label Apr 9, 2024
@Rapster
Copy link
Member

Rapster commented Apr 11, 2024

Does DataTable#getRowsPerPage() work in onPaginate()?

@jepsar
Copy link
Member Author

jepsar commented Apr 11, 2024

No it does not. At least not when you change the rows per page. See https://discord.com/channels/787967399105134612/787967662293909524/1227188716250992701

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Documentation needs updating new feature workaround A workaround has been provided
Projects
None yet
Development

No branches or pull requests

2 participants