[Zope] Tree tag cookie questions
Dunigan, Craig
craig.dunigan@esker.com
Fri, 25 May 2001 10:56:15 -0500
Thanks, Michel. This clears up a lot. Unfortunately, it doesn't clear up
the worst problem I have. See below.
> On Thu, 24 May 2001, Dunigan, Craig wrote:
>
> > <dtml-tree expr="REQUEST.resolve_url(BASE3)"
>
> You shouldn't use REQUEST.resolve_url. Use
> restrictedTraverse instead.
As an aside, why? And what syntax? When I tried it, Zope complained that
it couldn't find 'http:', which I assume means that I have to strip the
'http://' off of BASEx to use restrictedTraverse?
> > A user hits /folder1, generates a tree, modifies the tree
> state and gets a
> > cookie. Then he hits one of the links above, goes to
> /folder1/folder2,
> > generates a new tree, but with the state saved in the cookie. If he
> > modifies the tree state yet again, does he get a new
> cookie, obliterating
> > the previous tree state, or does the same cookie get
> modified, saying "for
> > page /folder1/index_html the tree state is 'x', for page
> > /folder1/folder2/index_html the tree state is 'y'?"
>
> The former: the old cookie gets obliterated. There is only
> one 'tree-s'
> cookie, and it can only hold the state for one tree, the last
> tree viewed
> by the user.
So, under this scheme, I'm right in saying that the tree on
/folder1/folder2/index_html gets created using the tree state saved in the
last 'tree-s' cookie, which was generated from /folder1/index_html? If
that's true, then why, in navigating down a fairly long branch, would the
tree suddenly collapse when the last folder is clicked? Wouldn't
Folder(x)'s tree get generated using the cookie from Folder(y), if that was
the point at which the tree state was last changed? Because I can verify
myself that this happens, not consistently, but with some regularity. The
only things I can state clearly so far are that it happens more often in IE
than Navigator, and it happens _almost_ always if that last folder is empty.
I'm doing some more tests, but the users are really pissed that they click
through half a dozen folders and, when they hit the last one, everything
they just opened closes up again.
> I'm sure you could try and extend the tree cookie to be more
> all-encompasing as you described above. This would have the upshot of
> allowing two trees on the same page.
>
Nice plug for user contribution! I doubt I'll be able to pick it up, but it
makes me wish I could. :)