jQsafi / dynatree

Automatically exported from code.google.com/p/dynatree
0 stars 0 forks source link

reload loses persistence #113

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago

Calling $("#tree").dynatree("getTree").reloadAjax() reloads the tree but 
does not seem to reload persistence from cookies.

Same bug in IE 8 and Firefox 3.5.2
jQuery 1.3.2

Original issue reported on code.google.com by koh.a...@gmail.com on 19 Aug 2009 at 5:07

GoogleCodeExporter commented 9 years ago
Is the behaviour different from simply hitting [F5] to reload the page?
(Note that persistence for lazy nested trees requires server-side cooperation as
described in the docs)

Original comment by moo...@wwwendt.de on 19 Aug 2009 at 9:37

GoogleCodeExporter commented 9 years ago
Refreshing and re-performing the initialization:

$("#tree").dynatree({
    initAjax: { url: .... 
    ...
    rootVisible: false, // Set to true, to make the root node visible.
    minExpandLevel: 1, // 1: root node is not collapsible
    checkbox: true,
    selectMode: 3,
    persist: true,
    cookieId: "mycookie",
    ....

maintains the persistency. BUT after the tree is initialized, calling 
reloadAjax() 
does not seem to reload from the cookies.

Using Dynatree 0.5.1

Original comment by koh.a...@gmail.com on 19 Aug 2009 at 1:26

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 19 Aug 2009 at 3:38

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 19 Aug 2009 at 3:39

GoogleCodeExporter commented 9 years ago
Fixed with r283 (please confirm)

reload called append, which called removeChildren, which also child persistence.

removeChildren now has a new arg 'retainPersistence'

Original comment by moo...@wwwendt.de on 26 Aug 2009 at 2:19

GoogleCodeExporter commented 9 years ago
When tree depth is 3 or more, root and immediate child checkboxes are 
re-selected 
properly. Any other checkboxes below the first child were not re-selected on 
reloadAjax.

Reload did correctly persist the tree expansion. Refresh (F5) persists 
correctly.

Tested on IE8, r283, jQuery 1.3.2, Vista

Original comment by koh.a...@gmail.com on 27 Aug 2009 at 12:32

GoogleCodeExporter commented 9 years ago
Hope I got it right now.
Can you try again (with the trunk version)?

Original comment by moo...@wwwendt.de on 28 Aug 2009 at 3:47

GoogleCodeExporter commented 9 years ago
Now works: expand and active node, but is other problem – when first time 
start page 
or cookie remove with tools page, reloadAjax loses persistence, but when I push 
F5 – 
reloadAjax work ok

Original comment by janscy...@poczta.onet.pl on 29 Aug 2009 at 6:41

GoogleCodeExporter commented 9 years ago
Reproduced:
1. clear session cookies
2. open (lazy loading) page
3. expand, select and activate
4. tree.reloadAjax()
  -> BUG: not persisted
5. [F5]
  -> persisted status appears OK
6. tree.reloadAjax()
  -> persisted status appears OK

Original comment by moo...@wwwendt.de on 31 Aug 2009 at 6:41

GoogleCodeExporter commented 9 years ago
Yes the above summary is correct.

Original comment by janscy...@poczta.onet.pl on 2 Sep 2009 at 3:19

GoogleCodeExporter commented 9 years ago
Tried another aproach.
Note that relaodAjax() was renamed to reload()

Original comment by moo...@wwwendt.de on 19 Sep 2009 at 7:31

GoogleCodeExporter commented 9 years ago

Original comment by moo...@wwwendt.de on 19 Sep 2009 at 7:31

GoogleCodeExporter commented 9 years ago
Did a _quick_ test, seems fixed. Thanks!

Original comment by koh.a...@gmail.com on 21 Sep 2009 at 1:35

GoogleCodeExporter commented 9 years ago
Thank you for testing and your patience ;-)

Original comment by moo...@wwwendt.de on 21 Sep 2009 at 1:57

GoogleCodeExporter commented 9 years ago
considered verified

Original comment by moo...@wwwendt.de on 17 Jul 2012 at 4:12