PDA

View Full Version : tree load in MVC calling POST



bobmanc
18 May 2012, 12:25 PM
This is a weird one. In my controller I have a combobox that has code to get a treegrid's store and load it.


this.getProjecttreegrid().getStore().load();

It calls the server 18 times with a POST and then does a GET(which is what it is supposed to do).
Any ideas?

scottmartin
18 May 2012, 8:50 PM
That single store.load is calling POST 18 times? have you check the call to see what each post is? Same data?

Regards,
Scott.

bobmanc
19 May 2012, 5:26 AM
I have more info.

I looked at the posts and it turns out the posts are being called once for every item in the treegrid. the payload is the data from the node of the tree for example
{"id":20,"text":"my text","parentId":"NaN","index":0,"depth":1,"checked":null}

The call "this.getProjecttreegrid().getStore().load();" originates from a combobox on change event.
The store has auto=false.

scottmartin
19 May 2012, 6:18 AM
Can you create a small working example duplicates this behavior. There is no reason I can think for the the tree data to be sent for each time unless there is a trigger somewhere.

Scott.

bobmanc
19 May 2012, 12:29 PM
I minimized it as much as possible in the attached zip file. I am using Architect 2 so most of this was generated. If the proxy url points to the file test.jsn it works fine but if it is pointing to my server(which returns the exact same data) it loads initially fine but clicking on the ok button causes the error and then reloads it fine. Weird.

Thanks for your help.

bobmanc
24 May 2012, 11:19 AM
Anybody able to reproduce this?