You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Marc Vandeloise (JIRA)" <my...@incubator.apache.org> on 2005/08/22 17:34:08 UTC

[jira] Créée: (MYFACES-438) Tree2 in ClientSide the selected node is lost when navigating to another page

Tree2 in ClientSide the selected node is lost when navigating to another page
-----------------------------------------------------------------------------

         Key: MYFACES-438
         URL: http://issues.apache.org/jira/browse/MYFACES-438
     Project: MyFaces
        Type: Bug
  Components: Tomahawk  
    Versions: Nightly Build    
 Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
    Reporter: Marc Vandeloise
 Assigned to: sean schofield 
     Fix For: Nightly Build


I have the  preserveToggle=true   which is supposed to keep the state
of the tree2 navigator when openning another page... but it always
collapse...

The issue still persist with Nightly Build 19-Aug-2005

From: Sean Schofield <se...@gmail.com>
---
There was a recent change to tree2 that may have broken this feature.
Are you using a recent (with 7-10 days) version of the source code?

If so, then please file a JIRA issue.  This is most likely a bug that
was introduced by the new TreeModel and TreeState interfaces.

sean
-------

-- 
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] Commenté: (MYFACES-438) Tree2 in ClientSide the selected node is lost when navigating to another page

Posted by "Marc Vandeloise (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12319600 ] 

Marc Vandeloise commented on MYFACES-438:
-----------------------------------------

Sorry, wrong manipulation...cloning instead of creating

The patch described in the [MYFACES-429] works for the state of the tree (expanded/collapse)  but the selected node, which is usually rendered as Bold, is not persisted after loading the other page.

Thanks


> Tree2 in ClientSide the selected node is lost when navigating to another page
> -----------------------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield
>      Fix For: Nightly Build

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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] Updated: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-438?page=all ]

sean schofield updated MYFACES-438:
-----------------------------------

        Summary: [tree2] Selected node is lost when navigating to another page  (was: Tree2 in ClientSide the selected node is lost when navigating to another page)
    Fix Version:     (was: Nightly Build)

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "Mathias Werlitz (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12319986 ] 

Mathias Werlitz commented on MYFACES-438:
-----------------------------------------

#1 If we just persist the selected node with the component this part of the component state is lost, when the same model is used with another component ... as it is the case when opening another page. If the user supplies a session scoped TreeModel the state including the selected node can be reused.

#2 This idea came to my mind because if the tree2 is used in client mode we use cookies to store the state of the component first on the client and then sync the server state with it. Because of this the user does not have to provide a session scoped model and the expand/collapse state still can/must be restored from the cookie if another page is opend. Storing the selected node as well in a cookie would free the user in client mode from providing a session scoped TreeModel (incl. TreeState). Otherwise he would have to like in #1.


Anyway in my point of view the current TreeModel and TreeState is not thread-save (but has to be when used in session scope) ... we should note that. But this is another issue ...

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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] Closed: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
     [ http://issues.apache.org/jira/browse/MYFACES-438?page=all ]
     
sean schofield closed MYFACES-438:
----------------------------------

    Fix Version: Nightly
     Resolution: Fixed

If  this issue hasn't been fixed already, it should be fixed with the latest change.  Selected state is now stored in the component like the expand/collapse state.

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.0
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield
>      Fix For: Nightly

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "sean schofield (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12319961 ] 

sean schofield commented on MYFACES-438:
----------------------------------------

@Mathias,

I like option#1 (that was my long term plan for TreeState.)  Why couldn't we just persist the selected node(s) with the component?  We're already doing this for the expand info.  I don't understand why a cookie would be needed.

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "Marius Kreis (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12357114 ] 

Marius Kreis commented on MYFACES-438:
--------------------------------------

I think this issue is resolved in at least 1.1.1RC3. 

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.0
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "Mathias Werlitz (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12320046 ] 

Mathias Werlitz commented on MYFACES-438:
-----------------------------------------

Thinking more about the problem because I now hav a similar issue with my application a have a new idea:

we should implement #1

and extend the preserveToggle function of tree2 to server mode as well in the following way:
1. if the TreeState is transient and preserveToggle is true than save the sate in the requestMap with the id of the tree
at the end of decode()
2. try to restore the TreeState from request in encodeBegin if there is on for the id of the tree and preserveToggle is true

This would free the user from a session scoped TreeState, allows to preserve the toogle also in server mode and makes #2 of the previous comments unnecessary

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) Tree2 in ClientSide the selected node is lost when navigating to another page

Posted by "Mathias Werlitz (JIRA)" <my...@incubator.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12319702 ] 

Mathias Werlitz commented on MYFACES-438:
-----------------------------------------

1. On possible soultion would be to move the _selectedNodeId field in HtmlTree to the TreeState. That would save the selected node along with the TreeState.
This issue is not only related to client-side toggle.
But that would not solve the problem immediatly. The user would have to provide a session-scoped TreeModel to have the state including the selected node restored also in another page.

2. Second idea would include the selected node in a cookie, that can be restored.

3. We could also reenable the old commented out behaviour of HtmlTree (decode and encodeBegin) to store the state additionally in the session if the user has preserveToggle enabled ... but somehow i dislike this solution


Maybe a comination of 1) and 2) is the right way?

> Tree2 in ClientSide the selected node is lost when navigating to another page
> -----------------------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: Nightly Build
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield
>      Fix For: Nightly Build

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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: (MYFACES-438) [tree2] Selected node is lost when navigating to another page

Posted by "sean schofield (JIRA)" <de...@myfaces.apache.org>.
    [ http://issues.apache.org/jira/browse/MYFACES-438?page=comments#action_12357168 ] 

sean schofield commented on MYFACES-438:
----------------------------------------

I will close the issue then unless someone can verify that the bug still exists.

> [tree2] Selected node is lost when navigating to another page
> -------------------------------------------------------------
>
>          Key: MYFACES-438
>          URL: http://issues.apache.org/jira/browse/MYFACES-438
>      Project: MyFaces
>         Type: Bug
>   Components: Tomahawk
>     Versions: 1.1.0
>  Environment: Window 2000 pro, JSF, Sun RI, Nightly Build 09-Aug-2005
>     Reporter: Marc Vandeloise
>     Assignee: sean schofield

>
> I have the  preserveToggle=true   which is supposed to keep the state
> of the tree2 navigator when openning another page... but it always
> collapse...
> The issue still persist with Nightly Build 19-Aug-2005
> From: Sean Schofield <se...@gmail.com>
> ---
> There was a recent change to tree2 that may have broken this feature.
> Are you using a recent (with 7-10 days) version of the source code?
> If so, then please file a JIRA issue.  This is most likely a bug that
> was introduced by the new TreeModel and TreeState interfaces.
> sean
> -------

-- 
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