[jira] [Commented] (MYFACES-4120) ResourceHandler#markResourceRendered() should be retained during ajax rebuild
[ https://issues.apache.org/jira/browse/MYFACES-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16043591#comment-16043591 ] Leonardo Uribe commented on MYFACES-4120: - I'm thinking on the side effect of not render resources inside tag content. Suppose an stylesheet. If the stylesheed is not inside tag after render all, the view will not be rendered properly. What I mean is javascript resources are preserved BUT stylesheet resources aren't if they are not bound to the DOM tree. > 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 >Assignee: Leonardo Uribe > > 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. > In MyFaces 2.2 (and possibly earlier) the behavior of markResourceRendered() > and isResourceRendered() was internally correctly implemented via > org.apache.myfaces.RENDERED_SCRIPT_RESOURCES_SET context attribute. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4120) ResourceHandler#markResourceRendered() should be retained during ajax rebuild
[ https://issues.apache.org/jira/browse/MYFACES-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16042808#comment-16042808 ] Bauke Scholtz commented on MYFACES-4120: The problem is not in JavaScript side. It does it all correct. The problem is in JSF side, it is not "in sync" with JavaScript side. The isResourceRendered() incorrectly returns false while the resource is rendered in JavaScript side. And, you got the isRenderAll() backwards. I didn't mean when it returns true but when it returns false. I.e. there's no renderAll. > 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 >Assignee: Leonardo Uribe > > 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. > In MyFaces 2.2 (and possibly earlier) the behavior of markResourceRendered() > and isResourceRendered() was internally correctly implemented via > org.apache.myfaces.RENDERED_SCRIPT_RESOURCES_SET context attribute. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4120) ResourceHandler#markResourceRendered() should be retained during ajax rebuild
[ https://issues.apache.org/jira/browse/MYFACES-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16042163#comment-16042163 ] Leonardo Uribe commented on MYFACES-4120: - I checked the code and how it is handled this case on the javascript side and the whole head tag is replaced, so anyway if we keep track of the resources added in a facesContext map, it will be pointless, because the partial response from the server will be the same. I'll close this issue as not a problem. Please reopen it again if you thing there is something I'm missing in the resolution. Thanks Bauke for the report. > 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. > In MyFaces 2.2 (and possibly earlier) the behavior of markResourceRendered() > and isResourceRendered() was internally correctly implemented via > org.apache.myfaces.RENDERED_SCRIPT_RESOURCES_SET context attribute. -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (MYFACES-4120) ResourceHandler#markResourceRendered() should be retained during ajax rebuild
[ https://issues.apache.org/jira/browse/MYFACES-4120?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16041799#comment-16041799 ] Leonardo Uribe commented on MYFACES-4120: - But if isRenderAll() renders the whole view including replace all content inside tag, right? Even if isResourceRendered() return true, the whole view will be replaced. It doesn't sound like a bug to me, or am I missing something? > 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. > In MyFaces 2.2 (and possibly earlier) the behavior of markResourceRendered() > and isResourceRendered() was internally correctly implemented via > org.apache.myfaces.RENDERED_SCRIPT_RESOURCES_SET context attribute. -- This message was sent by Atlassian JIRA (v6.3.15#6346)