Fluid scroll List with paging
<p>I have a JSON Model like this:</p>

<pre><code>[
{code:'01', descr:'descr 01'},
{code:'02', descr:'descr 02'},
{code:'03', descr:'descr 03'},
{code:'04', descr:'descr 04'},
{code:'05', descr:'descr 05'},
{code:'06', descr:'descr 06'},
{code:'07', descr:'descr 07'},
{code:'08', descr:'descr 08'},
{code:'09', descr:'descr 09'},
{code:'10', descr:'descr 10'}
]
</code></pre>

<p>I show the array in a List  <a href="https://sapui5.hana.ondemand.com/docs/api/symbols/sap.m.List.html" rel="nofollow">https://sapui5.hana.ondemand.com/docs/api/symbols/sap.m.List.html</a> </p>

<p>I use the list (in a Dialog, but this is not significant) to make the user choice the value to set in an Input field.
I don't use ODATA, but I use rest methods to retrieve the list. <strong>I use a server-side pagination to retrieve blocks of data</strong>; for example:</p>

<p>when  I open the list I call</p>

<pre><code>getHints, {from:1, to 10}
</code></pre>

<p>The server send back the list with first 10 record and I show rightly their in the list.</p>

<p>Then I scroll the list and when I am at the end the event updateFinished is run and I call the next 10 records:</p>

<pre><code>getHints, {from:11, to 20}
</code></pre>

<p>and the server send back</p>

<pre><code>[
{code:'11', descr:'descr 11'},
{code:'12', descr:'descr 12'},
{code:'13', descr:'descr 13'},
{code:'14', descr:'descr 14'},
{code:'15', descr:'descr 15'},
{code:'16', descr:'descr 16'},
{code:'17', descr:'descr 17'},
{code:'18', descr:'descr 18'},
{code:'19', descr:'descr 19'},
{code:'20', descr:'descr 20'}
]
</code></pre>

<p>In the callback I push the record in the JSONModel and I have now 20 records in the list BUT I have a strange behavior:</p>

<p><strong><em>The scroll bar return to the top</em></strong> and in this mode the user does not have a fluid scroll.</p>

<p>How can I solve my strange problem?</p>

<p>PS.
I update my model in this mode:</p>

<pre><code>var aElements=oModel.getProperty('/elements');

_.map(p_serverData.data.lookup, function (oElement) {
            var oHintElement = {};
            oHintElement.code = oElement.code;
            oHintElement.description = oElement.descr;
            aElements.push(oHintElement);
        });

oModel.setProperty('/elements', aElements);
</code></pre>