On 23 Sep 2005, at 23:46, ir. ing. Jan Dockx wrote:
Wait a sec. I have 2 trees in my application.
1 has only 1 level, so there are no nodes that can be expanded, so no cookie is ever generated.
<x:tree2 id="schoolTree"
value="#{handler.schoolTree}"
var="node"
varNodeToggler="t"
showRootNode="false"
clientSideToggle="false">
It is in a page with viewId /jsf/be/peopleware/fvb/semantics/User.jspx.
The second one has multiple levels, that are expandable, so cookies are generated:
<x:tree2 id="treeModel"
value="#{schoolH.treeModel}"
var="node"
varNodeToggler="t"
showRootNode="false">
This one is in a page with viewId /jsf/be/peopleware/fvb/semantics/convenants/School.jspx.
I navigate from the User.jspx page to School.jspx.
Then how come that, after I removed all (relevant cookies), that after a few minutes of moving around, I have TWO cookies named "treeModel" (and no cookie named "schoolTree", as expected), for 2 different paths "/<var>webappContext</var>/faces/jsf/be/peopleware/fvb/semantics" and "/<var>webappContext</var>/faces/jsf/be/peopleware/fvb/semantics/convenants".
I presume the first is generated first, when navigating to the School page for the first time (because the URL is actually one step behind, because we navigate from the User page, which is one directory up)? But when I started editing and submitting information on the School page, the second one is generated? No wonder that we get weird behavior, with the tree unexpectedly expanding, and errors that nodes are not found, with 2 cookies.
What are we doing wrong? Is there a better way to do this? Shouldn't the cookies have the path of the web app, period, like the JSESSIONID? To keep them unique, the name of the cookie could contain the viewId, e.g..
BTW, the analysis above seems to indicate that we need to take care that the simple id (not the full, ":"-separated id) of a t:tree2 component is UNIQUE inside a DIRECTORY of the web application!!!! (not only unique in its naming context, nor only unique inside 1 file).
<x-tad-smaller>Met vriendelijke groeten,
Jan Dockx
</x-tad-smaller><x-tad-smaller>
PeopleWare NV - Head Office</x-tad-smaller><x-tad-smaller>
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66 </x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller>
PeopleWare NV - Branch Office Geel</x-tad-smaller><x-tad-smaller>
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25</x-tad-smaller>
<x-tad-bigger>
</x-tad-bigger>
<x-tad-smaller><x-tad-smaller>Met vriendelijke groeten,
http://www.peopleware.be/
http://www.mobileware.be/
</x-tad-smaller>
Jan Dockx
</x-tad-smaller><x-tad-smaller>
PeopleWare NV - Head Office</x-tad-smaller><x-tad-smaller>
Cdt.Weynsstraat 85
B-2660 Hoboken
Tel: +32 3 448.33.38
Fax: +32 3 448.32.66 </x-tad-smaller><x-tad-bigger>
</x-tad-bigger><x-tad-smaller>
PeopleWare NV - Branch Office Geel</x-tad-smaller><x-tad-smaller>
Kleinhoefstraat 5
B-2440 Geel
Tel: +32 14 57.00.90
Fax: +32 14 58.13.25</x-tad-smaller><x-tad-bigger>
</x-tad-bigger><x-tad-smaller>
http://www.peopleware.be/
</x-tad-smaller><x-tad-smaller>http://www.mobileware.be/</x-tad-smaller>
smime.p7s
Description: S/MIME cryptographic signature

