Hi, after SWF 2.0.6 update I received a problem. When I try to download file from my application at the first request I receive my file, but every second request execute reload of application's page. I tried to debug and I found, that second request do not execute user's task, and only reload page, because some variables remained in scope and launch rerendering. As I understand fixing SWF-1089 solve this problem, but as a temporary decision, I created
and registered it asCode:public class FixResponseCompleteExecutionListener extends FlowExecutionListenerAdapter{ @Override public void requestProcessed(RequestContext context) { if (context.getExternalContext().isResponseComplete()){ context.getFlashScope().remove("flowRenderResponse"); } } }
Code:<webflow:flow-executor id="flowExecutor" flow-registry="flowRegistry"> <webflow:flow-execution-listeners> ... <webflow:listener ref="fixResponseCompleteExecutionListener" /> ... </webflow:flow-execution-listeners> </webflow:flow-executor> <bean id="fixResponseCompleteExecutionListener" class="web.listener.FixResponseCompleteExecutionListener"/>
flowRenderResponse - name of one of boolean variables which are responsible for executing user's operation or executing rerendering. I stole it from org.springframework.faces.webflow.FlowFacesContext .


Reply With Quote
