Skip to content

Commit

Permalink
PBR-468 Remove fixes when StateContext AddRemoveListener is no longer…
Browse files Browse the repository at this point in the history
… retained on UIViewRoot
  • Loading branch information
kenfinnigan committed Jun 7, 2013
1 parent ef01fa8 commit 3ab1275
Showing 1 changed file with 0 additions and 25 deletions.
Expand Up @@ -454,31 +454,6 @@ protected void encodeMarkupResponse(BridgeContext bridgeContext, FacesContext fa
}
}

// ***** TO BE REMOVED AS PART OF PBR-468 WHEN JSF IMPL FIX AVAILABLE *******
// START
// Remove StateContext from FacesContext to prevent issues with Dynamic Actions being retained between Renders
facesContext.getAttributes().remove(StateContext.class.getName() + "_KEY");

// Unregister PostAddToViewEvent listener if it's StateContext.AddRemoveListener
List<SystemEventListener> postAddListeners = facesContext.getViewRoot().getViewListenersForEventClass(PostAddToViewEvent.class);
if (null != postAddListeners && !postAddListeners.isEmpty()) {
for (SystemEventListener listener : postAddListeners) {
if (listener instanceof AddRemoveListener) {
facesContext.getViewRoot().unsubscribeFromViewEvent(PostAddToViewEvent.class, listener);
}
}
}
// Unregister PreRemoveFromViewEvent listener if it's StateContext.AddRemoveListener
List<SystemEventListener> preRemoveListeners = facesContext.getViewRoot().getViewListenersForEventClass(PreRemoveFromViewEvent.class);
if (null != preRemoveListeners && !preRemoveListeners.isEmpty()) {
for (SystemEventListener listener : preRemoveListeners) {
if (listener instanceof AddRemoveListener) {
facesContext.getViewRoot().unsubscribeFromViewEvent(PreRemoveFromViewEvent.class, listener);
}
}
}
// END

saveFacesView(scope, facesContext);

if (Bridge.PortletPhase.RESOURCE_PHASE == bridgeContext.getPortletRequestPhase()) {
Expand Down

0 comments on commit 3ab1275

Please sign in to comment.