Announcement

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

    listgrid preferences setViewState hangs when underlying table columns change

    PROBLEM Statement:

    The view state can be saved in a DB and later retrieved. The problem happens when the column names are changed or dropped in the DB for the table the view state represents. Then trying to use ListGrid.setViewState hangs the reloading of the ListGrid who's datasource is tied to that table.

    Proposal 1

    I would like to have a script to manipulate the view state string in the DB. I.e., remove the or rename the appropriate columns. However, it seems to be stored in a JSON like encoded string, but it's not strictly JSON format. In particular, the attribute names are not quoted such as name or field.

    If it were in JSON format, then manipulation would be much easier.

    Proposal 2

    I would like to write client code to manipulate the view state string. Since it's not strictly JSON, how would you best suggest to manipulate the string? I.e, to remove or rename fields that are referenced in the view state string.

    Summary

    It seems best to have the view state stored as a JSON encoded string.

    #2
    If the viewState contains field names that no longer exist, applying it will not hang the ListGrid. If you think you're seeing a case where this happens, try putting together a minimal, standalone test case that demonstrates this.

    The viewState is by design not a documented format, and will not be documented in the future.

    Comment

    Working...
    X