cancel
Showing results for 
Search instead for 
Did you mean: 

TableSelectDialog - paging by scroll for JSON model

former_member182374
Active Contributor
0 Kudos

Hello Experts,

I'm trying to implement F4 for my application by using TableSelectDialog.

The F4 returns ~1000 records so I don't want to get all of them at once in the client.

I've created an oData model and the paging works by design.

However, since I've only sandbox gateway I need to implement it using JSON model.

The server side is not a problem (get currentPage, number of records etc). However, I don't know how to catch the scrolling event of the TableSelectDialog  in order to fetch more records from the server.

Does someone has an example of implementing paging for TableSelectDialog for JSON model?

Regards,

Omri

Accepted Solutions (1)

Accepted Solutions (1)

saivellanki
Active Contributor
0 Kudos

Hi Omri,

You can use growing threshold property of TableSelectDialog.

Please check this sample - TableDialog Sample

For Code - JS Bin - Collaborative JavaScript Debugging

Regards,

Sai Vellanki.

former_member182374
Active Contributor
0 Kudos

Hi Sai,

Correct me if I'm wrong by your code handles the UI TableSelectDialog and the model is still fully loaded in the client.

I need a server roundtrip whenever the user scrolls up/down to get next/previous chunk of data (exactly like the oData default behavior).

Regards,

Omri

saivellanki
Active Contributor
0 Kudos

Hi Omri,

Oh ok.

Did you check this blog already?

Regards,

Sai Vellanki,

former_member182374
Active Contributor
0 Kudos

Hi,

I read the blog: since he uses oData he doesn't need the JSONModel as mentioned by Shibaji Chandra in the comments section.

Also, he uses a button for 'getNextOrders' while in my case I need the scroll event of the table.

Basically, I need the emulate the exact behavior of oData model bound to table for JSONModel (oData model calls the server when the scroll for next/prev page is triggered).

Regards,

Omri

Answers (0)