Page 1 of 3 123 LastLast
Results 1 to 10 of 24

Thread: [FNR] Version 2.2.3 Livegrid not working anymore with RpcProxy

    Thank you for reporting this bug. We will make it our priority to review this report.
  1. #1
    Ext GWT Premium Member
    Join Date
    Jan 2010
    Posts
    18

    Default [FNR] Version 2.2.3 Livegrid not working anymore with RpcProxy

    In the new release has changed the behavior of the Livegrid.
    When a empty List is returned by the RpcProxy the Livegrid doesn't get empty and calls the proxy each 2' second to fetch new data...
    Because my RpcProxy Service fetches data from a database this repeated call is not very clever and also a empty Livegrid should be possible! How can i change to the old behavior?

  2. #2
    Ext GWT Premium Member
    Join Date
    Jan 2010
    Posts
    18

    Post Detailed Example...

    Here is my detailed example:
    GXT: 2.2.3
    GWT: 2.2.0
    Developmode Tested

    ClientPart
    PHP Code:
    public static final GreetingServiceAsync service GWT.create(GreetingService.class);
        
    String searchText null;

        
    PagingLoader<PagingLoadResult<ModelData>> gridloader null;
        
    Grid<ModelDatagrid null;
        
    ListStore<ModelDatastore null;

        public 
    void onModuleLoad() {
            
    ContentPanel cp = new ContentPanel();
            final 
    TextField<StringsearchField = new TextField<String>();
            
    searchField.addKeyListener(new KeyListener() {
                @
    Override
                
    public void componentKeyDown(ComponentEvent event) {
                    if (
    event.getKeyCode() == KeyCodes.KEY_ENTER) {
                        
    searchText searchField.getValue();
                        
    gridloader.load();
                    }
                }
            });
            
    ToolBar tbar = new ToolBar();
            
    tbar.add(new Html("seach: "));
            
    tbar.add(searchField);

            
    cp.setTopComponent(tbar);

            
    RpcProxy<PagingLoadResult<ModelData>> proxy = new RpcProxy<PagingLoadResult<ModelData>>() {
                @
    Override
                
    protected void load(Object loadConfigAsyncCallback<PagingLoadResult<ModelData>> callback) {
                    
    service.fetchDataPaged(searchText, (PagingLoadConfigloadConfigcallback);
                }
            };

            
    gridloader = new BasePagingLoader<PagingLoadResult<ModelData>>(proxy);
            
    gridloader.setRemoteSort(true);
            
    store = new ListStore<ModelData>(gridloader);
            List<
    ColumnConfigconfigs = new ArrayList<ColumnConfig>();
            
    configs.add(new ColumnConfig("name""Name"100));
            
    configs.add(new ColumnConfig("age""Age"60));
            
    grid = new Grid<ModelData>(store, new ColumnModel(configs));
            
    grid.setPixelSize(250200);
            
    LiveGridView liveView = new LiveGridView();
            
    liveView.setEmptyText("No rows available on the server.");
            
    liveView.setRowHeight(32);
            
    grid.setView(liveView);

            
    RootPanel rp RootPanel.get("content");
            
    cp.add(grid);
            
    rp.add(cp);
        } 
    ServerSide:
    PHP Code:
        private ModelData genModel(String nameInteger age) {
            
    BaseModel model = new BaseModel();
            
    model.set("name"name);
            
    model.set("age"age);
            return 
    model;
        }

        public 
    PagingLoadResult<ModelDatafetchDataPaged(String searchTextPagingLoadConfig loadConfig) {
            List<
    ModelDatasublist = new ArrayList<ModelData>();
            if (
    searchText == null) {
                
    sublist.add(genModel("Klaus"123));
                
    sublist.add(genModel("Maxy"25));
                
    sublist.add(genModel("Joey"22));
                
    sublist.add(genModel("Sissi"1));

            }
            
    System.out.println("Load... ");
            return new 
    BasePagingLoadResult<ModelData>(sublistloadConfig.getOffset(), sublist.size());
        } 
    You see when enter some values in the searchfield and press enter then the endless "Load..." comes...
    This is not the normal behavior...

  3. #3
    Sencha Premium Member
    Join Date
    Jun 2009
    Posts
    6

    Default

    I'm having the same issues as emps.

    Any request that returns no results causes the grid to infinitely load. Is there a fix available/in progress?

    My hunch is something with loadLiveStore (LiveGridView.class) being tasked every 200ms.

  4. #4
    Sencha Premium Member
    Join Date
    Jun 2009
    Posts
    6

    Default

    The break happened with the following:
    "Fixed LiveGridView isCached returns true if cache is empty."

    I have a class extending LiveGridView and am currently overriding the isCached method with the code from version 2.2.0:
    Code:
        @Override
        protected boolean isCached(final int index) {
            if ((index < liveStoreOffset) || (index > (liveStoreOffset + getCacheSize() - getVisibleRowCount()))) {
              return false;
            }
            return true;
          }
        }
    This has fixed the problem of infinite loop when receiving 0 objects from server

  5. #5
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    That fix is not correct. Also it may fix the problem, it brings you several new problems

  6. #6
    Sencha Premium Member
    Join Date
    Jun 2009
    Posts
    6

    Default

    I've been using that code for a whole day now .. I've noticed no issues ..

    May you provide a reason as to why you think that code brings several new problems? I would have to argue that the code from 2.2.3 brings me the worst problem of all -- an unusable grid

  7. #7
    Ext GWT Premium Member
    Join Date
    Jan 2010
    Posts
    18

    Default

    I've not tested hellofornow fix but he is right...
    Currently the new version 2.2.3 is unusable because of this bug.
    I've steped backward for my projects to gxt 2.2.1 ...

    When will you post a fix for this bug?

  8. #8
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    I _contributed_ (yes contributed as everyone can do) several fixes to GXT for LiveGridView that fixes several issues i had in production application from my customers. This should also fix this one.

  9. #9
    Ext GWT Premium Member
    Join Date
    Oct 2009
    Posts
    2

    Default

    Sven, you fixed this? I downloaded and rebuilt revision 2391 and the problem still exists. I'm going to have to go back to the old method of isCached and manually doing load masks again if I can't find a better workaround.

  10. #10
    Sencha Premium Member
    Join Date
    Sep 2007
    Posts
    13,976

    Default

    The testcase i used was fixed. Where have you build GXT from? What directory in SVN have you used?

    I found another problem which ends in end endless loop

Page 1 of 3 123 LastLast

Similar Threads

  1. LiveGrid and RpcProxy
    By aminef in forum Ext GWT: Discussion
    Replies: 3
    Last Post: 7 Sep 2011, 3:13 AM
  2. Replies: 0
    Last Post: 19 Apr 2010, 5:48 AM
  3. GXT 2.0.1 -> 2.1.0. BeanModelTag not working for me anymore.
    By Vasily.R in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 7 Jan 2010, 1:55 PM
  4. Need LiveGrid w/ RpcProxy example
    By robertlight in forum Ext GWT: Discussion
    Replies: 4
    Last Post: 6 Jan 2010, 7:56 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •