Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Ext User Rupesh's Avatar
    Join Date
    Mar 2009
    Posts
    5
    Vote Rating
    0
    Rupesh is on a distinguished road

      0  

    Question How can i save Grid state using GXT?

    How can i save Grid state using GXT?


    Hi,

    Is it possible to save grid sort and grouping state in to coockies or in DB?

    There lot's of solutions on this grid save state but all are in GWT Ext i.e. using Ext JS Javascript solutions. Not in GXT.

    In GXT There are some classes at com.extjs.gxt.ui.client.state this location. These are StateManager, Provider and CoockieProvider. Using this i think it is possible.
    I have tried some approaches using these classes but it doesn't work?


    please help, thanks in advance.

  2. #2
    Ext User Rupesh's Avatar
    Join Date
    Mar 2009
    Posts
    5
    Vote Rating
    0
    Rupesh is on a distinguished road

      0  

    Post Save State using Cookie Provider

    Save State using Cookie Provider


    Hi,

    Follwoing is the code that i had tried save State of Grid in GXT using CookieProvieder class.
    I created object cookie added some values.
    SaveState is object having getter setter for some propertied.

    CookieProvider cookie = new CookieProvider(null, null ,null, true);
    SaveState state = new SaveState();
    state.setStateId("1");
    state.setColId("2");
    state.setSortDir(grid.getStore().getSortField());
    cookie.set("stateId", state);


    But not getting how to fetch this object cookie on load of Grid to reset state.


    Please help if any one having idea about save state using CookieProvider.
    Last edited by Rupesh; 9 Apr 2009 at 6:46 AM. Reason: title

  3. #3
    Ext User
    Join Date
    Aug 2007
    Posts
    6
    Vote Rating
    0
    etaix is on a distinguished road

      0  

    Default


    To store states in a database, you must provide a specific provider to the StateManager (The default provider is CookieProvider). The best way is to create a RpcStateProvider.

    Create a new class which implements Provider abstract class. Then create a new instance of this class and then set it to the StateManager:
    Code:
    StateManager.get().setProvider(new RpcStateProvider());
    The difficulty : RpcStateProvider is by definition asynchronous (RPC call). When your application or GXT call
    Code:
    StateManager.get().get("mystatename");
    the result is supposed to be the value of your state. With RpcStateProvider the result is always null. So you have to provide a asynchronous callback which is responsible of setting the value to the correct widget.

    I've done such provider and a PreferenceManager window which is able to save user interface preferences (typically a grid preference : column visibility, grouping, column order, ...) to a XML file on the server side. Currently I have to refactor my code to separate our specific code.

  4. #4
    Sencha User ram.ghadiyaram@gmail.com's Avatar
    Join Date
    Feb 2009
    Posts
    27
    Vote Rating
    0
    ram.ghadiyaram@gmail.com is on a distinguished road

      0  

    Question need your help on grid state storing

    need your help on grid state storing


    Hi Rupesh,
    I am also looking for the grid state save stuff.
    I think by this time you got the solution. Can you please share with me how you have achieved?
    Regards
    Ram

  5. #5
    Ext User
    Join Date
    Oct 2009
    Posts
    4
    Vote Rating
    0
    maheshrjy is on a distinguished road

      0  

    Default


    Hi etaix,

    I need to do some thing similar. I need to save the state of the Grid in database or xml file. So, if a user deletes a column from Grid, the next time when he generates the grid I don't want to display the column that was deleted from the Grid. Can you please provide me a sample code or example on how to do this?

    Thanks,
    Mahesh

  6. #6
    Ext User
    Join Date
    Mar 2008
    Location
    Pune,India
    Posts
    1
    Vote Rating
    0
    SachinBargeNC is on a distinguished road

      0  

    Default


    Hi,

    I need to save the state of the Grid in database using java . Can you please provide me a sample code or example on how to do this?

    Thanks
    Sachin.