You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Alexander Yerenkow (JIRA)" <de...@myfaces.apache.org> on 2010/02/20 21:06:28 UTC

[jira] Created: (TOMAHAWK-1492) Client-side expansion didn't restored after user again view page

Client-side expansion didn't restored after user again view page
----------------------------------------------------------------

                 Key: TOMAHAWK-1492
                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1492
             Project: MyFaces Tomahawk
          Issue Type: Bug
          Components: Tree2
    Affects Versions: 1.1.9
            Reporter: Alexander Yerenkow


The client-side tree2 uses cookie to expand/collapse tree, and it works.
However, the cookie content is ignored when user came to page again.

Steps to reproduce:

1. Open example page here: http://www.irian.at/myfacesexamples/tree2.jsf
2. Expand Top tree, any depth
3. Place cursor to browser's address bar, press enter (simple refresh are intercepted by ajax or  some cache)
4. After page loads, Cookie present, but top-menu isn't expanded. This is bug. You can see that cookie still there by expanding bottom Tree, after response - the top Tree will get saved state.

Another side-effects:
reproduce all to step 3. After this you can expand Top tree, and it will behave as fully-closed. You can expand it deeper and deeper, you can close some branches. 
But cookie isn't contains new state - it contains super-position of old state and new changes. This can be confirmed by Expanding bottom menu.

Simplier explanation:
1. Expand in top Tree2 "Inbox (2) ", "Frank Foo", "Requires Foo Reviewer (3)", "Requires Foo Approval (6)"
2. Hard-refresh
3. Expand in top Tree2 "Inbox (2)", "Frank Foo", (here you can see that what we opens in step 1 is now closed); expand "Requires Foo Reviewer (3)", close "Requires Foo Reviewer (3)"
4. Hard-refresh
5. Expand Bottom Tree
6. Top Tree Will get expanded "Inbox (2) ", "Frank Foo", "Requires Foo Reviewer (3)", "Requires Foo Approval (6)".  "Requires Foo Reviewer (3)" will be closed (we close it, remember).


Expected Behaviour:
1. After user came again to page, client-side Tree must show it's previous state - it must restore it from cookie.
2. Optional:  Add parameter to tree2: resetStateAtView. If set to true, then when user came to view page, cookie are erased and tree will get correct closed state.




-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


[jira] Commented: (TOMAHAWK-1492) Client-side expansion didn't restored after user again view page

Posted by "Alexander Yerenkow (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/TOMAHAWK-1492?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12836366#action_12836366 ] 

Alexander Yerenkow commented on TOMAHAWK-1492:
----------------------------------------------

Here's workaround, if anyone in need: 

Create empty method in your Bean, similar to this: 
public void emptyAction() 
{ 
} 

Then, in jsp place a button which calls this method: 

<a4j:commandButton value="ReRender Tree" action="#{SBean.emptyAction}" reRender="tree"/> 

<h:panelGroup id="tree"> 
/// your tree2 is placed here 
</h:panelGroup> 

In my tests, when I came to page, tree2 is fully closed; but after I press button - Tree expands to it's saved state.

> Client-side expansion didn't restored after user again view page
> ----------------------------------------------------------------
>
>                 Key: TOMAHAWK-1492
>                 URL: https://issues.apache.org/jira/browse/TOMAHAWK-1492
>             Project: MyFaces Tomahawk
>          Issue Type: Bug
>          Components: Tree2
>    Affects Versions: 1.1.9
>            Reporter: Alexander Yerenkow
>
> The client-side tree2 uses cookie to expand/collapse tree, and it works.
> However, the cookie content is ignored when user came to page again.
> Steps to reproduce:
> 1. Open example page here: http://www.irian.at/myfacesexamples/tree2.jsf
> 2. Expand Top tree, any depth
> 3. Place cursor to browser's address bar, press enter (simple refresh are intercepted by ajax or  some cache)
> 4. After page loads, Cookie present, but top-menu isn't expanded. This is bug. You can see that cookie still there by expanding bottom Tree, after response - the top Tree will get saved state.
> Another side-effects:
> reproduce all to step 3. After this you can expand Top tree, and it will behave as fully-closed. You can expand it deeper and deeper, you can close some branches. 
> But cookie isn't contains new state - it contains super-position of old state and new changes. This can be confirmed by Expanding bottom menu.
> Simplier explanation:
> 1. Expand in top Tree2 "Inbox (2) ", "Frank Foo", "Requires Foo Reviewer (3)", "Requires Foo Approval (6)"
> 2. Hard-refresh
> 3. Expand in top Tree2 "Inbox (2)", "Frank Foo", (here you can see that what we opens in step 1 is now closed); expand "Requires Foo Reviewer (3)", close "Requires Foo Reviewer (3)"
> 4. Hard-refresh
> 5. Expand Bottom Tree
> 6. Top Tree Will get expanded "Inbox (2) ", "Frank Foo", "Requires Foo Reviewer (3)", "Requires Foo Approval (6)".  "Requires Foo Reviewer (3)" will be closed (we close it, remember).
> Expected Behaviour:
> 1. After user came again to page, client-side Tree must show it's previous state - it must restore it from cookie.
> 2. Optional:  Add parameter to tree2: resetStateAtView. If set to true, then when user came to view page, cookie are erased and tree will get correct closed state.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.