1. #1
    Sencha User
    Join Date
    Jun 2011
    Posts
    3
    Vote Rating
    0
    sinoohe is on a distinguished road

      0  

    Default treeloader problem

    treeloader problem


    Hi
    I extend from treepanel and set loader in the constructor
    the object that i set in treepanel is correct!
    it works good in a first run! but when i close the treepanel and start another treepanel it uses last treeloader
    but I checked that the program set the correct loader in the tree! but i don't know what happens that it uses last treeloader!!!!!!!

    I set treeloader in initComponent in this way:
    Code:
            this.loader=new Ext.tree.TreeLoader({
    	    preloadChildren: true,
    	    clearOnLoad: false,
                paramsAsHash:true,
                baseParams:{
                  item_id:this.item_id
                },
                directFn:ProgCl.gettree
           });
    the actual problem is item_id in the codes are different and alsa item_id will poss to it in a correct way
    i logged this.loader with console.log and I sawed item_id is correct! but when it request to the server it sends last item_id not the item_id that assigned to it

    please help

  2. #2
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,345
    Vote Rating
    250
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    How are you setting item_id on the treepanel? Does the section you posted appear before or after the call to the superclass's initComponent()? How are you closing the old tree panel and creating another one?

    Personally I'd try putting a breakpoint on Ext.Ajax.request() and then looking up the stack to figure out what's actually happening.

  3. #3
    Sencha User
    Join Date
    Jun 2011
    Posts
    3
    Vote Rating
    0
    sinoohe is on a distinguished road

      0  

    Default


    i call parent component after setting the loader
    this.item_id is passed correct!
    i checked it with console.log
    i close the panel by clicking on cross icon on right of the panel
    should I do any thing before close?


    note that my problem solved by change my ajax request position to before creating treepanel
    and after that request loaded I will create treepanel with my new data

    the version that i am using is 3.4
    Last edited by sinoohe; 1 Jul 2011 at 2:09 AM. Reason: add version of extjs

  4. #4
    Sencha User skirtle's Avatar
    Join Date
    Oct 2010
    Location
    UK
    Posts
    3,345
    Vote Rating
    250
    skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future skirtle has a brilliant future

      0  

    Default


    Wherever the problem is I don't think it's in the section you've posted. It's hard to speculate where the problem might be. Any further code you can post from your treepanel might help. Maybe you've got an object on your prototype (like the root node) that's being reused between the two treepanels?

    Put a breakpoint in AyncTreeNode's expand() method and take a look at the loader.

Thread Participants: 1

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar