Announcement

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

  • 12.1d: ListGrid autoPersistViewState Automatic preferences sample

    Hi Isomorphic,

    I saw the new Automatic preferences sample. Again amazing as builtin feature. I did something similar, which works in a similar way, but is using the DB to persist the changes here.

    Would it also be an option that you do this as feature? I assume that you already thought about it, but if not, here is what you'd need IMHO. Some new settings like:
    • "viewStateDataSource"
    • "viewStateUserId" (for the WHERE clause)
    • "viewStateListGridName" (for the WHERE clause), would also save you from the locator complexity you describe in the docs.
    I don't know if your access to the browser storage is synchronous, which of course makes opening the ListGrid easier and faster in your case (no roundtrip to get e.g. sorting configuration in order to do a correct fetch). But even if not, this might be an option, as it has some other value.

    Also, is there a reason you don't have filterState in the ListGridViewStatePart docs? Can it be persisted as well? For me, this is working like a charm with my DB-persist.

    Best regards
    Blama

  • #2
    The feature of automatic persistence of view state to a DataSource would be a valid sponsorship, but would work differently from what you have in mind: we would want to design it so that multiple different components that are loaded at the same time load their view state together in a single request and that rendering doesn’t take place until the (asynchronous) request completes.

    Comment


    • #3
      Hi Isomorphic,

      That also sounds good - normally a delay of one round trip with a one-row lookup to an indexed table should not matter. For me, I have my working code for my main ListGrids, but just flipping the switch for all other ListGrids is definitely something I'm going to do in 12.1.

      What about the filterState in autoPersistViewState? Is it missing on purpose?

      Best regards
      Blama

      Comment


      • #4
        Filter criteria are not part of ListGridViewState so it is correctly not listed here.

        Comment


        • #5
          Hi Isomorphic,

          ah, yes, I'm using FilterEditorSubmitHandler for this in my application.
          Can you note storing filterState as part of viewState as an enhancement?

          As minor FYI: These docs do not list all available viewState parts.

          Best regards
          Blama

          Comment

          Working...
          X