You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@myfaces.apache.org by "Bauke Scholtz (JIRA)" <de...@myfaces.apache.org> on 2017/05/28 15:54:06 UTC

[jira] [Created] (MYFACES-4120) ResourceHandler#markResourceRendered() should be retained during ajax rebuild

Bauke Scholtz created MYFACES-4120:
--------------------------------------

             Summary: ResourceHandler#markResourceRendered() should be retained during ajax rebuild
                 Key: MYFACES-4120
                 URL: https://issues.apache.org/jira/browse/MYFACES-4120
             Project: MyFaces Core
          Issue Type: Bug
    Affects Versions: 2.3.0
         Environment: TomEE 7.0.3 with MyFaces 2.3.0-SNAPSHOT
            Reporter: Bauke Scholtz


While running OmniFaces IT suite on today's MyFaces 2.3.0-SNAPSHOT, I noticed a bug in ResourceHandler#isResourceRendered() during an ajax navigation back to the same view (more specifically, when FacesContext#setViewRoot() is invoked with a new UIViewRoot of same viewId during an ajax postback). 

During restore view phase, all already-rendered resources are correctly marked via markResourceRendered(). However, this is in turn stored as a transient UIViewRoot attribute. As a consequence, when the UIViewRoot gets changed during the very same ajax request, they are all lost, causing isResourceRendered() to incorrectly return false.

Basically, the markResourceRendered() of the previous view should be remembered for the next view when PartialViewContext#isAjaxRequest() returns true and isRenderAll() returns false.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)