Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8792539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T22:59:33+00:00 2026-06-13T22:59:33+00:00

So I have been looking around the interwebs on how to store an EXT

  • 0

So I have been looking around the interwebs on how to store an EXT paging grid state on my server so that when users login back in their grid it is how they saved it.

I found this http://www.sencha.com/forum/showthread.php?64688-How-can-i-save-Grid-state-using-GXT but it is an old and dead thread.

What I have right now is:

grid.getState() returns a map of all col sizes, sorts, and hidden fields.

here is an example dumped to string:

{offset=0, limit=25, widthfieldname1=161, widthfield2=110, hiddenfield3=true }

I could store these key/values in a simple table with fields (username, key, value) and recreate this map and pass it to the front end.

So here is my question:

Does anyone have a code example of a full implementation of storing, retrieving and apply a grid state for GXT 2.4?

If not. How would I go about implementing one? I am confident i could store the state map in the database or XML. I am lost on how to apply this to a new session. How do i apply this state map to a new grid?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-13T22:59:34+00:00Added an answer on June 13, 2026 at 10:59 pm

    State management is already build into many components, and also into grids.
    Default GXT implementation uses Cookies (take a look at the com.extjs.gxt.ui.client.state.CookieProvider) to store Grid’s state, you just need make the grid statefull and give it a unique stateId:

    grid.setStateful(true);
    grid.setStateId("myGridUniqueId");
    

    If other storage is required, then you need to extend com.extjs.gxt.ui.client.state.Provider, implement you store/load logic and then pass it to com.extjs.gxt.ui.client.state.StateManager, it’s going to be pretty straightforward:

    public static class MyProvider extends Provider {
    
        @Override
        protected void clearKey(String name) {
            // clearing logic
        }
    
        @Override
        protected String getValue(String name) {
            // read logic
        }
    
        @Override
        protected void setValue(String name, String value) {
            // store logic
        }
    }
    
    StateManager.get().setProvider(new MyProvider());
    

    Please also note that State Management is changed in GXT3, you should keep it in mind if you need to migrate to 3.0 at the nearest future.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been looking around for a visualization framework that would aid graph visualization
I have been looking around for something that shows the progress of an upload
I have been looking around for a regex expression that will spit out just
I have been looking around on NASM tutorials and I have noticed that in
I have been looking around the web to find an example that will solve
I have been looking around for a solution for this problem that works across
I have been looking around to see what's available as far as helping users
I have been looking around and noticed that ecommerce sites are not using social
I have been looking around for solutions, and tried to implement what is often
I have been looking around ocn Google and Stackoverflow but haven't found what I

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.