You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Chris Hane (JIRA)" <de...@myfaces.apache.org> on 2006/05/16 18:57:07 UTC
[jira] Created: (TOMAHAWK-437) Tree2 uses cookies when
preserveToggle==false
Tree2 uses cookies when preserveToggle==false
---------------------------------------------
Key: TOMAHAWK-437
URL: http://issues.apache.org/jira/browse/TOMAHAWK-437
Project: MyFaces Tomahawk
Type: Bug
Components: Tree2
Versions: 1.1.2
Environment: actually the release version is 1.1.3
Reporter: Chris Hane
Priority: Minor
This should probably be two issues, but I will let you decide that.
1. Can not have same screen open in two windows. Cookies from one screen affect the toggle status of the tree in the secon window.
2. preserveToggle==false still sets a cookie...
Here is the original email to the list http://marc.theaimsgroup.com/?l=myfaces-dev&m=114727809302352&w=2:
<paste>
I have been playing around with the tree2 control trying to make it do what I want. Nice control....
Question, I have been having issues with the following setup:
- clientSideToggle = true
- preserveToggle = false
When I have two windows open on the same view, the tree2 state is shared between both. This means that someone can not view two different records and have different tree expand/collapse states. Or more specifically, when I execute an action (commandLink) on the tree and return the same view (i.e., add/delete a TreeNode), the state of expanded/collpased nodes is read from the cookie.
I think I traced it down to the HtmlTreeRenderer.decode method.
At line 123 is:
if(tree.isClientSideToggle())
{
restoreStateFromCookies(context, component);
}
Shouldn't the if statement also look at the tree.isPreserveToggle()? Not an expert in JSF by any stretch of the imagination, so if I'm on the wrong track or this doesn't make sense just let me know....
Chris....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Resolved: (TOMAHAWK-437) Tree2 uses cookies when
preserveToggle==false
Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/TOMAHAWK-437?page=all ]
sean schofield resolved TOMAHAWK-437:
-------------------------------------
Fix Version: 1.1.4-SNAPSHOT
Resolution: Fixed
I fixed the original problem reported. Issue #1 from my list above remains, but this doesn't cause any problems and is a little trickier to solve. Please test against latest source code to confirm that it works for you.
> Tree2 uses cookies when preserveToggle==false
> ---------------------------------------------
>
> Key: TOMAHAWK-437
> URL: http://issues.apache.org/jira/browse/TOMAHAWK-437
> Project: MyFaces Tomahawk
> Type: Bug
> Components: Tree2
> Versions: 1.1.2
> Environment: actually the release version is 1.1.3
> Reporter: Chris Hane
> Assignee: sean schofield
> Priority: Minor
> Fix For: 1.1.4-SNAPSHOT
>
> This should probably be two issues, but I will let you decide that.
> 1. Can not have same screen open in two windows. Cookies from one screen affect the toggle status of the tree in the secon window.
> 2. preserveToggle==false still sets a cookie...
> Here is the original email to the list http://marc.theaimsgroup.com/?l=myfaces-dev&m=114727809302352&w=2:
> <paste>
> I have been playing around with the tree2 control trying to make it do what I want. Nice control....
> Question, I have been having issues with the following setup:
> - clientSideToggle = true
> - preserveToggle = false
> When I have two windows open on the same view, the tree2 state is shared between both. This means that someone can not view two different records and have different tree expand/collapse states. Or more specifically, when I execute an action (commandLink) on the tree and return the same view (i.e., add/delete a TreeNode), the state of expanded/collpased nodes is read from the cookie.
> I think I traced it down to the HtmlTreeRenderer.decode method.
> At line 123 is:
> if(tree.isClientSideToggle())
> {
> restoreStateFromCookies(context, component);
> }
> Shouldn't the if statement also look at the tree.isPreserveToggle()? Not an expert in JSF by any stretch of the imagination, so if I'm on the wrong track or this doesn't make sense just let me know....
> Chris....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
[jira] Commented: (TOMAHAWK-437) Tree2 uses cookies when
preserveToggle==false
Posted by "Martin Schlierf (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/TOMAHAWK-437?page=comments#action_12438666 ]
Martin Schlierf commented on TOMAHAWK-437:
------------------------------------------
Can you add a cookiePrefix parameter?
That would help me with my issue which has the same root.
My problem is:
I use the tree to show the content of a folder which can be selected by a combobox.
The user selects a folder.
The Tree shows the content.
The user opens some subfolders.
The user selects another folder in the combobox.
The tree is reinitialised and shows the content of the new folder but tries to expand the same subfolders as the folder before, because it´s saved in the cookie.
> Tree2 uses cookies when preserveToggle==false
> ---------------------------------------------
>
> Key: TOMAHAWK-437
> URL: http://issues.apache.org/jira/browse/TOMAHAWK-437
> Project: MyFaces Tomahawk
> Issue Type: Bug
> Components: Tree2
> Affects Versions: 1.1.2
> Environment: actually the release version is 1.1.3
> Reporter: Chris Hane
> Assigned To: sean schofield
> Priority: Minor
> Fix For: 1.1.4-SNAPSHOT
>
>
> This should probably be two issues, but I will let you decide that.
> 1. Can not have same screen open in two windows. Cookies from one screen affect the toggle status of the tree in the secon window.
> 2. preserveToggle==false still sets a cookie...
> Here is the original email to the list http://marc.theaimsgroup.com/?l=myfaces-dev&m=114727809302352&w=2:
> <paste>
> I have been playing around with the tree2 control trying to make it do what I want. Nice control....
> Question, I have been having issues with the following setup:
> - clientSideToggle = true
> - preserveToggle = false
> When I have two windows open on the same view, the tree2 state is shared between both. This means that someone can not view two different records and have different tree expand/collapse states. Or more specifically, when I execute an action (commandLink) on the tree and return the same view (i.e., add/delete a TreeNode), the state of expanded/collpased nodes is read from the cookie.
> I think I traced it down to the HtmlTreeRenderer.decode method.
> At line 123 is:
> if(tree.isClientSideToggle())
> {
> restoreStateFromCookies(context, component);
> }
> Shouldn't the if statement also look at the tree.isPreserveToggle()? Not an expert in JSF by any stretch of the imagination, so if I'm on the wrong track or this doesn't make sense just let me know....
> Chris....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] Commented: (TOMAHAWK-437) Tree2 uses cookies when
preserveToggle==false
Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
[ http://issues.apache.org/jira/browse/TOMAHAWK-437?page=comments#action_12416671 ]
sean schofield commented on TOMAHAWK-437:
-----------------------------------------
There seem to be a few problems here.
1.) Cookies should not be created if preserveToggle == false. Right now the client side toggle javascript creates them regardless.
2.) Cookies should not be processed during ApplyRequestValues if preserveToggle == false. Decode() method should add a check for this (as you are suggesting.)
3.) Cookies should not be read by HtmlTreeRenderer during encodeBegin() as they are now. The call from decode() should be sufficient.
> Tree2 uses cookies when preserveToggle==false
> ---------------------------------------------
>
> Key: TOMAHAWK-437
> URL: http://issues.apache.org/jira/browse/TOMAHAWK-437
> Project: MyFaces Tomahawk
> Type: Bug
> Components: Tree2
> Versions: 1.1.2
> Environment: actually the release version is 1.1.3
> Reporter: Chris Hane
> Priority: Minor
>
> This should probably be two issues, but I will let you decide that.
> 1. Can not have same screen open in two windows. Cookies from one screen affect the toggle status of the tree in the secon window.
> 2. preserveToggle==false still sets a cookie...
> Here is the original email to the list http://marc.theaimsgroup.com/?l=myfaces-dev&m=114727809302352&w=2:
> <paste>
> I have been playing around with the tree2 control trying to make it do what I want. Nice control....
> Question, I have been having issues with the following setup:
> - clientSideToggle = true
> - preserveToggle = false
> When I have two windows open on the same view, the tree2 state is shared between both. This means that someone can not view two different records and have different tree expand/collapse states. Or more specifically, when I execute an action (commandLink) on the tree and return the same view (i.e., add/delete a TreeNode), the state of expanded/collpased nodes is read from the cookie.
> I think I traced it down to the HtmlTreeRenderer.decode method.
> At line 123 is:
> if(tree.isClientSideToggle())
> {
> restoreStateFromCookies(context, component);
> }
> Shouldn't the if statement also look at the tree.isPreserveToggle()? Not an expert in JSF by any stretch of the imagination, so if I'm on the wrong track or this doesn't make sense just let me know....
> Chris....
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira