[ 
https://jira.jboss.org/jira/browse/RF-7849?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Jérôme JADOULLE resolved RF-7849.
---------------------------------

    Resolution: Done


Found out the problem.
Fact is that, as soon as it is possible to filter on one of the columns used in 
the dataTable, instead of just using an ExtendedDataModel, the system will wrap 
it up in a ModifiableModel, not working in the same way as the simple 
ExtendedDataModel.

So if you have the same problem, either remove all the "filterBy" attributes on 
the columns or implement the ModifiableModel correctly (which I didn't test 
yet, to be honest).


> 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
>            Assignee: Nick Belaevski
>         Attachments: datascroller.doc
>
>
> ... 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-database-with-richfaces/

-- 
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

       

_______________________________________________
richfaces-issues mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/richfaces-issues

Reply via email to