Announcement Announcement Module
Collapse
No announcement yet.
Spring Web Flow 2.3.0 Release Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Spring Web Flow 2.3.0 Release

    Dear Web Flow users-

    The latest of the series of 2.x releases is now available for download. You can read the official announcement:

    http://www.springsource.org/node/3044

    If you're currently using Web Flow 2.2 (or 2.1) upgrading to 2.3 is recommended to pick up all the fixes it contains.

    Rossen

  • #2
    the current xsd on http://www.springframework.org/schem...ebflow-2.0.xsd which is in documentation does not have the "validator" elements.

    Thanks

    Comment


    • #3
      I think you're looking for spring-webflow-config.xsd rather than spring-webflow.xsd.

      You can use:
      Code:
      <?xml version="1.0" encoding="UTF-8"?>
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:webflow="http://www.springframework.org/schema/webflow-config"
             xsi:schemaLocation="
                 http://www.springframework.org/schema/beans
                 http://www.springframework.org/schema/beans/spring-beans.xsd
                 http://www.springframework.org/schema/webflow-config
                 http://www.springframework.org/schema/webflow-config/spring-webflow-config.xsd">
      
        ...
      
      </beans>
      That said the documentation does have references to 2.0 versions of the xsd that need to be updated. Would you mind opening a ticket in JIRA?

      Comment


      • #4
        https://jira.springsource.org/browse/SWF-1456 -- thanks.

        Comment


        • #5
          Spring Web Flow-Tiles Issues

          Hi...We are working on integrating Spring Web Flow & tiles,but we didn't found any sample application or guide for integrating spring web flow-tiles.Please provide any guide or sample application of Spring web flow-Tiles integrated.The Example application of Spring MVC faces Portlet has spring-tiles integration, but we couldn't understand the flow of the application.Can anyone help us in this?.

          Comment


          • #6
            Hi Rossen,

            I am having a hard time getting the embedded flow to work with the booking-faces example, however it works like a charm in the webflow-primefaces-showcase example. When I tried it with the webflow-primefaces-showcase example, there is no redirect and execution parameter remains the same and I get a partial-response, however with booking-faces example, embedded-flow is redirected instead of a partial response.

            I am not really sure what's wrong here? It would be really great if you could help..

            Thanks,
            Vijay

            Comment


            • #7
              Check the view configured on the end state. I think the booking-faces does a redirect while the showcase points to a view to render in place.

              Comment


              • #8
                Hi Rossen,

                Thanks for your reply, there is no endstate in the subflow I have defined ( almost replicating) from the showcase example.

                I am trying to build a popup window using p:dialog and the subflow is embedded (which I will make a generic screen for popup) replacing the the panel within dialog with the one from the subflow.

                I am totally clueless why this isn't working, please let me know if you think something is wrong.

                main-flow
                HTML Code:
                <?xml version="1.0" encoding="UTF-8"?>
                <flow xmlns="http://www.springframework.org/schema/webflow"
                	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                	xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
                
                	<view-state id="main">
                		<transition on="start" to="embedded-flow" />
                	</view-state>
                
                	<subflow-state id="embedded-flow" subflow="embedded-flow">
                		<input name="mode" value="'embedded'" />
                	</subflow-state>
                
                </flow>
                main.xhtml in top flow

                HTML Code:
                <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                	    		xmlns:ui="http://java.sun.com/jsf/facelets"
                	  			xmlns:h="http://java.sun.com/jsf/html"
                	  			xmlns:f="http://java.sun.com/jsf/core"
                	  			xmlns:p="http://primefaces.prime.com.tr/ui"
                				template="/WEB-INF/layouts/standard.xhtml">
                
                <ui:define name="title">Top Flow Container</ui:define>
                
                <ui:define name="notes">
                	
                </ui:define>
                
                <ui:define name="content">
                	
                	<div class="span-12 colborder">
                		<h3>Embedded Sub-Flow Area</h3>
                	
                		<h:form id="form">
                			<p:dialog widgetVar="panelPopupDialog" modal="false" height="500" width="900">
                				<p:outputPanel id="panelPopupContent">
                				</p:outputPanel>
                			</p:dialog>
                
                			
                			<p:commandButton action="start" update="form:panelPopupContent" ajax="true" process="@form"
                				oncomplete="panelPopupDialog.show()" image="iconSearch" title="search" value="Show Popup"/>
                				
                		</h:form>
                	</div>
                	<hr/>
                </ui:define>
                
                </ui:composition>
                embedded-flow
                HTML Code:
                <flow xmlns="http://www.springframework.org/schema/webflow" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
                	xsi:schemaLocation="http://www.springframework.org/schema/webflow http://www.springframework.org/schema/webflow/spring-webflow-2.0.xsd">
                	
                	<view-state id="main"/>
                
                </flow>
                main.xhtml inside subflow

                HTML Code:
                <!DOCTYPE composition PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
                <ui:composition xmlns="http://www.w3.org/1999/xhtml"
                	    		xmlns:ui="http://java.sun.com/jsf/facelets"
                	  			xmlns:h="http://java.sun.com/jsf/html"
                	  			xmlns:f="http://java.sun.com/jsf/core"
                	  			xmlns:p="http://primefaces.prime.com.tr/ui"
                				template="/WEB-INF/layouts/standard.xhtml">
                
                <ui:define name="title">Embedded Flow: User Details</ui:define>
                
                <ui:define name="notes">
                	<hr/>
                </ui:define>
                
                <ui:define name="content">
                	<h:form id="form">
                			<p:panel id="panelPopupContent">
                				<h1>blah blah blah</h1>			
                			</p:panel>			
                	</h:form>
                </ui:define>
                
                </ui:composition>
                Thanks,
                Vijay

                Comment


                • #9
                  Nothing obvious that I can see as an issue. I recommend checking the log output from Web Flow at DEBUG level as well as inspecting the requests with some tool to see the exact response from the server. Logically you should see an Ajax request, followed by a transition to the subflow state, and then partial rendering. You can also start with the showcase and add another use case to it modifying it step-by-step.

                  Comment


                  • #10
                    Hi Rossen,

                    Thanks for your reply.

                    I am not getting <partial-response> as expected in the booking-faces example so I think its following POST-REDIRECT-GET cycle. I am totally clueless why, but then the logs are showing this output. I have put both the logs for booking faces and showcase example for comparison. I am getting <partial-response> to my ajax request with showcase example so that's the reason its working with partial rendering as expected.

                    booking faces

                    Code:
                    DEBUG: org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'Spring MVC Dispatcher Servlet' processing POST request for [/swf-booking-faces/spring/main]
                    DEBUG: org.springframework.webflow.mvc.servlet.FlowHandlerMapping - Mapping request with URI '/swf-booking-faces/spring/main' to flow with id 'main'
                    DEBUG: org.springframework.webflow.executor.FlowExecutorImpl - Resuming flow execution with key 'e2s1
                    DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Locking conversation 2
                    DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Getting flow execution with key 'e2s1'
                    DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'main'
                    DEBUG: org.springframework.webflow.execution.factory.ConditionalFlowExecutionListenerLoader - Loaded [2] of possible 2 listeners for this execution request for flow 'main', the listeners to attach are list[org.springframework.faces.webflow.FlowFacesContextLifecycleListener@6bc73b, org.springframework.webflow.security.SecurityFlowExecutionListener@1e5052b]
                    DEBUG: org.springframework.webflow.engine.impl.FlowExecutionImpl - Resuming in [email protected]1
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: RESTORE_VIEW 1
                    DEBUG: org.springframework.faces.webflow.JsfViewFactory - UIViewRoot restored for 'main.xhtml'
                    DEBUG: org.springframework.faces.webflow.FlowLifecycle - Executing view post back lifecycle
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: APPLY_REQUEST_VALUES 2
                    DEBUG: org.springframework.faces.webflow.FlowLifecycle - Processing decodes
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: PROCESS_VALIDATIONS 3
                    DEBUG: org.springframework.faces.webflow.FlowLifecycle - Processing validators
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: UPDATE_MODEL_VALUES 4
                    DEBUG: org.springframework.faces.webflow.FlowLifecycle - Processing model updates
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: INVOKE_APPLICATION 5
                    DEBUG: org.springframework.faces.webflow.FlowLifecycle - Processing application
                    DEBUG: org.springframework.faces.webflow.FlowActionListener - Invoking action [email protected]d5
                    DEBUG: org.springframework.faces.webflow.FlowActionListener - Event 'start' detected
                    DEBUG: org.springframework.webflow.engine.ViewState - Event 'start' returned from view [JSFView = '/WEB-INF/flows/main/main.xhtml']
                    DEBUG: org.springframework.webflow.engine.Transition - Executing [Transition@2b7632 on = start, to = embedded-flow]
                    DEBUG: org.springframework.webflow.engine.Transition - Exiting state 'main'
                    DEBUG: org.springframework.faces.webflow.FlowViewStateManager - Saving view root '/WEB-INF/flows/main/main.xhtml' in view scope
                    DEBUG: org.springframework.webflow.engine.SubflowState - Entering state 'embedded-flow' of flow 'main'
                    DEBUG: org.springframework.binding.mapping.impl.DefaultMapper - Beginning mapping between source [org.springframework.webflow.engine.impl.RequestControlContextImpl] and target [org.springframework.webflow.core.collection.LocalAttributeMap]
                    DEBUG: org.springframework.binding.mapping.impl.DefaultMapping - Adding mapping result [Success@15b24dd mapping = 'embedded' -> mode, code = 'success', error = false, originalValue = 'embedded', mappedValue = 'embedded']
                    DEBUG: org.springframework.binding.mapping.impl.DefaultMapper - Completing mapping between source [org.springframework.webflow.engine.impl.RequestControlContextImpl] and target [org.springframework.webflow.core.collection.LocalAttributeMap]; total mappings = 1; total errors = 0
                    DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'embedded-flow'
                    DEBUG: org.springframework.webflow.engine.SubflowState - Calling subflow 'embedded-flow' with input map['mode' -> 'embedded']
                    DEBUG: org.springframework.webflow.engine.ViewState - Entering state 'main' of flow 'embedded-flow'
                    DEBUG: org.springframework.webflow.engine.impl.FlowExecutionImpl - Assigned key e2s2
                    DEBUG: org.springframework.webflow.engine.Transition - Completed transition execution.  As a result, the new state is 'main' in flow 'embedded-flow'
                    DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Putting flow execution '[FlowExecutionImpl@1623389 flow = 'main', flowSessions = list[[FlowSessionImpl@247b55 flow = 'main', state = 'embedded-flow', scope = map[[empty]]], [FlowSessionImpl@d12df7 flow = 'embedded-flow', state = 'main', scope = map['viewScope' -> map[[empty]]]]]]' into repository
                    DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Adding snapshot to group with id 2
                    DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Putting conversation attribute 'scope' with value map['flashScope' -> map['messagesMemento' -> map[[null] -> list[[empty]]], 'flowRenderResponse' -> true]]
                    DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Unlocking conversation 2
                    DEBUG: org.springframework.webflow.mvc.servlet.FlowHandlerAdapter - Sending flow execution redirect to '/swf-booking-faces/spring/main?execution=e2s2'
                    DEBUG: org.springframework.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'Spring MVC Dispatcher Servlet': assuming HandlerAdapter completed request handling
                    DEBUG: org.springframework.web.servlet.DispatcherServlet - Successfully completed request
                    DEBUG: org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'Spring MVC Dispatcher Servlet' processing GET request for [/swf-booking-faces/spring/main]
                    DEBUG: org.springframework.webflow.mvc.servlet.FlowHandlerMapping - Mapping request with URI '/swf-booking-faces/spring/main' to flow with id 'main'
                    DEBUG: org.springframework.web.servlet.DispatcherServlet - Last-Modified value for [/swf-booking-faces/spring/main] is: -1
                    DEBUG: org.springframework.webflow.executor.FlowExecutorImpl - Resuming flow execution with key 'e2s2
                    DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Locking conversation 2
                    DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Getting flow execution with key 'e2s2'
                    DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'main'
                    DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'embedded-flow'
                    DEBUG: org.springframework.webflow.execution.factory.ConditionalFlowExecutionListenerLoader - Loaded [2] of possible 2 listeners for this execution request for flow 'main', the listeners to attach are list[org.springframework.faces.webflow.FlowFacesContextLifecycleListener@6bc73b, org.springframework.webflow.security.SecurityFlowExecutionListener@1e5052b]
                    DEBUG: org.springframework.webflow.engine.impl.FlowExecutionImpl - Resuming in [email protected]b
                    DEBUG: org.springframework.faces.webflow.FlowViewResponseStateManager - No matching view in view scope
                    DEBUG: org.springframework.faces.webflow.JsfViewFactory - Creating UIViewRoot from 'main.xhtml'
                    DEBUG: org.springframework.webflow.engine.ViewState - Rendering + [JSFView = '/WEB-INF/flows/embedded-flow/main.xhtml']
                    DEBUG: org.springframework.webflow.engine.ViewState -   Flash scope = map['flowRenderResponse' -> true]
                    DEBUG: org.springframework.webflow.engine.ViewState -   Messages = [DefaultMessageContext@7efaf6 sourceMessages = map[[null] -> list[[empty]]]]
                    DEBUG: org.springframework.faces.webflow.JsfView - Asking faces lifecycle to render
                    DEBUG: org.springframework.faces.support.RequestLoggingPhaseListener - Entering JSF Phase: RENDER_RESPONSE 6
                    DEBUG: org.springframework.faces.webflow.FlowViewStateManager - Saving view root '/WEB-INF/flows/embedded-flow/main.xhtml' in view scope
                    DEBUG: org.springframework.faces.webflow.JsfView - View rendering complete
                    Please see the next post.. for remaining logs.

                    Comment


                    • #11
                      showcase

                      Code:
                      DEBUG: org.springframework.web.servlet.DispatcherServlet - DispatcherServlet with name 'Spring MVC Servlet' processing POST request for [/springdemo/app/top-flow-with-embedded-subflow]
                      DEBUG: org.springframework.webflow.mvc.servlet.FlowHandlerMapping - Mapping request with URI '/springdemo/app/top-flow-with-embedded-subflow' to flow with id 'top-flow-with-embedded-subflow'
                      DEBUG: org.springframework.webflow.executor.FlowExecutorImpl - Resuming flow execution with key 'e3s1
                      DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Locking conversation 3
                      DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Getting flow execution with key 'e3s1'
                      DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'top-flow-with-embedded-subflow'
                      DEBUG: org.springframework.webflow.execution.factory.ConditionalFlowExecutionListenerLoader - Loaded [2] of possible 2 listeners for this execution request for flow 'top-flow-with-embedded-subflow', the listeners to attach are list[org.springframework.faces.webflow.FlowFacesContextLifecycleListener@f41393, org.springframework.webflow.security.SecurityFlowExecutionListener@46a09b]
                      DEBUG: org.springframework.webflow.engine.impl.FlowExecutionImpl - Resuming in [email protected]
                      DEBUG: org.springframework.webflow.engine.ViewState - Event 'start' returned from view [JSFView = '/WEB-INF/flows/top-flow-with-embedded-subflow/main.xhtml']
                      DEBUG: org.springframework.webflow.engine.Transition - Executing [Transition@f1399 on = start, to = embedded-flow]
                      DEBUG: org.springframework.webflow.engine.Transition - Exiting state 'main'
                      DEBUG: org.springframework.webflow.engine.SubflowState - Entering state 'embedded-flow' of flow 'top-flow-with-embedded-subflow'
                      DEBUG: org.springframework.webflow.definition.registry.FlowDefinitionRegistryImpl - Getting FlowDefinition with id 'embedded-flow'
                      DEBUG: org.springframework.webflow.engine.SubflowState - Calling subflow 'embedded-flow' with input map['mode' -> 'embedded']
                      DEBUG: org.springframework.webflow.engine.Flow - Creating [FlowVariable@fea539 name = 'userBean', valueFactory = [BeanFactoryVariableValueFactory@1145cc type = UserBean]]
                      DEBUG: org.springframework.webflow.engine.ViewState - Entering state 'main' of flow 'embedded-flow'
                      DEBUG: org.springframework.webflow.engine.impl.FlowExecutionImpl - Assigned key e3s5
                      DEBUG: org.springframework.webflow.engine.ViewState - Rendering + [JSFView = '/WEB-INF/flows/embedded-flow/main.xhtml']
                      DEBUG: org.springframework.webflow.engine.ViewState -   Flash scope = map['flowRenderResponse' -> true]
                      DEBUG: org.springframework.webflow.engine.ViewState -   Messages = [DefaultMessageContext@f1d0b1 sourceMessages = map[[null] -> list[[empty]]]]
                      DEBUG: org.springframework.webflow.engine.Transition - Completed transition execution.  As a result, the new state is 'main' in flow 'embedded-flow'
                      DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Putting flow execution '[FlowExecutionImpl@d47c99 flow = 'top-flow-with-embedded-subflow', flowSessions = list[[FlowSessionImpl@1be6a65 flow = 'top-flow-with-embedded-subflow', state = 'embedded-flow', scope = map[[empty]]], [FlowSessionImpl@192e652 flow = 'embedded-flow', state = 'main', scope = map['viewScope' -> map['flowSerializedViewState' -> [FlowSerializedView@14f2dff viewId = '/WEB-INF/flows/embedded-flow/main.xhtml']], 'tab' -> [null], 'userBean' -> org.springframework.samples.webflow.ajax.UserBean@154c72c]]]]' into repository
                      DEBUG: org.springframework.webflow.execution.repository.impl.DefaultFlowExecutionRepository - Adding snapshot to group with id 5
                      DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Putting conversation attribute 'scope' with value map['flashScope' -> map['messagesMemento' -> map[[empty]]]]
                      DEBUG: org.springframework.webflow.conversation.impl.SessionBindingConversationManager - Unlocking conversation 3
                      DEBUG: org.springframework.web.servlet.DispatcherServlet - Null ModelAndView returned to DispatcherServlet with name 'Spring MVC Servlet': assuming HandlerAdapter completed request handling
                      DEBUG: org.springframework.web.servlet.DispatcherServlet - Successfully completed request
                      Thanks,
                      Vijay

                      Comment


                      • #12
                        Hi Vijay,

                        I'm having the same issue here. Did you have any success?

                        Comment


                        • #13
                          No luck

                          Hi Yanaga,

                          I am sorry for the late reply, I haven't found any way to proceed on this issue. What about you?

                          Thanks,
                          Vijay

                          Comment


                          • #14
                            Hi joy192k,

                            The only way I've found to make it work was to put the ?mode=embedded in all the urls starting flows. This way the partial-response works fine. Any other attempt was unsuccessful.

                            <input name="mode" value="'embedded'"/> was a fail for me.

                            Comment


                            • #15
                              Hi Yanaga,

                              That worked for me as well ?mode=embedded, but it doesn't work for sub-flows, i can't start any sub-flows in embedded mode. Did you get a chance to make that work?

                              Thanks,
                              Vijay

                              Comment

                              Working...
                              X