srikotesh
asked on
pagenation issue in java
Hi Experts,
I am calling wsdl service and getting 137 records
now i want to get only 10 records each time
when i request with
http://localhost:8080/reportlist?pagenum=1&recordcount=10
i am getting 10 records
next time when i tried with
http://localhost:8080/reportlist?pagenum=2&recordcount=10
i am not getting the values
}
please find the attachment to see the code
Thanks
SAMPLE_CODE.txt
I am calling wsdl service and getting 137 records
now i want to get only 10 records each time
when i request with
http://localhost:8080/reportlist?pagenum=1&recordcount=10
i am getting 10 records
next time when i tried with
http://localhost:8080/reportlist?pagenum=2&recordcount=10
i am not getting the values
}
if(recordcount != null){
reportListingInput.setStartlimit((recordcount * pagenum) - (recordcount - 1));
reportListingInput.setPagelimit(recordcount);
please find the attachment to see the code
Thanks
SAMPLE_CODE.txt
ASKER
index I'd need to change
when I start with pagenum 2
result of json index starts with 11 ends with 20.
when I am iterating json index always I am initialising with 1
index should start with 11
when I start with pagenum 2
result of json index starts with 11 ends with 20.
when I am iterating json index always I am initialising with 1
index should start with 11
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
I have made changes as per my above comments its working fine now
Perfect.
Could you please post the solution so that it can be referred in future for similar situation ? A brief description of the solution will do.
Could you please post the solution so that it can be referred in future for similar situation ? A brief description of the solution will do.
ASKER
sorry i am unable to post my code
sorry i am unable to post my code:
this is the line which is giving page start limit value properly
if(recordcount != null){
reportListingInput.setStar tlimit((re cordcount * pagenum) - (recordcount - 1));
reportListingInput.setPage limit(reco rdcount);
}
in another method i hard coded index value starts with 1
so when i click next page 10*2-10-1--->it has to start from 11
but i have hardcode as 1 due to that issue came.
sorry i am unable to post my code:
this is the line which is giving page start limit value properly
if(recordcount != null){
reportListingInput.setStar
reportListingInput.setPage
}
in another method i hard coded index value starts with 1
so when i click next page 10*2-10-1--->it has to start from 11
but i have hardcode as 1 due to that issue came.
ASKER
GOOD
http://localhost:8080/reportlist
http://localhost:8080/reportlist?pagenum=2&recordcount=25
http://localhost:8080/reportlist?pagenum=5&recordcount=10
http://localhost:8080/reportlist?pagenum=2&recordcount=50