Hi,
I experienced a problem with a ComboBoxItem bound to a datasource that uses paging.
Since it would be really hard to provide a test-bed, here are the detailed steps to reproduce the problem.
1. Open the ComboBoxItem so the 1st page gets requested and displayed (paging requests range 0-75)
2. While the ComboBoxItem is opened, scroll down to the bottom of the list so the last page gets requested (paging requests range 81-127)
3. In the text field, type something that will filter the list you're currently looking at. Such a filter will send a request to the server with a paging request that has an invalid range (in my case, the range sent is 85-159).
In this case, the server returns a 416 HTTP status code ("Requested Range Not Satisfiable").
The work-around I found for this situation is to override 2 methods:
Specifying "startRow" fixed the issue, but the problem is that now that I defined "startRow" in one call, we do not get the paging/range benefit anymore since all the requests going to the server explicitly set "startRow" to 0.
In the ListGrid, when a 416 code is received from the server, the list automatically fires a new request with a 0-75 paging/range request as a fallback mechanism.
Is there a reason why ComboBoxIetm and ListGrid do not behave the same ?
Did I miss something ?
Thank you !
I experienced a problem with a ComboBoxItem bound to a datasource that uses paging.
Since it would be really hard to provide a test-bed, here are the detailed steps to reproduce the problem.
1. Open the ComboBoxItem so the 1st page gets requested and displayed (paging requests range 0-75)
2. While the ComboBoxItem is opened, scroll down to the bottom of the list so the last page gets requested (paging requests range 81-127)
3. In the text field, type something that will filter the list you're currently looking at. Such a filter will send a request to the server with a paging request that has an invalid range (in my case, the range sent is 85-159).
In this case, the server returns a 416 HTTP status code ("Requested Range Not Satisfiable").
The work-around I found for this situation is to override 2 methods:
Code:
refreshPickList : function() { // reset data scrolling to avoid potential 'HTTP 416 request range not satisfiable' if (!this.optionFilterContext) this.optionFilterContext = {}; this.optionFilterContext['startRow'] = 0; // let base class do its thing return this.Super('refreshPickList', arguments); }, resetField: function() { this.clearValue(); this.optionFilterContext = { startRow : 0 }; // reset data scrolling to avoid potential 'HTTP 416 request range not satisfiable' }
In the ListGrid, when a 416 code is received from the server, the list automatically fires a new request with a 0-75 paging/range request as a fallback mechanism.
Is there a reason why ComboBoxIetm and ListGrid do not behave the same ?
Did I miss something ?
Thank you !
Comment