Announcement Announcement Module
Collapse
No announcement yet.
facesContext.setViewRoot(..) should be called in FlowViewStateManager.restoreView(..) Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • facesContext.setViewRoot(..) should be called in FlowViewStateManager.restoreView(..)

    Hi,

    I think there is a bug in FlowViewStateManager.restoreView().
    After
    Code:
    UIViewRoot viewRoot = restoreTreeStructure(context, viewId, renderKitId);
    ther should be the call
    Code:
    facesContext.setViewRoot (uiViewRoot);
    just like in MyFaces' JSPStateManagerImpl.java:417.

    I got the following error with MyFaces 2 beta 2 and WebFlow 2.0.8.RELEASE:
    Code:
    java.lang.NullPointerException
    	at javax.faces.component.UIComponentBase.getRenderer(UIComponentBase.java:1038)
    	at org.apache.myfaces.component.html.ext.HtmlDataTableHack.getClientId(HtmlDataTableHack.java:111)
    	at org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.getClientId(AbstractHtmlDataTable.java:135)
    	at org.apache.myfaces.component.html.ext.HtmlDataTableHack.setRowIndex(HtmlDataTableHack.java:275)
    	at org.apache.myfaces.component.html.ext.AbstractHtmlDataTable.setRowIndex(AbstractHtmlDataTable.java:276)
    	at javax.faces.component.UIData.visitTree(UIData.java:1257)
    	at javax.faces.component.UIComponent.visitTree(UIComponent.java:764)
    	at javax.faces.component.UIComponent.visitTree(UIComponent.java:764)
    	at javax.faces.component.UIViewRoot.processRestoreState(UIViewRoot.java:643)
    	at org.springframework.faces.webflow.FlowViewStateManager.restoreComponentState(FlowViewStateManager.java:77)
    	at org.springframework.faces.webflow.FlowViewStateManager.restoreView(FlowViewStateManager.java:159)
    	at org.apache.myfaces.shared_impl.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
    	at org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:240)
    	at com.sun.facelets.FaceletViewHandler.restoreView(FaceletViewHandler.java:316)
    	at org.springframework.faces.webflow.FlowViewHandler.restoreFlowView(FlowViewHandler.java:128)
    	at org.springframework.faces.webflow.FlowViewHandler.restoreView(FlowViewHandler.java:75)
    	at org.springframework.faces.webflow.JsfViewFactory.getView(JsfViewFactory.java:93)
    	at org.springframework.webflow.engine.ViewState.resume(ViewState.java:193)
    	at org.springframework.webflow.engine.Flow.resume(Flow.java:545)
    	at org.springframework.webflow.engine.impl.FlowExecutionImpl.resume(FlowExecutionImpl.java:259)
    	at org.springframework.webflow.executor.FlowExecutorImpl.resumeExecution(FlowExecutorImpl.java:163)
    	at org.springframework.webflow.mvc.servlet.FlowHandlerAdapter.handle(FlowHandlerAdapter.java:183)
    	at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:771)
    	at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:716)
    	at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:647)
    	at org.springframework.web.servlet.FrameworkServlet.doPost(FrameworkServlet.java:563)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:710)
    	at javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:341)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:343)
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.invoke(FilterSecurityInterceptor.java:109)
    	at org.springframework.security.web.access.intercept.FilterSecurityInterceptor.doFilter(FilterSecurityInterceptor.java:83)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:97)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:78)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:54)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:35)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilter(BasicAuthenticationFilter.java:177)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:188)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:105)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.context.SecurityContextPersistenceFilter.doFilter(SecurityContextPersistenceFilter.java:79)
    	at org.springframework.security.web.FilterChainProxy$VirtualFilterChain.doFilter(FilterChainProxy.java:355)
    	at org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:149)
    	at org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:237)
    	at org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:167)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at main.util.RendererFilter.doFilter(RendererFilter.java:103)
    	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
    	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
    	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
    	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
    	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
    	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
    	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
    	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
    	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
    	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
    	at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
    	at java.lang.Thread.run(Unknown Source)
    Could this be done?

  • #2
    Uhm... Hello?

    Comment


    • #3
      You may have better luck posting this bug on the SWF JIRA.

      Comment


      • #4
        I did so and it has already been accepted

        Comment

        Working...
        X