Comments (17)
@AndrewG10i i am pretty sure based on the migration guide for 11.0.0 you should not have been returning count 0 even then based on this migration note: https://primefaces.github.io/primefaces/13_0_0/#/../migrationguide/11_0_0?id=datatable-dataview-datagrid-datalist
from primefaces.
@tandraschko @AndrewG10i @jungm I got to the bottom of it and its this fix: #11402
It also came with an integration test so we have conflicting issues both with integration tests proving something is wrong.
from primefaces.
See: #11377
It's only for virtual scroll and live scroll. So it should not affect paginator at all. As there is no paging in live scroll or virtual scroll mode?
from primefaces.
Please provide an executable example using the PrimeFaces Test project. This issue will be closed if no activities in 20 days.
from primefaces.
This is the code (DataTable declaration) I have:
<p:dataTable id="usersTable" value="#{dirCntroller.usersLazyDS}" lazy="true" var="rowData" rowIndexVar="rowIndex"
paginator="true" rows="25" rowsPerPageTemplate="25,50,100" paginatorPosition="top" paginatorAlwaysVisible="true"
paginatorTemplate="{CurrentPageReport} {JumpToPageDropdown} {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}"
reflow="true" emptyMessage="#{labels['general.dataTable.noRecordsFound']}" filterDelay="800" styleClass="usersTable" widgetVar="usersTableWV">
I will try to prepare reproducer. Meanwhile decided to report the issue so in case someone else have it they can confirm as well.
from primefaces.
We have tons of integrations tests that test pagination and datatable that all passed so if this is a bug it means there is a gap in the integration tests.
from primefaces.
Okay, so far cannot reproduce this issue, reproducer works fine. Will investigate further what exactly triggers issue in my app and in case issue found in the PF lib - will reopen this ticket again. But for now closing it. Thanks!
from primefaces.
Thanks yes please let me know what you find out!
from primefaces.
Okay, after spending several hours on this, I finally found the root cause. ;))
Considered particular project uses PF since version 11.x and it was working fine until v13.0.5 (inclusive). But since v13.0.6 - behavior of paginator in DataTable with LazyDataModel has changed.
So basically the root cause is related to the Issue 8062. As discussed in that issue - we also require to use one single API call for retrieving data from the DB, and result returns two values pair: data subset and count of the whole data set.
As such, LazyDataModel.count()
method returns 0
only, and the respective handling is implemented in the LazyDataModel.load()
method.
And this causes the issue with pagination.
So once I change LazyDataModel.count()
from return 0;
to return actual count - it fixes behavior of paginator in v13.0.6 as well.
Could you please reopen this issue and provide your feedback? Also please let me know if you would like me to post a reproducer as well. Thank you!
from primefaces.
@Rapster @tandraschko thoughts here?
from primefaces.
we must support cases like seen here: #8062 (comment)
a reproducer would be great
@melloware can you check what did we change DataTable related in 13.0.6? also if we have similar integration tests?
from primefaces.
@tandraschko we have tons of integration tests and the only change was to fix LiveScroll and Virtual Scroll. Regular pagination was not touched.
See: #11377
from primefaces.
Please provide an executable example using the PrimeFaces Test project. This issue will be closed if no activities in 20 days.
from primefaces.
@AndrewG10i i am pretty sure based on the migration guide for 11.0.0 you should not have been returning count 0 even then based on this migration note: https://primefaces.github.io/primefaces/13_0_0/#/../migrationguide/11_0_0?id=datatable-dataview-datagrid-datalist
Thanks for pointing to that note. But seems the project still in compliance with it. :)
Under the item "see DataTable for details how to avoid a separate count-statement against your datasource" it basically shows the implementation as per 8062.
Let me post reproducer shortly...
from primefaces.
@melloware we dont have a testcase for this - we should just copy DataTable037 and implement rowCount return0
from primefaces.
it fails currently
from primefaces.
OK good thanks for adding a test case. Let me look and see if I can debug.
from primefaces.
Related Issues (20)
- Memory: InputText with simple AJAX event leaks EventListener
- Calendar/DatePicker: Destroy not releasing all DOM elements
- InputMask: Destroy mask if widget is destroyed. HOT 1
- Memory: Widgets with "target" or "trigger" leak HOT 1
- Memory: update="@form" causes DOM Leak HOT 2
- FileUpload: add destroy method
- IdleMonitor: Never registered for destruction
- MenuBar/TieredMenu: Document events holding on to DOM handles
- Color picker not working HOT 2
- Memory: Never store `$(window)` or `$(document)` HOT 8
- Core: AJAX update of resource doesn't check for duplicate CSS/JS
- PickList: unexpected scrolling on "long" Click HOT 10
- TabView: Implement proper cleanup
- SQL Injection may be possible on Primefaces 13 (may be false positive) HOT 2
- DataExporter: Make ExcelStylesManager.updateCellObjectValue null-safe
- Core: Hidden inputs remove autocomplete="off"
- Paginator: PageEvent add rowsPerPage property HOT 2
- Exception Handler: do not try to create sessions HOT 4
- Memory: Resizable and DragDrop destroy cleanup
- DataExporter: Make the ExporterUtils.getColumnValue method overridable HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from primefaces.