]
Marek Posolda reassigned GTNPORTAL-2744:
----------------------------------------
Assignee: (was: Marek Posolda)
Changing page size in AbstractSerializablePageList should recreate
underlying lazy list
---------------------------------------------------------------------------------------
Key: GTNPORTAL-2744
URL:
https://issues.jboss.org/browse/GTNPORTAL-2744
Project: GateIn Portal
Issue Type: Enhancement
Affects Versions: 3.5.0.Beta02
Reporter: Marek Posolda
Priority: Minor
Fix For: 3.9.0.Final
It seems that if we have pageList of type AbstractSerializablePageList and we want to
change the size of the page via setPageSize, we should recreate underlying lazyList.
Currently underlying lazyList is not recreated, which means that it's not in line with
pageList and still have old pageSize.
Example:
- I will create pageList of size 10
- I will call pageList.setPageSize(6) -- this will update info of pageList, but
underlying lazyList will still have bad info about pageSize
- I will call pageList.getPage(7). Now lazyList needs to load 20 items (all items from 30
to 39 and then all items from 40 to 49) instead of 6 items (items from 36 to 41).
Unit test will follow.