Yep, I did the test with LargeDatasetDemo which has a pagesize of 5.

kind regards

bob

On 4/03/2010 08:09 PM, kristian_widjaja wrote:

Hi, Bob and Malcolm. Thanks for replying.

To Bob,
Have you tried to set the pageSize larger than the actual amount of
available data by using "DataProvider"? Cause the problem arise when that
strategy is implemented.

To Malcolm,
I am using JDBC wrapped by iBatis. Method to retrieved the list of data is
below :

<code>
private List<MemberUsers>  getMemberUsersList() {
                int offset = 1;

                if (StringUtils.hasLength(page)) {
                        int pageNumber = Integer.parseInt(page);
                        offset = pageNumber * AppConstants.PAGING_COUNT; // 
PAGING_COUNT = 10;
                }

                return memberUsersService.getUsersListByVirtualId(
                                getPreservedState().toString(), offset, 
AppConstants.PAGING_COUNT);
        }
</code>


The query is listed below:

<code>
select USER_ID, VIRTUAL_ID, JOIN_DT, STATUS, NAME, BIRTH_DT, EMAIL, PHONE,
UPLINE
     from ( select a.USER_ID, a.VIRTUAL_ID, a.JOIN_DT, a.STATUS, a.NAME,
a.BIRTH_DT, a.EMAIL,
                          a.PHONE, a.UPLINE, rownum rnum
            from (
                        select USER_ID, VIRTUAL_ID, JOIN_DT, STATUS, NAME, 
BIRTH_DT,
EMAIL, PHONE, UPLINE
                        from GNGUSER.MEMBER_USERS
             ) a
            where rownum<= #maxRows#
          )
     where rnum>= #minRows#
</code>

Anyway, as available records only 5 records currently, so when i set the
'pageSize = 5' and constant 'PAGING_COUNT = 5', it works well. As i
mentioned before, only when i set 'pageSize' larger than actual available
data count then the exception is thrown. Thanks.

Regards,
Kristian Widjaja.

Reply via email to