Opened 8 years ago

Closed 8 years ago

#15183 closed defect (invalid)

JasonRestStore gets reused if tree control is reset

Reported by: stranm512 Owned by: stranm512
Priority: undecided Milestone: tbd
Component: General Version: 1.7.1
Keywords: Cc:
Blocked By: Blocking:

Description

I'm trying to use a dijit tree control with lazy loading. The tree needs to be sorted in one of several ways and the user can control this behavior however, once loaded 1 time, no matter what I do the EXACT same instance of the jasonreststore is reused. I wouldn't have believed it was possible, I literally call destroyRecursive(false) on the tree and create brand new objects for store and model, I can see them in firebug, every single time the store object is created it is the EXACT same object as was in the previous tree control, and it is initialized with all the data. I've tried this with and without cookies, makes no difference. I'm testing on Firefox 11.0 or on Google Chrome 18.0.1025.162 (not tried it on IE) but it does the exact same thing on earlier versions of firefox as well including client versions that do not have firebug loaded.

I've spent 2 days on this, I've gone as far as trying to delete the store object, no difference, I've set the store to clear on close and closed it, no difference. It retains all of the state. The problem with this is that if you change the sort order and you've opened any nodes with the old sort order the system will not make any json rest calls to load the nodes since it has them already. Is there NO way to clear out the store collection? I've looked and I can't find any way to do it in your API. But what is truely mind boggling is the functionality of a new store object once created seems to "magically" have all the same data...even if the objects are of different names (which I've tried as well), I've even tried naming the tree control differently, I've tried refreshing the model, nothing seems to change the jasonreststores internal ._index collection! Help Please...

Attachments (1)

treeForEval.js (3.0 KB) - added by stranm512 8 years ago.
THe javascript file that implements the tree control that manifests the behavior reported

Download all attachments as: .zip

Change History (3)

Changed 8 years ago by stranm512

Attachment: treeForEval.js added

THe javascript file that implements the tree control that manifests the behavior reported

comment:1 Changed 8 years ago by bill

Owner: set to stranm512
Status: newpending

You'll need to attach a full test case. You just attached some javascript code. You are missing an HTML file to run the test (the JS code you attached should be folded into the HTML file), plus whatever data is accessed by the JsonRestStore. Also, can you simplify the test case to be against a standard Tree rather than your custom class?

Also, don't publish code to a public website like this with inline comments saying that the code is secret.

comment:2 Changed 8 years ago by trac-o-bot

Resolution: invalid
Status: pendingclosed

Because we get so many tickets, we often need to return them to the initial reporter for more information. If that person does not reply within 14 days, the ticket will automatically be closed, and that has happened in this case. If you still are interested in pursuing this issue, feel free to add a comment with the requested information and we will be happy to reopen the ticket if it is still valid. Thanks!

Note: See TracTickets for help on using tickets.