Skip to content
This repository has been archived by the owner on Mar 20, 2021. It is now read-only.

Commit

Permalink
Fix #4249 rendered resource dependencies should be remembered during an
Browse files Browse the repository at this point in the history
ajax request (otherwise ResourceHandler#isResourceRendered() falsely
returns false when it was true before change of view)

Conflicts:
	jsf-ri/src/main/java/com/sun/faces/util/RequestStateManager.java
  • Loading branch information
Bauke Scholtz authored and arjantijms committed Sep 9, 2017
1 parent 8ddc5f2 commit fdbd1c2
Showing 1 changed file with 6 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@

import javax.faces.application.ResourceHandler;
import javax.faces.context.FacesContext;
import javax.faces.context.PartialViewContext;

import com.sun.faces.RIConstants;

Expand Down Expand Up @@ -183,7 +184,6 @@ public class RequestStateManager {
private static final String[] ATTRIBUTES_TO_CLEAR_ON_CHANGE_OF_VIEW = {
SCRIPT_STATE,
PROCESSED_RESOURCE_DEPENDENCIES,
RENDERED_RESOURCE_DEPENDENCIES,
PROCESSED_RADIO_BUTTON_GROUPS
};

Expand Down Expand Up @@ -276,6 +276,11 @@ public static void clearAttributesOnChangeOfView(FacesContext ctx) {
attrs.remove(key);
}

PartialViewContext pvc = ctx.getPartialViewContext();

if (!pvc.isAjaxRequest() || pvc.isRenderAll()) {
attrs.remove(RENDERED_RESOURCE_DEPENDENCIES);
}
}


Expand Down

0 comments on commit fdbd1c2

Please sign in to comment.