Quantcast
Channel: SmartClient Forums
Viewing all articles
Browse latest Browse all 4756

Weird paging behavior

$
0
0
SmartClient Version: v8.3p_2013-02-05/LGPL Development Only (built 2013-02-05)
Hi,

I'm actually listing tweets in a listgrid and I ran into an issue.
At the begining, I let the paging system to load the 1st page (size: 100).
I can scroll down normally and the 2nd page is automatically loaded as expected.
But I'm querying the twitter api every 2 mins and when there is new tweets, I add them at the top of the listgrid using the setData function (I tried to use the addListAt(myList, 0) but I got the error: this.addAt is not a function).
The refresh system works but now imagine the following situation:
I have set a pagesize of 100 and the totalCount is 277.
When the page is loaded, the listgrid shows the 100 first tweets (0 - 99), then when the refresh system adds a new record at the top, the listgrid send a fetch request to load all the tweets that he needs to fill the entire listgrid instead of loading the 2nd page only.
So it doesn't even care about the pagesize.

Here is a part of the request sent from the clientside right after a new record is added.
Code:

<operationType>fetch</operationType>
<startRow>99</startRow>
<endRow>277</endRow>

Am I missing something or is that a bug ?

By the way when I send back the 176 tweets it asked for, it doesn't show them in the list. And I guess it's not a problem in my response because it does work when there are no record added on top and if I scroll down to the next pages.

I also tried this:
If there is 3 new tweets, I remove the last 3 tweets to prevent the records to go higher than the pagesize (because the 99th would be placed at the 102th row and would probably send such a fetch request).
But it doesn't fix it.

Thanks in advance again for helping me out.

Best regards,
Civilian

Viewing all articles
Browse latest Browse all 4756

Trending Articles