You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Rene O (Created) (JIRA)" <de...@myfaces.apache.org> on 2012/01/27 13:35:38 UTC

[jira] [Created] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

[myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
-------------------------------------------------------------------------------------------------------------------

                 Key: MYFACES-3455
                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.1.6-SNAPSHOT
            Reporter: Rene O
            Priority: Blocker


If you click the ajaxified commandButton the ui:include switches. 
After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.

A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5

http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Leonardo Uribe (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197914#comment-13197914 ] 

Leonardo Uribe commented on MYFACES-3455:
-----------------------------------------

I checked the problem and it is caused because when f:facet contains more than one child, facelets algorithm create a panel that is not backed by any facelet tag, but it has ComponentSupport.FACET_CREATED_UIPANEL_MARKER to recognize it. Since it does not have ComponentSupport.MARK_CREATED associated, that panel is marked to remove, but it should note.

The fix is just check that case on PostAddPreRemoveFromViewListener. It took me some time to figure it out, but now it should work.

Thanks a lot for the test and the interest to check these cases, it is a very valuable contribution.
                
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war, jsftest2.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Leonardo Uribe (Resolved) (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3455.
-------------------------------------

    Resolution: Fixed
    
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war, jsftest2.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Reopened] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Rene O (Reopened) (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Rene O reopened MYFACES-3455:
-----------------------------


There is another problem:
If you use a component like a h:datatable with a <f:facet name="header"> and have there a link to dynamic switch the include 
and another child, then the switching doesn't work as expected. It only works, if you have only one child in f:facet.
Note, that this issue doesn't occur with myfaces-2.1.5

A new testcase is attached. To reproduce this issue open http://localhost:8080/jsftest2/newnavtest.jsf and click the button a few times to see what happens.
                
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war, jsftest2.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Issue Comment Edited] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Leonardo Uribe (Issue Comment Edited) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13197914#comment-13197914 ] 

Leonardo Uribe edited comment on MYFACES-3455 at 2/1/12 3:51 PM:
-----------------------------------------------------------------

I checked the problem and it is caused because when f:facet contains more than one child, facelets algorithm create a panel that is not backed by any facelet tag, but it has ComponentSupport.FACET_CREATED_UIPANEL_MARKER to recognize it. Since it does not have ComponentSupport.MARK_CREATED associated, that panel is marked to remove, but it should not.

The fix is just check that case on PostAddPreRemoveFromViewListener. It took me some time to figure it out, but now it should work.

Thanks a lot for the test and the interest to check these cases, it is a very valuable contribution.
                
      was (Author: lu4242):
    I checked the problem and it is caused because when f:facet contains more than one child, facelets algorithm create a panel that is not backed by any facelet tag, but it has ComponentSupport.FACET_CREATED_UIPANEL_MARKER to recognize it. Since it does not have ComponentSupport.MARK_CREATED associated, that panel is marked to remove, but it should note.

The fix is just check that case on PostAddPreRemoveFromViewListener. It took me some time to figure it out, but now it should work.

Thanks a lot for the test and the interest to check these cases, it is a very valuable contribution.
                  
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war, jsftest2.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Resolved] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Leonardo Uribe (Resolved) (JIRA)" <de...@myfaces.apache.org>.
     [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Leonardo Uribe resolved MYFACES-3455.
-------------------------------------

       Resolution: Fixed
    Fix Version/s:     (was: 2.1.6-SNAPSHOT)
                   2.1.6
                   2.0.12
         Assignee: Leonardo Uribe

I checked the code and the problem was caused because PostAddPreRemoveFromViewListener marked components to be removed. On a later request, the button is removed, so the event is not triggered and the view is not updated. The solution is just do not add to clientId removed list components backed by facelets algorithm and add them when preserve state is enabled. 

Thanks a lot for the test case. It helps a lot.
                
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

[jira] [Commented] (MYFACES-3455) [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore

Posted by "Rene O (Commented) (JIRA)" <de...@myfaces.apache.org>.
    [ https://issues.apache.org/jira/browse/MYFACES-3455?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13198604#comment-13198604 ] 

Rene O commented on MYFACES-3455:
---------------------------------

I have test the new fix and now it works as expected. Thanks for fixing this so fast.
                
> [myfaces-2.1.6-SNAPSHOT] Using f:ajax within h:commandButton to dynamic switch ui:include works not correct anymore
> -------------------------------------------------------------------------------------------------------------------
>
>                 Key: MYFACES-3455
>                 URL: https://issues.apache.org/jira/browse/MYFACES-3455
>             Project: MyFaces Core
>          Issue Type: Bug
>    Affects Versions: 2.1.6-SNAPSHOT
>            Reporter: Rene O
>            Assignee: Leonardo Uribe
>            Priority: Blocker
>             Fix For: 2.0.12, 2.1.6
>
>         Attachments: jsftest.war, jsftest2.war
>
>
> If you click the ajaxified commandButton the ui:include switches. 
> After a few clicks, the switch doesn't work correct anymore. You must click twice to switch the include, which is a bug.
> A testcase to reproduce this issue is attached. Note, that this issue doesn't appear within myfaces 2.1.5
> http://localhost:8080/jsftest/navtest.jsf

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira