jQuery: The Write Less, Do More JavaScript Library

Ticket #2810 (new enhancement)

Opened 3 months ago

Last modified 3 months ago

[treeview] async support for complete refresh

Reported by: joern Assigned to: joern
Type: enhancement Priority: major
Milestone: 1.2.4 Component: plugin
Version: 1.2.3 Keywords:
Cc: Needs: Review

Description (last modified by joern) (diff)

From the mailing list:

We're still having problems implementing a 'refresh' button for a treeview tree. We need to be able to re-initialize the tree, clearing out the current version completely, and reloading with data fresh from the server.

we're clearing out the current tree with: $('#openExistingTree').empty();

and then re-initializing with $('#openExistingTree').treeview({ url: "CalcBldrOpenExisting?.ashx" });

Each time we hit 'refresh', we're getting a duplicate set of 'hitarea' divs

The initial json returned is:

"[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text':
'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published
Calculations','id': 5, 'hasChildren': true}]"

Attachments

Change History

Changed 3 months ago by joern

  • description changed from From the mailing list: {{{ We're still having problems implementing a 'refresh' button for a treeview tree. We need to be able to re-initialize the tree, clearing out the current version completely, and reloading with data fresh from the server. we're clearing out the current tree with: $('#openExistingTree').empty(); and then re-initializing with $('#openExistingTree').treeview({ url: "CalcBldrOpenExisting.ashx" }); Each time we hit 'refresh', we're getting a duplicate set of 'hitarea' divs The initial json returned is: "[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text': 'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published Calculations','id': 5, 'hasChildren': true}]" }}} to From the mailing list: We're still having problems implementing a 'refresh' button for a treeview tree. We need to be able to re-initialize the tree, clearing out the current version completely, and reloading with data fresh from the server. we're clearing out the current tree with: $('#openExistingTree').empty(); and then re-initializing with $('#openExistingTree').treeview({ url: "CalcBldrOpenExisting.ashx" }); Each time we hit 'refresh', we're getting a duplicate set of 'hitarea' divs The initial json returned is: {{{ "[{'text': 'Private Drafts','id': 3, 'hasChildren': true},{'text': 'Shared Drafts','id': 4, 'hasChildren': true},{'text': 'Published Calculations','id': 5, 'hasChildren': true}]" }}}

Changed 3 months ago by joern

Solution proposed on mailing list: http://groups.google.com/group/jquery-en/browse_thread/thread/c858c4f0ae3b50f5/5d6f8ba43572ce52?#5d6f8ba43572ce52

"clear everything and recreate the root element"

Note: See TracTickets for help on using tickets.