[
https://jira.jboss.org/jira/browse/RF-7849?page=com.atlassian.jira.plugin...
]
Jérôme JADOULLE updated RF-7849:
--------------------------------
Description:
... or so it seems.
As others, I am faced with the need to implement a server-side pagination so that only a
subset of my data gets fetched from my backend (a Hibernate 3 "managed"
database).
I have read the examples explaining how to do this (see the links below) and tried to make
them run but I encounter 2 main errors when testing:
first, when implementing the walk method in the SerializableDataModel, the range parameter
always returns 0 as its first row and -1 as the quantity.
When investigating in the source code, I found out that my walk method is in fact called
by the "modify" method of the "ModifiableModel" class.
Fact is that, the "range" parameter passed to the walk method is always created
like this: "new SequenceRange(0, -1)", already meaning that, whatever happens,
the values used in the range will be 0 and -1.
Second point appears when I force the quantity of rows to a predefined value other than -1
(to see if the rest of the system works fine). When doing this, the 20 first columns
correctly get displayed in my table but, even if the getRowCount() method is correctly
implemented as well (returning the total quantity of rows in my db), the datascroller uses
the UIData.getRowCount() method to calculate the quantity of rows it totally contains (in
order to know how to display itself) and this only returns the quantity of items actually
present in an ArrayList used to store the rows to display.
Meaning that, whatever the quantity of rows present in my system, datascroller always
thinks that the size is 20 (in this case).
Don't know if I am clear enough. If not, i'll post more information.
Links followed to understand how to implement the datamodel:
http://gochev.blogspot.com/2009/08/richfaces-server-side-paging-with.html
http://eclecticprogrammer.com/2008/06/25/sorting-and-paginating-in-the-da...
was:
... or so it seems.
As others, I am faced with the need to implement a server-side pagination so that only a
subset of my data gets fetched from my backend (a Hibernate 3 "managed"
database).
I have read the examples explaining how to do this (see the links below) and tried to make
them run but I encounter 2 main errors when testing:
first, when implementing the walk method in the SerializableDataModel, the range parameter
always returns 0 as its first row and -1 as the quantity. When investigating in the
source code, I found out that my walk method is in fact called by the "modify"
method of the "ModifiableModel" class. Fact is that, the "range"
parameter passed to the walk method is always created like this: "new
SequenceRange(0, -1)", already meaning that, whatever happens, the values used in the
range will be 0 and -1.
Second point appears when I force the quantity of rows to a predefined value other than -1
(to see if the rest of the system works fine). When doing this, the 20 first columns
correctly get displayed in my table but, even if the getRowCount() method is correctly
implemented as well (returning the total quantity of rows in my db), the datascroller uses
the UIData.getRowCount() method to calculate the quantity of rows it totally contains (in
order to know how to display itself) and this only returns the quantity of items actually
present in an ArrayList used to store the rows to display. Meaning that, whatever the
quantity of rows present in my system, datascroller always thinks that the size is 20 (in
this case).
Don't know if I am clear enough. If not, i'll post more information.
Links followed to understand how to implement the datamodel:
http://gochev.blogspot.com/2009/08/richfaces-server-side-paging-with.html
http://eclecticprogrammer.com/2008/06/25/sorting-and-paginating-in-the-da...
datascroller does not calculate its page count correctly when used
with dataTable & with SerializableDataModel...
-----------------------------------------------------------------------------------------------------------------
Key: RF-7849
URL:
https://jira.jboss.org/jira/browse/RF-7849
Project: RichFaces
Issue Type: Bug
Components: component-tables
Affects Versions: 3.3.1
Environment: Windows XP; Richfaces 3.3.1.GA; MyFaces 1.2.6, facelets 1.1.14.
Project base generated with appfuse v2
Reporter: Jérôme JADOULLE
... or so it seems.
As others, I am faced with the need to implement a server-side pagination so that only a
subset of my data gets fetched from my backend (a Hibernate 3 "managed"
database).
I have read the examples explaining how to do this (see the links below) and tried to
make them run but I encounter 2 main errors when testing:
first, when implementing the walk method in the SerializableDataModel, the range
parameter always returns 0 as its first row and -1 as the quantity.
When investigating in the source code, I found out that my walk method is in fact called
by the "modify" method of the "ModifiableModel" class.
Fact is that, the "range" parameter passed to the walk method is always created
like this: "new SequenceRange(0, -1)", already meaning that, whatever happens,
the values used in the range will be 0 and -1.
Second point appears when I force the quantity of rows to a predefined value other than
-1 (to see if the rest of the system works fine). When doing this, the 20 first columns
correctly get displayed in my table but, even if the getRowCount() method is correctly
implemented as well (returning the total quantity of rows in my db), the datascroller uses
the UIData.getRowCount() method to calculate the quantity of rows it totally contains (in
order to know how to display itself) and this only returns the quantity of items actually
present in an ArrayList used to store the rows to display.
Meaning that, whatever the quantity of rows present in my system, datascroller always
thinks that the size is 20 (in this case).
Don't know if I am clear enough. If not, i'll post more information.
Links followed to understand how to implement the datamodel:
http://gochev.blogspot.com/2009/08/richfaces-server-side-paging-with.html
http://eclecticprogrammer.com/2008/06/25/sorting-and-paginating-in-the-da...
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira