Reply

Paging through a large WAPI dataset using ExtJS

Member
Posts: 5
2411     0

I'm curious if anyone has attempted to use the ExtJS paging toolbar on a grid panel to display a large RESTful API dataset, i.e. a list of zones. 

 

I am using the following call:

 

/wapi/v2.6/zone_auth?_max_results=20&_paging=1&_return_as_object=1

 

The server returns (redacted):

{
    "next_page_id": "789c55904b6ec3300c44f7bc88b3a9613949931cc19b20680e20c8fab82a6c53906834e9
e94b0a688b6e04e8713433e2ce2505f706b3a72daf3a443fbba21774a581d4f3a481726f1
69eeb64262f740f43a7849a3cc9fd003b978e55661e3a57cd2b0c7d27481ee9b80664780
26b313d5932011f16d74279b38419d219765664e38c8f1657df8ea678b8f1eb8129a40b58
adc72dce1457ad01c70f6f0992eae04a6f4929e9a0a46fc0fc69b2e338f55bb490c924e4c0
44c01c9758c1f1a7e784843a61891471d51842f155c01f79a91ece901170aa4967282343a
e41cfe4855f38fb8b8b6bb3d1bbecaedafedfab60055769b48d7fa817cb7e2ffa107391dc5e
9ab243fb0d06ff814c-36dd576aa3c422fbbda59d1ea2f9b028a3bccdd8e48c44bd962cfa7", "result": [ { "_ref": ..... "fqdn": "example.com", "view": "default" },
{
"_ref": ....
"fqdn": ...
"view": ...
}, ... ... ] }

The next_page_id in the first payload should be made on the next RESTful API call as follows:

/wapi/v2.6/zone_auth?_max_results=20&_paging=1&_return_as_object=1&_page_id=789c55904b6ec3300c
44f7bc88b3a9613949931cc19b20680e20c8fab82a6c53906834e9e94b0a688b6e04e8713433e2ce2505f706
b3a72daf3a443fbba21774a581d4f3a481726f169eeb64262f740f43a7849a3cc9fd003b978e55661e3a57cd2b
0c7d27481ee9b8066478026b313d5932011f16d74279b38419d219765664e38c8f1657df8ea678b8f1eb8129
a40b58adc72dce1457ad01c70f6f0992eae04a6f4929e9a0a46fc0fc69b2e338f55bb490c924e4c044c01c9758
c1f1a7e784843a61891471d51842f155c01f79a91ece901170aa4967282343ae41cfe4855f38fb8b8b6bb3d1bb
ecaedafedfab60055769b48d7fa817cb7e2ffa107391dc5e9ab243fb0d06ff814c-36dd576aa3c422fbbda59d1ea
2f9b028a3bccdd8e48c44bd962cfa7

This will return the next page of Twenty (20) zones with the next_page_id for the following twenty. 

 

I'm just curious if anyone has implemented this using Sencha ExtJS grid pagingtool bar. Any tips? Secrets? Hints? Help?

 

Can it even be done?!

 

Thanks!

Re: Paging through a large WAPI dataset using ExtJS

Member
Posts: 5
2411     0

I'm guessing that all I could really do is put my own Toolbar at the top or bottom that contains a button ['Next'] which advances the Paging. 

Showing results for 
Search instead for 
Did you mean: 

Recommended for You