Results 1 to 4 of 4

Thread: treegrid + auto load equals false

  1. #1
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744

    Default treegrid + auto load equals false

    I create one tree grid that have, rpc proxy, loader and store.. but I need load the data only when click on the button.. its possible do this?

  2. #2
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961

    Default

    i think you call the loader in the button event and not before!?
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts Search Results Advanced Search form Category overview http://www.extjs.com/forum/showthrea...041#post410041

  3. #3
    Ext User fother's Avatar
    Join Date
    Sep 2007
    Location
    Brazil
    Posts
    744

    Default

    I dont understand very well what you told..

    but the problem is that always when use a tree grid with proxy, store and loader.. when the tree grid its render.. call the rpc.. and I dont identify when call the method load..

  4. #4
    Ext User
    Join Date
    Sep 2008
    Location
    Germany
    Posts
    961

    Default

    i think there are not magic loding with the loader. because you not post your code i can only guess what you do :-(

    but if you look at this source code in this example then you need to move this loader.load to your button click event. then its not loaded automaticly, it is loaded after the button click.

    http://extjs.com/examples/explorer.html#asynctreegrid

    Code:
        final FileServiceAsync service = (FileServiceAsync) Registry.get(Examples.FILE_SERVICE);
        // data proxy
        RpcProxy<List<FileModel>> proxy = new RpcProxy<List<FileModel>>() {
          @Override
          protected void load(Object loadConfig, AsyncCallback<List<FileModel>> callback) {
            service.getFolderChildren((FileModel) loadConfig, callback);
          }
        };
        // tree loader
        final TreeLoader<FileModel> loader = new BaseTreeLoader<FileModel>(proxy) {
          @Override
          public boolean hasChildren(FileModel parent) {
            return parent instanceof FolderModel;
          }
        };
        // trees store
        final TreeStore<FileModel> store = new TreeStore<FileModel>(loader);
       // ...
       loader.load(null);
    This forum needs your help: you got hints from the community and now you have fixed your code? dont just reply with "now its fixed" or "i found the error"! please take the time to post also an detailed answer with the working code.

    GreaseMonkey Script for a GXT-only Forum: it hides ExtJs here: New Posts Search Results Advanced Search form Category overview http://www.extjs.com/forum/showthrea...041#post410041

Posting Permissions

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