From 5b0cf929da452b44dee77393409f3cce12d735b3 Mon Sep 17 00:00:00 2001 From: Rossen Stoyanchev Date: Thu, 30 Jun 2011 09:47:13 +0000 Subject: [PATCH] SWF-1461 NPE when rendering a JSF view as part of non-webflow request. --- .../springframework/faces/webflow/FlowViewStateManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowViewStateManager.java b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowViewStateManager.java index a0490807..fc2fa4e7 100644 --- a/spring-faces/src/main/java/org/springframework/faces/webflow/FlowViewStateManager.java +++ b/spring-faces/src/main/java/org/springframework/faces/webflow/FlowViewStateManager.java @@ -166,8 +166,11 @@ public class FlowViewStateManager extends StateManager { if (context.getViewRoot().isTransient()) { return null; } + if (!JsfUtils.isFlowRequest()) { + return delegate.saveView(context); + } FlowSerializedView view = null; - if ((!JsfUtils.isFlowRequest()) || JsfRuntimeInformation.isPartialStateSavingSupported()) { + if (JsfRuntimeInformation.isPartialStateSavingSupported()) { Object[] state = (Object[]) delegate.saveView(context); view = new FlowSerializedView(context.getViewRoot().getViewId(), state[0], state[1]); } else {