Under certain conditions we have found that willFetchData returns false but then a call to fetchData actually does in fact perform a server side fetch.
The conditions to cause this to happen are:
1. more records/rows than the page size (I have page size to 100 and the problem only appears if there are more than 100 qualifying records)
2. A criteria has been set on the listgrid before it has been drawn (before the 1st fetch). Again if no criteria has been set or if the criteria has been set after the grid is drawn and data alreadly loaded, the problem does not happen.
When executing the code above, if the 2 conditions stated above are not met and the willFetchData returns false, all is good and the callback is not invoked. However, if the 2 conditions are met, then when willFetchData returns false, a server side fetch is still performed and the callback is executed.
Output:
Using: SmartClient Version: v9.1p_2014-10-02/Pro Deployment (built 2014-10-02)
The conditions to cause this to happen are:
1. more records/rows than the page size (I have page size to 100 and the problem only appears if there are more than 100 qualifying records)
2. A criteria has been set on the listgrid before it has been drawn (before the 1st fetch). Again if no criteria has been set or if the criteria has been set after the grid is drawn and data alreadly loaded, the problem does not happen.
Code:
if (willFetchData(c)) { GWT.log("Fetch will cause a server-side fetch"); fetchData(c); } else { GWT.log("Fetch will NOT cause a server-side fetch"); fetchData(c, new DSCallback() { @Override public void execute(DSResponse dsResponse, Object data, DSRequest dsRequest) { GWT.log("Non-Fetching fetch callback!!!"); } }); }
Output:
Code:
19:57:46.360 [INFO] [xxx] Fetch will NOT cause a server-side fetch 19:57:47.305 [INFO] [xxx] Non-Fetching fetch callback!!!
Comment