Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    cacheAllData handling errors

    Hi,
    I've got a problem with correct way to handle errors with setCacheAllData(true);

    I've got a ListGrid with DataSource and setCacheAllData(false).
    Sometimes when server cannot complete fetch it returns status: STATUS_FAILURE (-1).
    ListGrid shows: "No items to show" and error message is displayed.
    When user call refresh:
    Code:
    invalidateCache();
    fetchData();
    and server can complete request data is properly shown.
    It all works fine.

    Problem starts when I've changed setCacheAllData(true).
    Error dialog is shown but ListGrid shows still Loading message.
    Calling invalidateCache() has no effect and another request to server is not send.

    I've tried to experiment with setCacheAllData(false) and then setCacheAllData(true) when error occurs but I've only achieved that fetch request is sent to server but listGrid still doesn't show any data but still previous loading message.

    What is a correct way to handle errors with setCacheAllData(true).

    Best regards
    Mariusz Goch


Working...
X