Announcement

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

    ListGrid filter editor

    Hello,

    I have following situation. I need to store and load state of filter editor in ListGrid.
    I use JSON.encode/decode to store the filter criteria as String, everything seems to work fine except the date filter.

    When I use Criteria object everything works fine, but because the Criteria object is not serializable, I cannot transfer it over GWT-RPC.

    Here is the case. It contains the both approches - save/load filter editor state as string and save/load filter editor as criteria object.

    How to reproduce:
    1. set filter for date field (Nationhood)
    2. click Save
    3. clear filter
    4. click Load (works fine)
    5. click LoadJSON (date field filter is not set correctly)


    thank you.
    Attached Files

    #2
    Don't use GWT-RPC unless forced to (see FAQ for why).

    See docs on JSONEncoder for how to set the dateFormat so that it round-trips successfully.

    Comment

    Working...
    X